https://github.com/solareenlo/rust_by_example
Rust by Example
https://github.com/solareenlo/rust_by_example
example rust
Last synced: 4 months ago
JSON representation
Rust by Example
- Host: GitHub
- URL: https://github.com/solareenlo/rust_by_example
- Owner: solareenlo
- Created: 2021-09-09T08:10:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-15T19:15:45.000Z (over 3 years ago)
- Last Synced: 2024-12-30T09:15:29.946Z (5 months ago)
- Topics: example, rust
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust_by_example
## Usage
```shell
rustc -o a.out 01_Hello-World.rs
./a.out# Create a library
rustc --crate-type=lib 63_Crates-Creating-a-Library.rs
ls lib*# Using a library
rustc 64_Crates-Using-a-Library.rs --extern rary=lib63_Crates-Creating_a_Library.rlib --edition=2018 -o a.out
./a.tou# Using attribute
rustc 66_Attributes-Crates.rs
ls lib*# Using attribute flag
rustc -o a.out --cfg some_condition 68_Attributes-Custom.rs
./a.tou# Valgrind
rustc -o a.out 82_Scoping-rules_RAII.rs
valgrind --leak-check=full --show-leak-kinds=all ./a.out
```## References
- [17 Resources to Help You Learn Rust in 2021](https://serokell.io/blog/learn-rust)
- [Rust by Example](https://doc.rust-lang.org/rust-by-example/)
- [Rust by Example 日本語版](https://doc.rust-jp.rs/rust-by-example-ja/)
- [Rustの日本語ドキュメント/Japanese Docs for Rust](https://doc.rust-jp.rs/)