-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Write fully safe Rust bindings to SpiderMonkey #8732
Comments
While this would be nice, it is not a priority for us. |
I think I understand – in a web browser there is more to security than just memory safety. |
Cc @asajeffrey |
This is the goal of https://github.com/asajeffrey/linjs we shall see if it scales to something the size of servo! |
Related to this? #8079 |
I don't see a compelling reason to keep this issue open. It would be better to file more specific issues in https://github.com/servo/rust-mozjs. |
The Rust bindings to SpiderMonkey are not really safe, even with the plugins. Layout must use unsafe accessors, asserts to prevent undefined behavior are not present in release builds, and the compiler plugins do not prevent all errors involving purely safe code.
One solution to this is to provide fully safe Rust bindings to SpiderMonkey. This seems (to me) to involve:
JSContext
is passed to the JSAPI.Rooted<T>
are not misused. In particular, they should not be allowed as generic type parameters.unrooted_must_root
lint sound.The text was updated successfully, but these errors were encountered: