servo-reading-2

crate 比 module大。 html

Modules allow you to partition your code within the crate itself. code

 Rust has two distinct terms that relate to the module system: ‘crate’ and ‘module’. A crate is synonymous with a ‘library’ or ‘package’ in other languages. Hence 「Cargo」 as the name of Rust’s package management tool: you ship your crates to others with Cargo. Crates can produce an executable or a library, depending on the project. component


http://doc.rust-lang.org/book/crates-and-modules.html htm

.
├── chinese
│   ├── farewells.rs
│   ├── greeting.rs
│   └── mod.rs
├── english
│   ├── farewells.rs
│   ├── greeting.rs
│   └── mod.rs
├── lib.rs
└── main.rs ip


http://www.ieyebrain.com:8080/rs/project/phrases/src/ it


http://www.ieyebrain.com:8080/servo/components/servo/ io

本站公眾號
   歡迎關注本站公眾號,獲取更多信息