Closed FabianLars closed 1 year ago
closing because we don't need arm dlls, discussion on discord: https://discord.com/channels/616186924390023171/986184168998330371/1062664355486900234
re-opening because of the incoming ns-nscurl rewrite :)
i'll do some cleanup tomorrow. Until then, how granular should the error handling be? Do we want different error codes for different errors (and which one of them should be handled) similar to nsprocess or is a catch-all enough?
for the download plugin, lets send the error code, eg 200
, 404
and so on
for process plugin, 0
for success and 1
for failure is enough
okay sooo, making a lib a "normal" rust lib and a dylib at the same time is super annoying, especially if you add a lib like nsis-tauri which just wants to re-export the other libs.
1) You can't export (pub use
) extern C functions
2) for whatever reason the DLLs grow a bit in size if you add the lib
crate-type ðŸ˜
3) you can't have pub extern C functions with the same name in 2 crate members or llvm starts crying
i'm thinking about moving all actual functionality into a core
crate of some sort but we'd still be unable to do cargo build
to build all libs at once unless we rename the functions in nsis-tauri (for testing i just put a T
in front like TFindProcess
...)
The nsis-process project needs
a bit of aa lot of cleanup, it's really just a poc to discuss how to proceed. you can treat this as a rfc issue, i just wanted to have something to look at.i think the way to go here is to have only 1 (tauri specific) dll to massively save on dll binary size. The main question here is if we still want to release individual dlls for other people to use? If not then we can just revert the workspace refactor and have it all in one project. The alternative is a bit annoying because you can't re-export (
pub use
) theextern "C"
functions so we'd have to duplicate some code.Edit: a quick test for the file size: