如果您下載使用 Cargo 的現(xiàn)有項(xiàng)目,那么它很容易上手.
首先,從某個(gè)地方獲取項(xiàng)目.在這個(gè)例子中,我們將使用rand項(xiàng)目,其從 GitHub 上的存儲(chǔ)庫(kù)克隆而來(lái):
$ git clone https://github.com/rust-lang-nursery/rand.git
$ cd rand
要建立,使用cargo build:
$ cargo build
Compiling rand v0.1.0 (file:///path/to/project/rand)
這將獲取所有依賴項(xiàng),然后與項(xiàng)目一起構(gòu)建它們.
更多建議: