-
Notifications
You must be signed in to change notification settings - Fork 147
Disable unused wasmtime features #858
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
Conversation
Co-authored-by: zach <zachshipko@gmail.com>
Is anything else needed to merge this? |
My only hesitation is that we will run into some unintended side-effect of removing one of these features. Everything seems to be working as far as I can tell, and it is helpful to remove the unused features that end up bloating libextism. One that I'm still on the fence about is |
Then how about this change? I added a new feature |
runtime/Cargo.toml
Outdated
wasmtime-default-features = [ | ||
"wasmtime/async", | ||
"wasmtime/pooling-allocator", | ||
'wasmtime/gc-null', | ||
'wasmtime/profiling', | ||
'wasmtime/parallel-compilation', | ||
'wasmtime/pooling-allocator', | ||
'wasmtime/demangle', | ||
'wasmtime/addr2line', | ||
'wasmtime/debug-builtins', | ||
'wasmtime/runtime', | ||
'wasmtime/component-model', | ||
'wasmtime/threads', | ||
'wasmtime/std', | ||
] |
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 approach is nice! I think we can do this instead:
wasmtime-default-features = [ | |
"wasmtime/async", | |
"wasmtime/pooling-allocator", | |
'wasmtime/gc-null', | |
'wasmtime/profiling', | |
'wasmtime/parallel-compilation', | |
'wasmtime/pooling-allocator', | |
'wasmtime/demangle', | |
'wasmtime/addr2line', | |
'wasmtime/debug-builtins', | |
'wasmtime/runtime', | |
'wasmtime/component-model', | |
'wasmtime/threads', | |
'wasmtime/std', | |
] | |
wasmtime-default-features = [ | |
"wasmtime/default" | |
] |
I will push up a commit with some small tweaks then will merge this!
This PR disables all possible dependencies for wasmtime, while the code can still compile. Its possible that some of these removed features should be enabled again if they help with debugging or improve performance. Here you can see all the default features, as well as documentation for each feature flag.
It reduces the number of dependencies from 401 to 366. I didnt check the compile time but it should also be faster.