-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rescript and Deno #4965
Comments
I did not try deno, but I suppose it should work without much hassle, do you have any particular issue? You can just download the npm package and check if it works |
@bobzhang I opened an issue requesting ReScript support for Alephjs. One of their goals is to stay away from npm. |
@bobzhang Deno is not a Node thing, it is a whole another server side runtime. That would not work because while Node uses CJS we use native ES modules. |
Note we support es6 modules, you can configure it like
You don't need use npm, you can just use a http client to download |
I made a repo to show how to use ReScript with Deno, you don't need do anything special with Deno since we support the ESModule standard https://github.com/bobzhang/rescript-deno |
@bobzhang Yes that could work, but it is inconvenient when trying to use ReScript with frameworks like Aleph as many developers who use Deno try to limit the dependency on Node and NPM as much as possible. |
@shadowtime2000 There is only one dependency: bs-platform, the package has no dependencies, you can just download the package by hand. Did I miss anything? |
@bobzhang Yes, that most Deno developers wouldn't want to have to use Node alongside with Deno, but just Deno. |
where is node used? |
@bobzhang Well, you have to use NPM to install the |
What I am talking about is a |
@bobzhang Maybe I didn't clearly explain myself. I am talking about having support for the ReScript compiler itself inside Deno, and not having to use Node because it's kind of dumb to have to rely on Node to use Deno. I have no idea how ReScript compiler works but it seems like majority of it is native code so you could just write bindings to it using Deno's APIs. |
Hey 👋 From what I was reading, Deno doesn’t seem to have a default package manager or registry. So that may mean that Rescript may need to compile to JS that uses import statements with remote paths like: We could also use something like Trex (unofficial package manager) to provide Import Maps for something like: Another piece would be to provide Deno alternatives for scripts like I would be happy to help experiment with some of this and see if we can put something together. I really think that Rescript could benefit from the Deno community, and that the Deno community would appreciate Rescript since they like TypeScript (officially supported by Deno) but at times would prefer an alternative type system and/or language 😊 cc @bobzhang |
@seanstrom Hi, we are open contributions to make deno use experience better. |
So I assume bsb is just some glue code to use |
yes, if you don't use watch mode, |
Great to hear 😊
I have a question about the I also have some notes and questions around supporting Deno. Some of these comments are based on this Rescipt + Deno demo and the Rescript compiler internals. Notes:
What are your thoughts on this? How should we add Deno support for the runtime modules from cc @bobzhang |
Only the build system
We are going to publish it as
You can try to use the module format es6-global. There may be some other issues |
I created a fork of the Rescript + Deno experiment and added a Deno import map, along with the Here's the experiment with Rescript + Deno with import map file |
Indeed import map is quite nice, I also made use of it here https://github.com/bobzhang/rescript-react-demo |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Are there any plans to support Deno? The Deno ecosystem is growing rapidly and we are stuck with JavaScript and TypeScript since bs-platform is only packaged as an npm package.
The text was updated successfully, but these errors were encountered: