Below are the current binary sizes for libina.so in the Android library:
libina.so (aarch64-linux-android): 504.9 KiB
libina.so (x86_64-linux-android): 619.9 KiB
Applying -C linker-plugin-lto via .config/cargo.toml results in the following binary sizes:
libina.so (aarch64-linux-android): 450.1 KiB
libina.so (x86_64-linux-android): 554.0 KiB
These are reductions in size by 10.9% and 10.6% respectively.
We should find the correct way to apply -C linker-plugin-lto and/or other measures to further reduce the binary size of our Android artifacts. This requires some work because linker errors occur without care, e.g., the ina CLI won't build on x86_64-unknown-linux-gnu with this flag enabled. It seems we need to figure out how to set clang as the default cc and linker and ensure this works properly on Windows and macOS as well.
For more information, see https://doc.rust-lang.org/rustc/linker-plugin-lto.html.
Below are the current binary sizes for
libina.soin the Android library:libina.so (aarch64-linux-android): 504.9 KiB
libina.so (x86_64-linux-android): 619.9 KiB
Applying
-C linker-plugin-ltovia.config/cargo.tomlresults in the following binary sizes:libina.so (aarch64-linux-android): 450.1 KiB
libina.so (x86_64-linux-android): 554.0 KiB
These are reductions in size by 10.9% and 10.6% respectively.
We should find the correct way to apply
-C linker-plugin-ltoand/or other measures to further reduce the binary size of our Android artifacts. This requires some work because linker errors occur without care, e.g., theinaCLI won't build on x86_64-unknown-linux-gnu with this flag enabled. It seems we need to figure out how to set clang as the defaultccand linker and ensure this works properly on Windows and macOS as well.For more information, see https://doc.rust-lang.org/rustc/linker-plugin-lto.html.