document "cargo init"
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 17 Feb 2016 08:11:00 +0000 (13:41 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 17 Feb 2016 08:11:00 +0000 (13:41 +0530)
src/bin/cargo.rs
src/etc/cargo.1

index 1ad07cf3772b506a855e287f3a428ca0166360e7..350448df0ad6da86467be23df36d244a6cbc0810 100644 (file)
@@ -44,6 +44,7 @@ Some common cargo commands are:
     clean       Remove the target directory
     doc         Build this project's and its dependencies' documentation
     new         Create a new cargo project
+    init        Create a new cargo project in an existing directory
     run         Build and execute src/main.rs
     test        Run the tests
     bench       Run the benchmarks
index ea053d83b5629c48d9bc822ba0da888a62bafff3..db4971d23d0c7fb231d14380e2a30835b2e3d491 100644 (file)
@@ -44,6 +44,9 @@ Remove the target directory with build output
 \fBcargo doc\fR
 Build this project's and its dependencies' documentation
 .TP
+\fBcargo init\fR
+Create a new cargo project in the current directory
+.TP
 \fBcargo install\fR
 Install a Rust binary
 .TP
@@ -90,6 +93,13 @@ Build a package with optimizations
 Run tests for a cross-compiled target
     $ cargo test --target i686-unknown-linux-gnu
 
+Create a new project that builds an executable
+    $ cargo new --init foobar
+
+Create a project in the current directory
+    $ mkdir foo && cd foo
+    $ cargo init .
+
 Learn about a command's options and usage
     $ cargo help clean