-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove dependency on Node #37
Comments
I have never used Deno, so I can't do this myself. The only place where Node is invoked is here to start the generated
Probably the easiest way to make that compatible is to find the equivalent deno APIs for the usage of node APIs and just make a shift of those, keeping the rest of the JS code. You can try doing that by modifying directly the files generated by But since deno natively supports typescript, maybe rewriting those three files in typescript for the deno variant would be more appropriate? |
This thread has some tips on how to write js that works in both node and deno. Possibly useful. denoland/deno#3196. |
I'm not sure if supporting deno would really lead to this not depending on node. I guess you could package that logic to a wasm or deno executable. Then again, this issue reminds me of this issue over at tree sitter. Tree sitter just needs js to parse a file, it doesn't actually run node. Still, might be an interesting read tree-sitter/tree-sitter#465 |
We need an efficient JS runtime to run the tests. The advantage of deno is that it also uses V8, just like node. If an adaptation of the supervisor code in |
Working out how to make elm-test-rs work with deno might show us how to make elm-test-rs work with via a browser (using the headless api). Then you could run unit tests in the actual browser which would be cool |
@mpizenberg interesting, I took the subject to another conclusion and thought you don't want to rely on anything outside your binary at all. |
The other conclusion is possible with deno with https://github.com/denoland/rusty_v8. Possibly is very different from practical though and I have no idea what an implementation would look like. |
As @harrysarson said. And it would bring C++ (from V8) bindings that would mess up with musl compilation for linux. It's another level of complicated having nothing outside the binary at all and I'm not interested in solving that. At least for the moment. If Elm compiling to wasm happens before Elm integrating a test runner, we might very well bring a wasm runtime in. |
JS runtime supportHere is a detailed list of the requirements to be able to use alternative JavaScript runtime instead of Node. Main supervisor: deno_supervisor.ts
Runner worker: deno_runner.ts
|
Using Deno instead of Node should be possible now in PR #92 with the |
Done in #92 |
Remove the dependency on the additional setup of the environment before running `elm-test-rs`: Remove the dependency on node. For discussion around this functionality, see: + mpizenberg/elm-test-rs#37 + mpizenberg/elm-test-rs#92
Remove dependency on Node, for example by supporting Deno.
The text was updated successfully, but these errors were encountered: