Skip to content

Instantly share code, notes, and snippets.

@ifiokjr
Last active November 16, 2021 19:23
Show Gist options
  • Save ifiokjr/15847afaa76c312fdbea7ae53226a8b3 to your computer and use it in GitHub Desktop.
Save ifiokjr/15847afaa76c312fdbea7ae53226a8b3 to your computer and use it in GitHub Desktop.
learning rust

Running example code in cargo crates

The structure of crates is quite handy.

Here it describes how the examples folder can be used to run example code.

This can be added to the Cargo.toml file as follows:

[[example]]
name = "play"
path = "examples/play.rs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment