Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
As a follow up to this. I haven't had success embedding Deno into my Rust application beyond integrating it to evaluate basic JavaScript. My efforts to fork Deno CLI or use the new/unstable deno_lib crate were plagued with issues so I gave up. I was, however, able to compile Nodejs to a dynamic C library (prebuilt binaries here), added Rust bindings and a high level Rust API (with async Rust support). I'm keeping up to date on Deno's progress and if things change I'll happily migrate to Deno. My hope is to compile Deno to a static or dynamic C library (to avoid collisions with dependencies), offer prebuilt binaries & rust bindings along with a high level Rust API. Deno's opt system is quick fiddly, so I would probably rely on the Nodejs compat and write the high level API against Node's n-api |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing a bundler in Rust and am looking for a runtime to embed in my binary to execute JavaScript based plugins with.
Deno is written in Rust and offers the
deno_core
crate which offers a basic execution context for JavaScript applications.It's pretty great and easy to use however, looking through the examples, it appears very bare bones - offering only an execution context, where I must separately implement the Node standard library, module resolution, commonjs support and so on.
I could copy those features from the Deno repo and reimplement the usage as described in the Deno executable - but I was wondering if there was already a way to do this without manually rewiring a complete form of Deno in my own project.
Or have I misunderstood
deno_core
and it actually has batteries included? 😓Beta Was this translation helpful? Give feedback.
All reactions