Closed Teddy-Kun closed 3 months ago
It's generally not feasible because of the use of traits and generics. Every application begins by implementing the Application trait, which then specializes the entire toolkit and its widgets to that application's defined associated types and methods.
Compile-times shouldn't be an issue if you are using sccache.
Please no, pervasive dynamic linking is the cause for much of the issues with packaging software for linux. It needs to go away.
We are trading untold amount of man hours in packaging efforts to save a few megabytes of storage, the trade-off hasn't made sense in a while.
We do not intend to make libcosmic dynamically linked
First of all let me state that I know that Rust does not yet have a stable ABI. I am also fully aware, that due to using specific -git builds of
libcosmic
for the majority of packages, that it is currently not feasible anyways.However, would it be possible that in the future Cosmic would be build against a dynamically linked
libcosmic
? This could reduce both compile times and disk space considerably. While Rusts ABI is not fully stable, depending on compiler version and compile flags, to my knowledge, it should be perfectly fine if the entirety of cosmic is build at once with the same compile flags and compiler version.This would probably mean that
libcosmic
would need to be compiled first and the rest of the cosmic desktop would need to use the resultinglibcosmic.so
file. I have already tried modifyinglibcosmic
accordingly and have buildcosmic-files
against it, without any issues, but not the entire DE.This is probably less of a big deal once crABI is in Rust and has stabilized, but I doubt that is gonna happen any time soon.