r/Compilers • u/DanManPanther • Jun 11 '26
Gossamer - Rust/F# on a Go like Engine
I wrote Gossamer (github) to scratch an itch of mine. I wanted a language that compiled quickly down to a small binary with concurrency like Go, syntax, ADTs, pattern matching, error handling, and syntax more like Rust, with forward piping from F#.
I wanted to run it via interpreter with Python like performance, or compile it to get performance closer to Go or Rust.
Very much still in progress, but it feels like I'm getting closer.
53
Upvotes







7
u/birdbrainswagtrain Jun 11 '26
Congratulations, looks pretty impressive!
5
u/AustinVelonaut Jun 11 '26
Looks very nice! How long have you been working on it? Does the typechecker use Hindley-Milner algorithm-W, bidirectional, or some other algorithm? I see you are doing a number of optimization passes on the MIR, including inlining. One thing you might add to your constant folding is folding of a binary operator where one of the operands is constant identity operand (e.g.
0for+,0or1for*, etc.) -- I've found that they do occur about as often as a binary operation on two constants.Good luck with your continued development!
2
u/Alvaroms25 Jun 11 '26
are the benchmark codes public? I'd like to see the comparisons
2
u/therealdivs1210 Jun 13 '26
I've been working towards something like this myself. Nice work!