3 ms·
The deno_runtime crate is indeed easy to use however the exts that provide compat for web apis and Nodejs compat still require forking deno_cli. You can use som
by apatheticonion 1y ago
The deno_runtime crate is indeed easy to use however the exts that provide compat for web apis and Nodejs compat still require forking deno_cli. You can use some of their ext crates https://github.com/denoland/deno/tree/main/ext https://github.com/denoland/deno/tree/main/ext but not everything.
Also using ops within Workers is challenging, particularly if they share state.
- laurencerowe 1y agoThe web api extensions and Nodejs compatibility stuff are now in deno_runtime: https://github.com/denoland/deno/blob/main/runtime/Cargo.toml https://github.com/denoland/deno/blob/main/runtime/Cargo.tom... The CLI only depends on them transitively via deno_runtime: https://github.com/denoland/deno/blob/main/cli/Cargo.toml https://github.com/denoland/deno/blob/main/cli/Cargo.toml For instance I was able to run the following script using just deno_runtime with https://github.com/lrowe/deno_varnish/blob/main/src/main.rs https://github.com/lrowe/deno_varnish/blob/main/src/main.rs import { DatabaseSync } from "node:sqlite"; console.log(new DatabaseSync(":memory:").prepare("SELECT 1").get());
- apatheticonion 1y agoHuh, it's come a long way since I last looked at it