atliac-crate-template 0.0.2

A minimal Rust crate template for kickstarting library development
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 6.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 239.12 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Atliac/crate-template
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Atliac

📦 Crate Template

Crates.io Documentation License License Development: Active

A minimal, production-ready Rust template designed to jumpstart library (crate) development. It establishes a workspace-friendly structure and comes pre-configured with automated release pipelines, versioning, and cross-platform distribution.

🚀 How to Use

Developing

  1. Add a new package: cargo new --lib <package-name>
  2. Work on the library: cargo build / cargo test

CI Configuration

The project includes a GitHub Actions workflow for continuous integration. To modify the platforms used for testing (Clippy, tests, and documentation), edit .github/workflows/ci.yml and update the supported_os list:

matrix:
  os: &supported_os [ubuntu-latest, macos-latest, windows-latest]

Publishing

This project uses release-plz to automate updating CHANGELOG.md, bumping versions, tagging Git commits, and publishing to crates.io.

Steps to enable release-plz:

  1. Allow PR Creation: Navigate to https://github.com/<user>/<repo>/settings/actions. Under the Workflow permissions section, check the box for "Allow GitHub Actions to create and approve pull requests".
  2. Configure PAT: Navigate to https://github.com/<user>/<repo>/settings/secrets/actions and add a repository secret named RELEASE_PLZ_TOKEN.
    • This must be a GitHub Personal Access Token (PAT).
    • If using a Fine-grained PAT, grant Contents: Read and write (to push Git tags) and Pull Requests: Read and write (to open release PRs) permissions.
    • If using a Classic PAT, select the repo scope.
  3. Enable release-plz for Your Repository: Update if: github.repository == 'Atliac/crate-template' to if: github.repository == '<your-username>/<your-repo>' in .github/workflows/release-plz.yml.
  4. Publishing to crates.io**:
    1. Enable in Config: Edit release-plz.toml and remove the publish = false lines (or set them to true).
    2. First Publish: Run cargo publish manually from your local machine once. (Crates.io does not allow publishing a brand-new crate via automation).
    3. Trusted Publishing: Follow the crates.io Trusted Publishing guide to link your GitHub repository.

📜 License

This project is dual-licensed under:

You may choose either license at your discretion.

🤝 Contribution

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.