-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Extracting V8 bindings into a standalone crate? #1357
Comments
see #1209 , I don't think the plan is to expose the entire v8 API however... |
@hayd sure, I think for most use cases, the ability to ergonomically call rust functions from javascript and vice versa and use rust structs as js classes would be enough. I tried using bindgen to do the binding, but it kept crashing when i tried creating a new isolate, and could never figure out why. |
Deno is available as a crate at https://crates.io/crates/deno. Can this issue be closed now? CC @ry |
Just looked at the documentation, it doesn't look like there's a way of exposing rust objects to JS and vice versa. |
@Neurrone Deno's philosophy is to only allow binary blobs (Uint8Arrays) to be passed back and forth between V8. This has very nice consequences if it is adhered to. So we will not be automatically exposing Rust objects to JS. (Though a proper FFI is on the roadmap.) Despite the lack of documentation, https://crates.io/crates/deno is by far the most advanced Rust V8 binding out there. Please try it. See these examples |
Hi,
There aren't any existing bindings to V8 that are up to date. Based on the crate documentation, Deno is able to call V8 APIs, and it would be useful to use this for scripting from standalone Rust programs.
The text was updated successfully, but these errors were encountered: