Build Once, Run Everywhere: CLI • WASM • Python • Go
A unified Rust template for building native CLIs, WebAssembly modules, Python extensions, and Go bindings from a single codebase.
- 🦀 Cross-platform Rust core
- 🌐 WASM bindings with web integration (Optional)
- 🐍 Python bindings (Optional)
- 🦫 Go bindings (Optional)
- 🚀 GitHub Actions CI pipeline
- 🛠️ Zero-config setup
- 📊 Comprehensive testing
To use this template, you need to install the following tools:
- Mise: Installs and manages Rust, Node, Python, PNPM, and every other tool used by this template.
If you don't have Mise yet, simply run
scripts/dev-setup.shand follow the prompts. - Copier: Generates a new project from this template.
Generate your project:
copier copy gh:asimihsan/copier_rust_template my-awesome-projectChange into your new project directory:
cd my-awesome-project
git init
jj git init --colocateInstall dependencies (Mise will take care of everything):
./scripts/dev-setup.sh # one-time, installs mise if missing
mise install # installs the toolchain versions specified in mise.tomlSet up tools:
mise run setupAdd copyright header:
mise run copyrightBuild and test your project:
mise run ciThe template provides a comprehensive development environment powered by Mise. No manual tool installation required—everything from Rust nightly to WebAssembly toolchains is automatically configured.
Testing & Quality Comprehensive test suites run across all platforms, with coverage tracking and fuzz testing for core components. Automated CI pipelines ensure consistent quality on every commit.
Development Loop Fast iteration with hot reloading for web development,
watch mode for Rust, and automated rebuilds of Python extensions. Commands are
discovered from mise-tasks/, so mise tasks shows the generated workflow
surface directly.
🔧 Cargo, bun, and uv for dependency management
🔍 Clippy and ESLint for static analysis
✨ rustfmt and Prettier keep code clean
📊 Code coverage and performance profiling
Choose your project components when generating from the template:
# Full-featured project (default)
copier copy gh:asimihsan/copier_rust_template my-project
# Core + WebAssembly only
copier copy gh:asimihsan/copier_rust_template my-project \
--data include_python=false \
--data include_go=false
# Core + Python bindings only
copier copy gh:asimihsan/copier_rust_template my-project \
--data include_wasm=false \
--data include_go=false
# Core + Go bindings only
copier copy gh:asimihsan/copier_rust_template my-project \
--data include_wasm=false \
--data include_python=false
# Core functionality only
copier copy gh:asimihsan/copier_rust_template my-project \
--data include_wasm=false \
--data include_python=false \
--data include_go=falseYour generated project will include:
Core Components
crates/core/: Your main Rust library codebasecrates/cli/: Command-line interface implementationCargo.toml&deny.toml: Rust project configuration.rustfmt.toml: Code formatting rulesmise-tasks/: Script-backed developer commands
Optional Components
crates/wasm/: WebAssembly module (wheninclude_wasm=true)web/: TypeScript frontend (wheninclude_wasm=true)crates/python/: Rust extension crate for Python bindings (wheninclude_python=true)python/: Python packaging and tests (wheninclude_python=true)crates/go/: Rust crate for Go bindings (wheninclude_go=true)crates/go-wasm/: Rust crate for Go/WASI bindings (wheninclude_go=true)
Development Environment
mise.toml: Toolchain configuration and common operations.envrc: Automatic environment activation.watchmanconfig: File-watcher ignore defaults carried over fromsheeptext
Run the full rendered-project validation locally:
mise run template:ciIf you want to inspect the rendered project after the run, set OUTPUT_DIR:
OUTPUT_DIR=/tmp/copier-rust-template-check mise run template:ciIf you find issues or have improvements to suggest, please open an issue or submit a pull request.
This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for details.