lorry::Program::new() .name("spectesta") .author("jakob Neufeld") .version("1.1.0") .gen();
- authors
- version
- name
- dependencies
- edition
- documentation
- readme
- description
It uses a builder pattern api.
When you call gen()
.
It generates the toml and then saves it to disk.
Thanks to toml edit, only the fields that are necessary are changed
- Make a build script
- Add the build_dependencie lorry
- Look at the sample code above
- Paste it into the build script
- run cargo check to generate Cargo.toml
- If you are using vscode with rust- analyzer it works automatically (because rust analyzer runs cargo check every time)
- You can make a dynamic cargo toml, for example, the version is automatically updated with env vars.
- Just because it is cool
- It has IDE completion which helps you write cleaner cargo toml files
Contact me at [email protected] or make an issue on the github repo
Thanks