Deno: Embedding deno in other projects

Created on 4 Feb 2019  路  5Comments  路  Source: denoland/deno

I'm working on a project to create an edge application runtime (similar to fly or Cloudflare's Workers) in Rust, and I couldn't find any good v8 wrapper for Rust.

I appreciate Deno is not meant to be a library and designed to be a standalone TS runtime, but would you be interested in exposing some of its useful primitives (i.e. deno::isolate::Isolate) in a Rust library? Obv I'd be happy to help with this if you think it's viable. I've got a na茂ve implementation of a web app embedding deno, just renaming main.rs to lib.rs.

Most helpful comment

Yes, we would like to release a crate - we're almost there but have hit a few snags on the "cargo package" step of the process https://github.com/denoland/deno/issues/1387

You should be able to include deno as a git submodule and use cargo path dependencies: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies
but we'd like to make this a better experience. Any help with "cargo package" would be greatly appreciated.

All 5 comments

There is a similar suggestion at #1357 馃憤

Yes, we would like to release a crate - we're almost there but have hit a few snags on the "cargo package" step of the process https://github.com/denoland/deno/issues/1387

You should be able to include deno as a git submodule and use cargo path dependencies: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies
but we'd like to make this a better experience. Any help with "cargo package" would be greatly appreciated.

Yes, at the moment I'm using a submodule pointing to a fork where I added the file lib.rs that exposes the things I need.

Re #1387, I'd like to help with that. Is there anything that you already tried? Any idea on possible solutions?

@hephex it鈥檚 been a few weeks since I looked at it but I鈥檝e got a WIP branch listed in the issue. I believe it was stuck at uploading to crates.io due to size.

FYI @hephex Deno is available as a crate since late March

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zugende picture zugende  路  3Comments

kitsonk picture kitsonk  路  3Comments

xueqingxiao picture xueqingxiao  路  3Comments

ry picture ry  路  3Comments

benjamingr picture benjamingr  路  3Comments