Generated index.node file size is huge, could it be compressed?
dickeylth opened this issue · 1 comments
dickeylth commented
I've cloned and tried the example of tokio-fetch, and the generated index.node file size is 14M, which I think is very large size, is there any way to compress or minimize the size?
total 27984
-rw-r--r-- 1 dickeylth staff 504B Apr 14 12:24 Cargo.toml
-rw-r--r-- 1 dickeylth staff 2.7K Apr 14 12:24 README.md
-rwxr-xr-x 1 dickeylth staff 14M Apr 14 12:26 index.node
drwxr-xr-x 6 dickeylth staff 192B Apr 14 12:26 node_modules
-rw-r--r-- 1 dickeylth staff 688B Apr 14 12:24 package.json
drwxr-xr-x 3 dickeylth staff 96B Apr 14 12:24 src
kjvalencik commented
👋 Hello! Since, you closed the issue, you probably figured it out, but in case anyone else drops in, this is a great resource for minimizing the size of Rust builds: https://github.com/johnthagen/min-sized-rust
With these changes the tokio-example
falls to 4.1M
.
- Building as release (
npm run build -- --release
) - Enabling LTO