3 ms·
> And as the executable gets larger and refactored, some of the "executable" code will inevitably become "library" code. What then? Then that is migrated to `t
by masklinn 6y ago
> And as the executable gets larger and refactored, some of the "executable" code will inevitably become "library" code. What then?
Then that is migrated to `thiserror` (or something bespoke) at the same time as it's migrated to the library context.
The library / executable is the delineation between providing a Rust-level API for third parties versus consuming such APIs.
If you're providing a Rust API, you want to provide precise error so that the user is able to precisely target and handle errors if they need to.
If you're only consuming Rust APIs, then you want to precisely handle some of the errors you get, and just chuck the rest over the side.