Skip to content

umut-sahin/rust-examples

Repository files navigation

Rust Examples

Collection of examples in Rust to show how to get things done in an idiomatic way

Installing

You need to have Rust v1.34.0 or higher installed to run the examples.

Some examples depend on external crates from crates.io, but everything is taken care of by cargo, so you don't need to perform any additional steps. Just clone the repository, using the following commands, and you are good to go.

$ git clone https://github.com/umut-sahin/rust-examples.git
$ cd rust-examples

Building

You can use the following command to build every single example.

$ cargo build --all

Note that with this command cargo will download and compile every additional package for every example. So it may take some time.

Running a specific example

$ cargo run -q --package <example-name>

Also, you can pass arguments like so

$ cargo run -q --package <example-name> -- [arguments...]

Note that there are some examples, which are in the form of a library, therefore, does not come with an executable. For those examples, you may use the test command like so

$ cargo test -q --package <example-name>

Available examples

Changelog

See CHANGELOG.

License

This repository is released under MIT license. Please see LICENSE for details.

Contributing

Contributions are welcome! Please see CONTRIBUTING for guidance.

Authors

See AUTHORS.

About

Collection of examples in Rust to show how to get things done in an idiomatic way

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published