-
Notifications
You must be signed in to change notification settings - Fork 121
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
Move rust-mozjs
's build script to mozjs-sys
#409
Conversation
rust-mozjs
's build scirpt to mozjs-sys
On one hand jsglue requires headers from mozjs_sys so it might make sense move it there, but on the other hand jsglue provide high level wrappers, that are tightly coupled with stuff in rust-mozjs so it also makes sense to put it there. Moving also violates idea of raw bindings in sys crate ... I am pretty diverged about this, but I am slightly more in favor to keep things as they are. So I would love to hear what others think about this and if they are any other reasons for/against this. |
If it's higher level wrappers, it should be implemented by Rust using sys crate directly. |
This also move libjsapi.a to the same place as jsapi.rs in $OUT_DIR/build
rust-mozjs
's build scirpt to mozjs-sys
rust-mozjs
's build script to mozjs-sys
The more I think about it the more I like it. To sum up here is how new structure looks like (currently jsapi contains some higher stuff too):
|
@jdm what do you think about this? |
I'm not arguing for either option, but I will note that the current split between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a reasonable choice!
Thanks for merging! |
Move all build scripts into
mozjs-sys
crate which is more conventional when binding FFI.This can also make possible future changes like linking binary build instead of building everything from source easier.
I added another commit to rename original mozjs-sys's
jsglue.cpp
tojsapi.cpp
, and keptrust-mozjs
'sjsglue
.It's just clearer IMHO. Let me know if there are better names.