3 ms·
Can Deno be embedded in a larger Rust application? I know I can embed v8 directly https://github.com/denoland/rusty_v8 https://github.com/denoland/rusty_v8 but
by nextaccountic 4y ago
Can Deno be embedded in a larger Rust application? I know I can embed v8 directly https://github.com/denoland/rusty_v8 https://github.com/denoland/rusty_v8 but I wish I could use other parts of Deno.
In particular, I wish I could write a Tokio async program in Rust, and load plugins using deno, and have this work seamlessly
edit: actually, https://deno.land/manual@v1.25.0/embedding_deno https://deno.land/manual@v1.25.0/embedding_deno https://crates.io/crates/deno_core https://crates.io/crates/deno_core https://docs.rs/deno_core/latest/deno_core/ https://docs.rs/deno_core/latest/deno_core/
It doesn't expose tokio so I suppose that it manages its own runtime separate from the executor of the application using it (edit 2: it doesn't, it lets the user bring their own executor. cool!)
- rwiggum 4y agoYes, easily. We do this for the JS runtime at litprotocol.com
- nextaccountic 4y agoCool! Can you link to it on Github or something? (is it oss?)