How to idiomatically alias a crate in Rust 2018?
问题 I have a crate foo_sys . In Rust 2015 I used extern crate foo_sys as foo for convenience, but in Rust 2018 extern crate isn't needed anymore and I don't want to use it only for aliasing. When dropping extern crate , I get error[E0463]: can't find crate for foo 回答1: This can be achieved with the rename-dependency Cargo feature, available in Rust 1.31. With this feature, it's possible to provide a package attribute to the dependencies: The rename-dependency feature allows you to import a