Improve wordings and small additions

This commit is contained in:
finga 2021-10-11 15:05:42 +02:00
parent 094d2546e9
commit 779d740a42

View file

@ -100,7 +100,7 @@
** Where to share, find help and stay up to date ** Where to share, find help and stay up to date
*** Online sharing/testing *** Online sharing/testing
- [[https://play.rust-lang.org/][play.rust-lang.org]] - [[https://play.rust-lang.org/][play.rust-lang.org]]
- [[https://godbolt.org/][godbolt.org]] (Not only Rust is supported) - [[https://godbolt.org/][godbolt.org]] (Supports not only Rust)
*** Chat (Discord) *** Chat (Discord)
- [[https://discord.gg/rust-lang][The Rust Programming Language]] - [[https://discord.gg/rust-lang][The Rust Programming Language]]
@ -426,6 +426,29 @@
- Build chain/tool - Build chain/tool
- Cargo calls ~rustc~, the Rust compiler - Cargo calls ~rustc~, the Rust compiler
- A Cargo project contains at least one crate - A Cargo project contains at least one crate
- Custom build scripts with ~build.rs~
- Builds just work
** Cargo commands
*** Create a new binary crate (~init~ does so in an existing directory)
#+BEGIN_SRC sh
$ cargo new [--bin] <PATH>
#+END_SRC
*** Create a new library crate (~init~ does so in an existing directory)
#+BEGIN_SRC sh
$ cargo new --lib <PATH>
#+END_SRC
*** Update build dependencies
#+BEGIN_SRC sh
$ cargo update
#+END_SRC
*** Install crates
#+BEGIN_SRC sh
$ cargo install [crate]
#+END_SRC
** Hello, World ** Hello, World
Executing ~`cargo new foobar`~ creates a new project... Executing ~`cargo new foobar`~ creates a new project...
@ -455,6 +478,7 @@
#+END_SRC #+END_SRC
** Docs ** Docs
- Cargo help: ~cargo --help~ and ~cargo [SUBCOMMAND] --help~
- [[https://doc.rust-lang.org/cargo/index.html][The Cargo Book]] (~$ rustup docs --cargo~) - [[https://doc.rust-lang.org/cargo/index.html][The Cargo Book]] (~$ rustup docs --cargo~)
- Guillaume Gomez: [[https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate][Guide on how to write documentation for a Rust - Guillaume Gomez: [[https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate][Guide on how to write documentation for a Rust
crate]] crate]]
@ -474,8 +498,8 @@
*** @@comment: comment@@ *** @@comment: comment@@
Cargo downloads your Rust package's dependencies, compiles your Cargo downloads your Rust package's dependencies, compiles your
package, makes distributable packages, and uploads them to package, makes distributable packages, and is able to upload them
[[https://crates.io][crates.io]], the Rust community's package registry. to [[https://crates.io][crates.io]], the Rust community's package registry.
** The Rust (package) registry ** The Rust (package) registry