Skip to content
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

Dynamic Linking of SpiderMonkey Interpreter #66

Open
royaljain opened this issue Oct 26, 2023 · 3 comments
Open

Dynamic Linking of SpiderMonkey Interpreter #66

royaljain opened this issue Oct 26, 2023 · 3 comments

Comments

@royaljain
Copy link

Problem

The size of wasm module produced is quite high, ~ 8 MB for a function adding two numbers. My understanding is that the interpreter (SpiderMonkey) is the majority of it.

Query

Is there a way to dynamically link the interpreter and wasm module to reduce the module size? The primary benefit is when there are multiple wasm modules & instances

For reference: Javy has -d flag for enabling dynamic linking

@guybedford
Copy link
Collaborator

Yes this remains a goal for this project, where the engine itself can be imported as a core module that can be dynamically linked.

This work is not currently being prioritised for a while yet, unless someone wants to pick it up.

@royaljain
Copy link
Author

Got it.

Is this connected to the component model, will the linking be done through that?

@maxbrunsfeld
Copy link

I just ran into this as well. I'm seeing componentize() produce a 10MB binary when I give it a module with nothing but empty stub functions for my world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants