cargo_auto_lib
Library crate for common tasks when building rust projects. Intended for use with cargo-auto.
repo; version: 0.1.15 date: 2021-08-13 authors: Luciano Bestia
Try it
In your rust project root directory (where the Cargo.toml is)
first install cargo-auto and generate a new helper project:
In a new editor open the generated directory automation_tasks_rs
as an independent rust project.
Add to Cargo.toml dependencies:
="0.1.13"
In the beginning of the function task_build()
add:
;
auto_cargo_toml_to_md
No need for cargo build
, because the next cargo auto task_name
will automatically build automation_tasks_rs
.
Go back to your main rust project.
Add markers to the beginning of README.md (don't copy the numbers 1 and 2):
1 2
Run:
With a little luck, it included the data of Cargo.toml into the README.md
inside the markers:
description, repository, version, &utc_now(), authors
function auto_cargo_toml_to_md()
To avoid out of sync data like version, authors and description in the README.md files, auto_cargo_toml_to_md
includes this data from Cargo.toml.
Run it on every build with cargo auto.
It works only for single projects and not for workspaces yet.
It works also with other md files in the project, not only README.md.
In the md file write these markers in markdown comments (invisible),
don't copy the numbers 1 and 2:
1 2
auto_cargo_toml_to_md
deletes the old lines between the markers and includes the cargo.toml data:
description, repository, version, &utc_now(), authors
Run the example:
cargo crev reviews and advisory
We leave in times of danger with supply chain attacks
.
It is recommended to always use cargo-crev
to verify the trustworthiness of each of your dependencies.
Please, spread this info.
You can also read reviews quickly on the web. Example for the crate num-traits
:
https://web.crev.dev/rust-reviews/crate/num-traits/
open-source free and free as a beer
My open-source projects are free and free as a beer (MIT license).
I just love programming.
But I need also to drink. If you find my projects and tutorials helpful, please buy me a beer or two donating on my paypal. You know the price of a beer in your local bar ;-)
So I can drink a free beer for your health :-)
Na zdravje !