4 ms·
> What's the difference between opting into a library with a feature flag and opting in with a line in Cargo.toml? Let's say you want to use the de-facto regex
by rastignack 3y ago
> What's the difference between opting into a library with a feature flag and opting in with a line in Cargo.toml? Let's say you want to use the de-facto regex library. Would it really be ridiculously productive if you said you wanted the "regex" feature flag instead of the "regex" crate?
If you are all alone developing and can audit the crate properly, sure.
However when there’s a team, whose favorite lib should we pick ? How many of them shall we audit ? What’s their license ? How’s code attribution managed ? Etc etc
- nindalf 3y agoRust had a small standard library and that’s ok (https://blog.nindalf.com/posts/rust-stdlib/ https://blog.nindalf.com/posts/rust-stdlib/) Your concerns are valid, but Rust has chosen a different set of trade offs. The link outlines the pros and cons.