| Crates.io | cargo-generate-minijinja |
| lib.rs | cargo-generate-minijinja |
| version | 0.23.5 |
| created_at | 2025-11-15 12:49:14.090898+00 |
| updated_at | 2025-11-15 12:49:14.090898+00 |
| description | cargo, make me a project - Minijinja-based fork |
| homepage | |
| repository | https://github.com/shellixyz/cargo-generate-minijinja |
| max_upload_size | |
| id | 1934313 |
| size | 517,801 |
cargo, make me a project - Minijinja fork
This is a fork of cargo-generate that uses the Minijinja template engine instead of Liquid.
cargo-generate-minijinja is a developer tool to help you get up and running quickly with a new Rust
project by leveraging a pre-existing git repository as a template.
The main difference is that by default it is using the Minijinja engine with the trim_blocks and lstrip_blocks options turned on which means the lines with "{% %}" tags in files are removed and there is no need to deal with the Liquid style whitespace control to not have double white lines in the output, preserve indentation and stuff.
Example template which needs this fork to be rendered: shellixyz/embassy-stm32-template
cargo install cargo-generate-minijinja
# templates on github
cargo generate-mj --git https://github.com/username-on-github/mytemplate.git
# or just
cargo generate-mj username-on-github/mytemplate
# templates on other git platforms
cargo generate-mj gl:username-on-gitlab/mytemplate # translates to https://gitlab.com/username-on-gitlab/mytemplate.git
cargo generate-mj bb:username-on-bitbucket/mytemplate # translates to https://bitbucket.org/username-on-bitbucket/mytemplate.git
cargo generate-mj sr:username-on-sourcehut/mytemplate # translates to https://git.sr.ht/~username-on-sourcehut/mytemplate (note the tilde)
# this scheme is also available for github
cargo generate-mj gh:username-on-github/mytemplate # translates to https://github.com/username-on-github/mytemplate.git
# for a complete list of arguments and options
cargo generate-mj --help
Licensed under either of
at your option.
This is a community fork of the original cargo-generate project.
The primary difference is that this fork uses Minijinja as the template engine instead of Liquid, offering better
Jinja2 compatibility and improved template functionality. The binary name cargo-generate-mj is invoked as cargo generate-mj
(a cargo subcommand) and distinguishes this variant from the original cargo generate command while maintaining compatibility with existing templates.
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
If you want to contribute to cargo-generate, please read our CONTRIBUTING notes.
cargo-generate would not be what it is today without the wonderful contributions from the community. Thank you!