Goish Rust
Write Rust using Go idioms.
Goish Rust is a Rust crate that ports Go's standard library and built-in syntax to Rust so Go programmers can write Rust code that reads — and feels — like Go. Safety, ownership, and zero-cost abstractions come for free; the call sites stay familiar.
use *;
Install
[]
= "0.15"
Then:
use *;
Three things Goish Rust does well
1. Goroutines and channels
Tokio-backed go!{} spawns a goroutine as a ~200 B async task.
Chan<T> rendezvous and buffered channels look synchronous at the
call site. Proven at 1,000,000 concurrent goroutines
(tests/million_goroutines.rs).
use *;
2. net/http server + client
Backed by hyper 1.x + tokio, with Go's handler signature.
use *;
Client-side, with context-bound deadlines that cancel in-flight requests:
let = WithTimeout;
let = NewRequestWithContext;
let = Do;
3. Testing — line-by-line Go test ports
test! registers a test; Struct! declares a Go-style table entry
type; range! + Rust's for ... in produce a Go-shape
for i, v := range loop. The result reads like a direct port of
Go's *_test.go.
use *;
Struct!
Real Go test files ported as regression fixtures live in tests/ —
e.g. path_test.rs, strings_strings_test.rs, net_netip_test.rs.
934 tests pass.
Documentation
- COOKBOOK.md — Go → Goish Rust translation reference covering every ported package (types, errors, fmt, channels, http, testing, and 40+ others).
- PROGRESS.md — per-package port coverage vs Go 1.25.5.
- docs/scheduler.md — runtime decision (tokio + flume, 1M goroutines).
Design priority
The top priority in Goish Rust is Go idioms and call-site syntax.
If a Go programmer reads a Goish Rust program, it should look like
Go. Rust idioms (Option, Some, &mut, trait-bound generics) live
under the hood. When a Rust idiom has to leak, it is called out
explicitly and a wrapper is designed to minimise it.
License
Dual-licensed under either of:
at your option.