Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

EventEmitter Example in Rust

[docs]

Ferris the Crab

Installing Rust

Download rustup from https://rustup.rs and run

rustup install stable

Running examples

Run cargo run --example name_of_the_example. E.g.:

cargo run --example example1

Running tests

There are two types of tests that are used in this crate: integration tests (the reside in the tests/ directory) and doc-tests (in Rust, examples in documentation are tests too). Besides these, cargo also supports unit tests, but there aren't any examples of them in this project.

Type

cargo test

to run all the tests of all types that are present in the project.

Building documentation

cargo doc

will build the documentation, and

cargo doc --open

will build it and open it in your browser.

Contributing

Formatting your code using rustfmt-nightly and fixing clippy warnings, if there are any, is much appreciated 🐱

Please note that, at the time of writing, you need a nightly compiler for these:

rustup install nightly
cargo +nightly install rustfmt-nightly clippy

cargo +nightly fmt
cargo +nightly clippy