https://github.com/fl03/template-rs
A collection of basic cargo-generate templates for Rust
https://github.com/fl03/template-rs
cargo-generate rust templates
Last synced: about 1 month ago
JSON representation
A collection of basic cargo-generate templates for Rust
- Host: GitHub
- URL: https://github.com/fl03/template-rs
- Owner: FL03
- License: apache-2.0
- Created: 2024-03-07T22:06:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-06T14:17:57.000Z (9 months ago)
- Last Synced: 2025-12-26T17:47:27.156Z (5 months ago)
- Topics: cargo-generate, rust, templates
- Language: Rust
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# {{ project-name }}
[](https://crates.io/crates/{{ project-name }})
[](https://docs.rs/{{ project-name }})
[](LICENSE)
***
_**Warning: The library is currently in the early stages of development and is not yet ready for production use.**_
`{{ project-name }}`
## Features
- [x] `serde` - enables serialization using [`serde`](https://serde.rs/)
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies.{{ project-name }}]
features = []
version = "0.0.x"
```
### Examples
#### _Example #1:_ Basic Usage
```rust
extern crate {{ project-name }};
fn main() -> anyhow::Result<()> {
Ok(())
}
```
## Getting Started
### Prerequisites
Ensure you have the latest version of Rust installed. You can install Rust using [rustup](https://rustup.rs/).
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
After installation, I always recommend ensuring that rustup is updated to the latest version:
```bash
rustup update
```
And to add the latest nightly toolchain, which is often useful for development:
```bash
rustup toolchain install nightly
```
Additionally, you may wish to install the `cargo-binstall` utility to streamline the installation of Rust binaries:
```bash
cargo install cargo-binstall
```
If necessary, add the `wasm32-*` target(s) if you plan to compile for WebAssembly:
```bash
rustup target add wasm32-unknown-unknown wasm32-p1 wasm32-p2
```
### Building from the source
Start by cloning the repository
```bash
git clone https://github.com/{{ alias }}/{{ project-name }}.git -b main --depth 1
```
Then, navigate to the project directory:
```bash
cd {{ project-name }}
```
Once you're in the project directory, you can build the project using `cargo`:
```bash
cargo build --workspace --release --all-features
```
Or, if you want to run the tests, you can use:
```bash
cargo test --workspace --release --all-features
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Please make sure to update tests as appropriate.