Skip to content

The strongest structure in the world with strict rules, powerful automation, and a fantastic Bash tool for building the strongest cremates in Rust.

License

Notifications You must be signed in to change notification settings

yonasBSD/rust-gen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Rust-Gun


logo

⚡ A production-grade Rust workspace blueprint

  • The strongest Rust crate/workspace structure in the world — with a magic CLI tool. 🔥
  • A production-ready CLI that turns any Rust workspace into a clean, repeatable workflow.
  • No scattered scripts.
  • No “how do I run this repo?” confusion. Just one command surface your whole team can use.
  • Simple commands that manage the gates of the most powerful crates in the world.
  • The Bash engine runs on Linux, macOS, and Windows (WSL / Git Bash / MSYS2).

💥 What is Gun?

  • Gun is a battle-tested command center for Rust projects — built with a little ego on purpose. 🫡

  • A world-class crate/workspace scaffolding + CI toolbox. 💯

  • Powered by a seriously strong Bash engine that makes your repo feel like a product from day one.

🤝 What you get:

  • World-class workspace structure — clean, scalable, and copy/paste reusable across projects.

  • Smart diagnosticsdoctor prints OS/tools/Rust/git state in seconds.

  • Tooling autopilotensure validates/installs required tools and cargo utilities.

  • Local CI simulationstable/nightly/msrv + docs + lint + security + UB detectors before you push.

  • Quality & supply-chain gatesclippy, audit, vet, udeps, sanitizers, miri, fuzz, semver, coverage.

  • Performance toolkit — bloat reports, CPU profiling (samply), flamegraphs.


👑 Quick Start:

# Clone this repo

git clone git@github.com:codingmstr/rust-gun.git
cd rust-gun
# Install Gun with your chosen alias/name, placeholders

bash install.sh \
  --alias <Your-Alias> \
  --name <Crate/Workspace-Name> \
  --user <Github-Username> \
  --repo <Github-Repo-Name> \
  --branch <Default-Branch> \
  --description "<Short-Description>" \
  --site <Site-URL> \
  --docs <Docs-URL> \
  --discord <Discord-URL>
gun --help                       # See docs help

gun ensure                       # Ensure tools/crates are installed

gun init <User>/<REPO>           # Link your GitHub repo

gun new <CRATE-NAME>             # create a new crate inside crates/*
                                 # ( now code it ) Build it, tune it, and make it shine.
gun ci-local                     # Run the full CI pipeline locally

gun push --release --changelog   # Push + tag a new release + update CHANGELOG.md

gun doctor                       # Final status check

👌 Result:

  • You ship faster, break less — and your repo becomes a portable Rust factory.
  • A ready-to-use toolchain + a repo that behaves like a real product.
  • Time to stop babysitting automation and focus on writing code — with real protection. 🛡️

🎬 Watch Demo

  • Quick terminal demo (core commands)

  

🏗️ Project Structure

  • This template is a Rust Workspace + Bash Engine.
  • The Rust code lives in crates/, and the brain lives in scripts/.
.
├── .github/                     # GitHub Actions (CI/CD Workflows)
│   ├── workflows/               # ci / fuzz / miri / sanitizer / notify + shared base
│   ├── ISSUE_TEMPLATE/          # GitHub issue templates
│   ├── CODEOWNERS               # Ownership rules
│   └── dependabot.yml           # Dependency updates
│
├── benches/                     # Global benchmarks
├── examples/                    # Runnable examples
├── tests/                       # Workspace integration tests
├── fuzz/                        # Fuzz testing harness + targets
├── bloats/                      # Binary size analysis (reports / scripts / inputs)
├── supply-chain/                # Supply-chain security (cargo-vet data)
├── docs/                        # Documentation + assets
├── templates/                   # Community & legal templates (copied on init)
│
├── crates/                      # Workspace members (The Code)
│   └── demo/                    # Example crate (lib/bin)
│
├── scripts/                     # The Brain (Bash 5+ Engine)
│   ├── run.sh                   # CLI entrypoint
│   ├── install.sh               # Installer entry
│   ├── initial/                 # Bootstrapping + loader
│   ├── core/                    # Core runtime (env/fs/parse/pkg/tool/bash)
│   └── module/                  # Feature modules (cargo / git / observe)
│       ├── cargo/               # CI / lint / safety / perf / crates / meta / doctor
│       ├── git/                 # GitHub / remotes / pushes
│       └── observe/             # Notifications (Slack/Telegram/etc)
│
├── .clippy.toml                 # Clippy policy
├── .codecov.yml                 # Codecov config
├── .prettierrc.yml              # Formatting config (docs/js/markdown if needed)
├── .rustfmt.toml                # Rustfmt config
├── .taplo.toml                  # Taplo (TOML formatter/linter)
├── .gitattributes               # Formatting config (docs/js/markdown if needed)
├── .gitignore                   # Formatting config (docs/js/markdown if needed)
├── deny.toml                    # Cargo-deny policy
├── spellcheck.toml              # Cargo-spellcheck config
├── spellcheck.dic               # Custom dictionary
├── Cross.toml                   # cross / targets
├── Cargo.toml                   # Cargo workspace

⚡ The Command Center (CLI Reference)

  • The gun CLI is your single source of truth.
  • Run gun --help to see the exact command list for your version.
Command Description
gun --help Show usage, available commands, and global flags.
gun doctor System Diagnostics. Detects OS, validates Bash 5+, checks Rust toolchain, Git, and key binaries.
gun ensure Toolchain Manager. Ensures required tools exist (Rust toolchain, cargo tools, linters, formatters).
gun ci-local The Gatekeeper. Runs the local CI pipeline locally. (depend on your version/config — run gun --help.)
gun new Crate Generator. Creates a new crate under crates/ using best-practice defaults.
gun meta Workspace Metadata. Prints workspace/package metadata (useful for automation and scripts).
gun init Link Repository. Initializes Git + connects the workspace to a GitHub remote.
gun remote Remote Manager. Show/add/set remotes and validate the repo link.
gun push Deployment Engine. Runs checks, commits/tags if needed, updates changelog, and pushes to remote.
gun test Runs tests (unit + integration) for the workspace.
gun fuzz Runs fuzz targets under fuzz/fuzz_targets.
gun miri Undefined behavior checking via Miri (nightly).
gun sanitizers Sanitizer runs (nightly, target-specific) [asan/tsan/lsan/msan].
gun bloat Binary size analysis using inputs under bloats/.
gun samply Profiling helper (Linux-first).
gun notify Sends CI/run notifications (Slack/Telegram/Discord/Custom-webhook/etc depending on config).
... See gun --help for moere.

💡 Design idea :

  • Rust workspace = clean, modular crates in crates/
  • Bash engine = a stable CLI surface that orchestrates everything (install, tools, CI-local, safety, perf, git)

🤝 Contributing

  1. Fork the repo.

  2. Run gun doctor to diagnose your system.

  3. Run gun ensure to ensure tools installed.

  4. Run gun ci-local to ensure compliance.

  5. Submit a PR.

                      --->> 🦀 Rust Gun: ship for fun 🦀 <<---

  • 😎 Enjoy Rustations

  • 🤝 Best regards: Coding Master

About

The strongest structure in the world with strict rules, powerful automation, and a fantastic Bash tool for building the strongest cremates in Rust.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.7%
  • Rust 0.3%