Goish: A Rust runtime for Go people

2 months ago by vi21 to c/golang

Goroutines, channels, select!, net/http, and crypto. Go 1.25's runtime idioms, ported ground-up into no_std Rust. Ship a static binary just like Go.

I guess Goish might be hated by many Rust fans and Go fans. Anyway, below is the example taken from its website.

use goish::{go, KB};
use goish::sync::WaitGroup;

#[goish::main]
fn main() {
    let wg = &WaitGroup::new();
    wg.Add(1_000_000);

    for i in 0..1_000_000 {
        // Explicit 2 KiB stack, sub-page allocated from the chunked
        // stackpool - the opt-in for extreme spawn density. Everyday
        // code just writes go!(move || ...) and never sizes a stack.
        go!(stack(2 * KB), move || {
            do_work(i);
            wg.Done();
        });
    }

    wg.Wait();
}
eldavi 1 point 2 months ago

is there one for python or ruby people?

path: 0 25315115, hotness: undefined, score: 1, children: 1
vi21 2 points 2 months ago

I have never seen any. However, Rust itself borrows many things from Python, e.g. self, module system.

path: 0 25315115 25322651, hotness: undefined, score: 2, children: 0
TheBigRoomXXL 1 point 4 hours ago

Not sure I want a vibe-coded (or vibe-ported) SDT library. All of those AI ports seem to have a lot of marketing but not many users, so it’s difficult to get any feedback on their actual quality.

But the mascot is great!

path: 0 26382579, hotness: undefined, score: 1, children: 0
golang
golang

@lemmy.ml

login for more options
1723
89
1

go to feed...