DEV Community

GoWind Dev
GoWind Dev

Posted on

Porting a Go framework to Rust: 104 crates, 100% safe code, and a machine-verified differential testbed

Part 7 (finale for now) of the GoWind architecture series. We built a building-block framework in Go — core under 500 lines, 130+ plugins — and spent the last six posts on how it carries a 20+ product suite. The obvious question from Rust-fluent readers has always been: does the methodology survive a port to Rust?

RushWind is the answer: a second implementation of the same methodology, and an experiment in how far the idea travels across languages. It is parallel and complementary to GoWind, not a replacement — Go for lightness and AI-generation friendliness, Rust for performance, memory safety, and new protocols.

Same methodology, three keywords

Both families share one methodological core: building-block framework + contract-driven + full-chain code generation.

  • Building blocks — the core does only minimal orchestration (lifecycle), every capability is a pluggable crate. In RushWind: 104 crates across 20 capability domains, protocol stacks and storage engines are not part of the core.
  • Contract-driven — Protobuf is the single source of truth; routes, error mappings, and TypeScript clients are generated at build time, deterministically.
  • Full-chain code generation — the rush CLI generates from entity definitions straight through API, storage, and frontend pages: rush gen entity, rush gen pages, plus rush new for scaffolding and rush adopt to bring existing projects under management.

The rule that buys the most compliance: #![forbid(unsafe_code)]

The entire workspace carries #![forbid(unsafe_code)] — the compiler's strictest prohibition. Not "we tried to avoid unsafe"; unsafe code cannot be written anywhere in the workspace, and safety boundaries are delegated to audited low-level libraries.

For teams with hard audit and compliance requirements, that single rule eliminates an entire class of findings before code review even starts. It's also a design constraint that shapes everything: when you can't drop to unsafe, your abstractions have to actually be good.

What's in the box

Dimension Status
Transport matrix axum / WebSocket / QUIC (quinn) / WebTransport (wtransport) / HTTP/3 / MQTT / SSE
Storage one Repository contract adapting 12 storage engines
Auth 8 authentication engines
Service registry 8 registry engines
Messaging 8 messaging engines
Scripting 5 script engines: Wasm / CEL / Lua / JS / Starlark
QA testkit consistency suite, CI-enforced compliance
Docs 6 in-depth articles + a 13-chapter progressive tutorial in docs/

QUIC/WebTransport/HTTP-3 are why several teams look at RushWind at all: weak-network traversal, low-latency push, and browser-side bidirectional streaming come as ordinary transport crates integrating through the same contract set as axum/WebSocket — no architecture change when you enable them.

The four repositories

Structurally mirroring the GoWind family one to one:

  • rushwind — the building-block core: multi-server lifecycle orchestration (concurrent startup, cascading shutdown, staged time-limited execution)
  • rushwind-toolkit — rush CLI + rush-gen generation kernel + rush-ui (a Tauri 2 desktop shell)
  • rushwind-admin — contract-driven enterprise admin console: all 211 routes generated at build time with zero hand-written glue, Vue3 Vben / Element Plus and React19 Antd frontends plug in unchanged
  • rushwind-cms — Headless CMS in development: one contract generating both REST and tonic gRPC

The part I'm proudest of: machine-verified parity

Porting to a second language usually means the two stacks drift apart silently. RushWind enforces parity mechanically instead:

Differential regression — rushwind-admin takes the Go reference stack as the baseline, automatically sweeps all 211 routes, and runs byte-by-byte differential regression on 93 HEAD requests. Whether the two sides behave identically is verified by machines, not verbal assurances. There's even a rush testbed subcommand dedicated to Go–Rust differential testing.

Frontend assets from the same source — the Rust-side frontends are snapshots of the GoWind-side frontends, keeping UI, interactions, and the permission model consistent.

For teams this means real optionality: deliver business features on the Go side while performance hotspots move to Rust — divided at service granularity, with contracts and frontend assets universal on both sides.

Which one, when?

Your need Pick
AI-assisted generation, fast delivery of business systems GoWind (Go)
Extreme performance, memory safety, QUIC / WebTransport / HTTP/3 RushWind (Rust)
Mixed share contracts + frontend assets, split at service granularity

Both admin products have identical interfaces — try the demos and the difference you'll feel is the language and runtime, not the product.


That closes the series: framework philosophy → YAML assembly → custom plugins → zero-trust networking → pure-Go CDC → offline-first Flutter → Rust.

GoWind: https://www.gowind.cloud · GitHub: https://github.com/tx7do

Top comments (0)