5 unstable releases
0.3.0 | Nov 21, 2024 |
---|---|
0.2.0 | Nov 18, 2024 |
0.1.2 | Nov 17, 2024 |
0.1.1 | Nov 17, 2024 |
0.1.0 | Nov 17, 2024 |
#76 in Cargo plugins
390 downloads per month
235KB
155 lines
🍷 cargo-sample
A Cargo tool for bootstrapping new projects from repository examples. Always sample before you try.
🧑🔧 Installation
cargo install cargo-sample
💡 Usage
Create a new project based on an example from any cargo package that has a repo with examples
e.g.
mkdir demo-folder && cd demo-folder
cargo sample axum
----- or ------------
cargo sample axum demo-folder
This will:
- Figure out the latest syable release of the crate
- Clone the repository to a temporary folder, checkout the proper branch
- Find the examples in the
examples/
directory - Prompt you to select an example
- Create a new project with the example's content on the demo folder
📈 TODO
- search for examples everywhere in the repo
- replace local dependencies in toml of examples for crates io dependencies
- allow sampling on already existing dir, kind of importing an example to my local project
Dependencies
~15–29MB
~449K SLoC