Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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`



Ah 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)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: