3 ms·
rustc already requires passing an --extern flag for each 'extern crate' in the source, so in some sense, yes. You'd be passing that stuff along. You already hav
by steveklabnik 10y ago
rustc already requires passing an --extern flag for each 'extern crate' in the source, so in some sense, yes. You'd be passing that stuff along. You already have to know where those deps are on disk; the difference is that you wouldn't have a list of which deps in the source code. But if you did, it would work.
- qwertyuiop924 10y agoAh. I was working under the assumption that extern crate acted as that, but file-embedded. If rust already needs --extern, I have no objections.
- gpm 10y ago> rustc already requires passing an --extern flag for each 'extern crate' in the source Only if it can't find the crate otherwise. Generally it just searches your library path and any directories you specify with -L, e.g. most cargo executables can be recompiled (the first compilation via cargo used to compile the dependencies) via `rustc src/main.rs -L target/debug/deps`
- steveklabnik 10y agoAh thanks; Cargo always passes the flag for each, I guess it's just being extra-explicit. (And that doesn't change the main point, which is that you could still be explicit about what deps you're including)