Closed ja-cop closed 1 year ago
cargo build creates target/debug/mn at 523M on my system
oO
I have to admit that my Rust experience is not yet that comprehensive. But that seems unfortunate. I set the project up that it defaults to no other system c libraries but libc (e.g. it uses rustls instead of openssl). Maybe we could offer an e.g. openssl compile option or similar.
I personally want the debug build to have the defaults; since I am not aware of the implications of this during development when changing this.
I did change some feature flags which reduced the release build to 33 MB. I experimented with aggressive LTO settings, and got it down to 22MB. I think the massive compile time increase is not worth enabling LTO.
There is now a feature flag native-tls
which enables the usage of the system openssl library. Maybe this helps. Feel free to ping me if it is still relevant.
With the build instructions from the README,
cargo build
createstarget/debug/mn
at 523M on my system, with the latest rustup (rustc version 1.67.1). Usingcargo build --release
results in a much more reasonable 40M. Perhaps the build instructions should be updated to suggest a release build, or at least explain that the debug build can be quite large? It came as a surprise to me!My system is running Void Linux on musl libc, in case it's relevant.
Also, thanks a bunch for updating this with E2EE support, it's really awesome! I set it up on my homelab server to send notifications to Matrix on Sensu system monitoring events. I was also happy to see that sending Markdown was supported out of the box, as I had already setup Markdown formatting for Sensu events. It's a nifty property that "trusting the homeserver" with server system details is not required, even if the details for my homelab server are largely trivial and unimportant :)