PACKAGING.md
42 lines · 1640 bytes
1# Notes For Package Maintainers
2
3## Linking Against System Packages
4
5The default Cargo features for __iamb__ will bundle SQLite and use [rustls] for
6TLS. Package maintainers may want to link against the system's native SQLite
7and TLS libraries instead. To do so, you'll want to build without the default
8features and specify that it should build with `native-tls`:
9
10```
11% cargo build --release --no-default-features --features=native-tls
12```
13
14## Enabling LTO
15
16Enabling LTO can result in smaller binaries. There is a separate profile to
17enable it when building:
18
19```
20% cargo build --profile release-lto
21```
22
23Note that this [can fail][ring-lto] in some build environments if both Clang
24and GCC are present.
25
26## Documentation
27
28In addition to the compiled binary, there are other files in the repo that
29you'll want to install as part of a package:
30
31| Repository Path | Installed Path (may vary per OS) |
32| -------------------- | ----------------------------------------------- |
33| /iamb.desktop | /usr/share/applications/iamb.desktop |
34| /config.example.toml | /usr/share/iamb/config.example.toml |
35| /docs/iamb-256x256.png | /usr/share/icons/hicolor/256x256/apps/iamb.png |
36| /docs/iamb-512x512.png | /usr/share/icons/hicolor/512x512/apps/iamb.png |
37| /docs/iamb.svg | /usr/share/icons/hicolor/scalable/apps/iamb.svg |
38| /docs/iamb.1 | /usr/share/man/man1/iamb.1 |
39| /docs/iamb.5 | /usr/share/man/man5/iamb.5 |
40
41[ring-lto]: https://github.com/briansmith/ring/issues/1444
42[rustls]: https://crates.io/crates/rustls