-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[meta] embedding #30593
Comments
What's the benefit of going Rust -> C -> Rust ? |
The main benefit of this approach is the ability to ship a shared object. |
But wry is already pure Rust so it doesn't need that, right? |
Since Servo takes so long to build, being able to ship a shared object version of Servo will make it easier for embedders to use it. |
We are trying to update our entry method to use raw window handle recently. A shared object isn't that urgent IMHO. Defining a C API that is ergonomic enough is another challenge as well. I tried to deal with CEF's C API before, and the experience didn't go that well. What I think is better are shared objects for huge C++ dependencies like |
Here is interesting blog post about dylib: https://robert.kra.hn/posts/2022-09-09-speeding-up-incremental-rust-compilation-with-dylibs/ |
@sagudev interesting! I didn’t realise it was possible to build a lib crate as a dylib unless we used the C ABI. I wonder if it will break monomorphisation or break if type layout changes between runs. |
Hm, I'm not entirely sure on stability of dylib, but thinking about it again maybe that's not the best way as we still need rust code generated by bindgen. We could just cache libmozjs static, but we might still need to run configure for bindgen so we cannot really eliminate it's build sys requirements. |
@sagudev It's okay to still running bindgen for build script as long as there's a static lib like deno's v8 wrapper did IMHO. People usually have trouble with C++ building setup instead of rust. Does spider monkey published their binary release already? |
@wusyong SpiderMonkey does offer prebuilds as artifacts on taskcluster, but we are patching SM in mozjs, so we would need to this for ourself. I have rough idea how this could work via automated CI jobs. |
Btw I saw mozangle also has patches but it seems they are trivial. Maybe we can try to pull angle artifact and link it for mozangle's case. |
Just an update on We are also exploring possible cons of |
As long as the building process can be easier, I'm happy to see any attempt. I think the main concern for |
(as well as to the constellation)and WebViewPaintingOrderare the offending variantsrust-mozjs
's build script tomozjs-sys
mozjs#409MOZJS_MIRROR
andMOZJS_CREATE_MIRROR
env variables mozjs#443The text was updated successfully, but these errors were encountered: