https://github.com/dalance/sample-rs
https://github.com/dalance/sample-rs
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dalance/sample-rs
- Owner: dalance
- License: mit
- Created: 2016-12-05T15:10:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-17T10:12:25.000Z (about 7 years ago)
- Last Synced: 2025-01-28T13:54:38.104Z (over 1 year ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sample-rs
This is a sample project of [Rust](https://www.rust-lang.org/) for tring full project layout.
## Project layout
The full project layout is the following.
Please see [the official document](http://doc.crates.io/manifest.html#the-project-layout) for the details.
```
▾ src/ # directory containing source files
lib.rs # the main entry point for libraries and packages
main.rs # the main entry point for projects producing executables
▾ bin/ # (optional) directory containing additional executables
*.rs
▾ examples/ # (optional) examples
*.rs
▾ tests/ # (optional) integration tests
*.rs
▾ benches/ # (optional) benchmarks
*.rs
```
## Available `cargo` command
The following commands can be tried.
- `cargo build`
- `cargo run --bin hello`
- `cargo run --bin world`
- `cargo run --example hello_world`
- `cargo test`
- `cargo +nightly bench`
`cargo bench` requires nightly Rust, so you should use `+nightly` option.