rust-workspaced 0.0.0

Generate .gitignore files from a declarative TOML specification.
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 28.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 20.7 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • elioseverojunior

rust-workspaced

crates.io docs.rs license: MIT OR Apache-2.0

Generate .gitignore files from a declarative TOML specification.

Status

This crate is a name reservation. Version 0.0.0 claims the name on crates.io; it contains no working API and nothing useful to depend on yet.

Please do not add it as a dependency. The version will move off 0.0.0 when there is something real to ship, and this README will say so.

Why

A .gitignore is an append-only pile of patterns. Entries accumulate, nobody remembers which tool needed **/.cargo-vet or whether /target is still load bearing, and the same block gets copy-pasted between repositories where it slowly drifts out of sync.

rust-workspaced treats the file as generated output. Patterns live in TOML with the reasoning attached, grouped into named sections, and the .gitignore is rendered from that — so the source of truth is reviewable and the output is reproducible.

How it works

Describe the sections and rules in rust-workspaced.toml:

version = 1

[[gitignore.section]]
level = 3
name = "Rust"
note = "Cargo Ignores"

[[gitignore.section.rule]]
ignore = ["/target"]

[[gitignore.section.rule]]
note = "Cargo Package"
ignore = ["**/dist"]

[[gitignore.section.rule]]
note = "Cargo Vet"
ignore = ["**/.cargo-vet"]

Which renders to .gitignore:

### Rust
# Cargo Ignores
/target

# Cargo Package
**/dist

# Cargo Vet
**/.cargo-vet

A section's name becomes a heading at the given level, each note becomes the comment introducing its rule, and ignore carries the patterns themselves. Every entry keeps the note explaining why it is there.

Licence

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 licence, shall be dual licensed as above, without any additional terms or conditions.