58 lines
1.8 KiB
Markdown
Raw Normal View History

2025-07-02 23:10:50 +02:00
# `${REPO_NAME_KEBAB}`
A Rust library template powered by a reproducible Nix development environment.
## Features
* **Reproducible Builds**: Powered by a `devenv` Nix environment to ensure everyone uses the exact same tools and dependencies.
* **Ready to Use**: Just clone and run `devenv up`.
* **Sensible Defaults**: Comes with basic example code, tests, and a pre-configured `.gitignore`.
* **Gitea/GitHub Ready**: Includes placeholders for repository-specific values.
## Requirements
* [Nix](https://nixos.org/download.html)
* [devenv](https://devenv.sh/getting-started/)
* [direnv](https://direnv.net/docs/installation.html) (Recommended)
## Usage
1. **Clone the repository:**
```bash
git clone <your-repo-url>
cd ${REPO_NAME_KEBAB}
```
2. **Activate the development environment:**
If you have `direnv` installed and enabled, the environment will be activated automatically when you enter the directory. Just run:
```bash
direnv allow
```
Alternatively, you can start the environment manually:
```bash
devenv up
```
This command will download all dependencies and start any defined services. To just enter a shell with the tools available, run `devenv shell`.
3. **Build and Test:**
This template uses `just` as a command runner. The following commands are available:
* `just build`: Build the project.
* `just test`: Run tests.
* `just lint`: Check for formatting and style issues.
* `just deny`: Run `cargo-deny` to check for vulnerabilities.
You can also use standard Cargo commands directly:
```bash
cargo build
cargo test
cargo clippy
cargo check
```
## License
This project is licensed under the GPL-3.0-or-later. See the [LICENSE](LICENSE.md) file for details.