-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
binary size is very large #330
Comments
All the embedded grammar parsers, that's what happens when everything is statically linked into one binary. Additionally you're looking at the binary size before stripping debug info. Rust still includes debug info on |
Wait, why aren't we dynamically linking? |
Rust doesn't dynamically link (by default), no. (Even stdlib is statically linked.) Ideally we want to compile the grammars separately, then load them with libloading, that way the user isn't forced to compile all grammars. tree-sitter has a TODO upstream to compile the grammars optionally to wasm so we could compile once and distribute. |
(Note: |
I don't think we need to wait for it to compile to Wasm, it can already be compiled as a dynamic library and we can link to it with |
Building the C code via |
Ignore the numbers here since they're before optimization and stripping, but you can see the code size proportions of each crate:
|
Doesn't that make it part of plugin if we are to move them? |
It definitely could, especially if we can compile everything into a As an aside, it would also help with publishing on crates.io |
Helix plugin manager when? Haha, joking. |
Plugins system is not even a reality yet, plugins manager is science fiction !! |
Just my 2 cents: bending over backwards to shrink the binary size this early in development can make life harder. At this stage its often better to take the size hit in favor of simpler design and then reconsider dependencies and such later. |
See #432 for a draft. |
Good job. Now about 7.8MB. |
The binary size about 24MBytes, it's too large. Why?
The text was updated successfully, but these errors were encountered: