Gossamer¶
A garbage-collected, goroutine-powered, fast-compiling systems language with Rust-flavoured syntax and Go-shaped runtime.
- Source on GitHub: danpozmanter/gossamer
- Language spec:
SPEC.md - Project style guide:
GUIDELINES.md - Security policy:
SECURITY.md
Status: pre-stable (version 0.0.0). The public API may change.
Hello, Gossamer¶
fn main() {
println("hello, world")
}
Hello, Goroutines and Channels¶
fn main() {
let (tx, rx) = channel::<i64>()
go fn() { tx.send(40 |> add(2)) }()
println("answer:", rx.recv())
}
Why Gossamer¶
- Ergnomic - Forward pipes, Rust like error handling, minimal magic.
- Efficient - Gossamer runs with minimal impact on memory, and it runs fast.
- Interpreted and Compiled - Develop code quickly with a bytecode vm powered interpreter and a REPL. Ship an optimized compiled single binary.
- Go-style goroutines - (
go expr) with typed channels. - Go-style async - Colorless functions and stackful coroutines.
- Rust-style type system - statically-typed, generics with
trait bounds, pattern-matching,
Option<T>/Result<T, E>. - Garbage-collected - no lifetimes, no borrow checker surface.
- Estensible in Rust - Write libraries in a safe systems language
Where to go next¶
- Install — build from source today, prebuilt binaries coming with the 1.0.0 release.
- Running —
goscheat-sheet. - Syntax — grammar tour with worked examples.
- Memory model — how values, references, and the GC fit together.
- Writing libraries —
project.toml, module layout, publishing. - Standard library — module index.
- Prelude — everything available without imports.
- Toolchain — every subcommand.