Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWrite fully safe Rust bindings to SpiderMonkey #8732
Closed
Labels
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
JSContextis passed to the JSAPI.Rooted<T>are not misused. In particular, they should not be allowed as generic type parameters.unrooted_must_rootlint sound.