Amanieu / corosensei

A fast and safe implementation of stackful coroutines in Rust
Apache License 2.0
165 stars 11 forks source link

Add support for s390x #16

Open Eragon615 opened 1 year ago

Eragon615 commented 1 year ago

Any chance you could add support for s390x (IBM Mainframe)? Zellij uses you as a dependency, and I do a lot of my job on a mainframe. I did read from the SPARC request that it's not trivial, and it can sometimes be a pain to get access to a mainframe to test on, so I'm not holding my breath, but it'd be cool if you could add it.

Amanieu commented 1 year ago

As with SPARC, the main issue is that the Rust compiler doesn't support inline assembly for s390x: https://doc.rust-lang.org/nightly/unstable-book/language-features/asm-experimental-arch.html

loongs-zhang commented 5 months ago

Hello, I saw s390x is supported now.

Amanieu commented 4 months ago

I'm happy to mentor anyone who is interested in working on a port to s390x. However I am not personally familiar with its assembly syntax. You can probably use the aarch64 port as a reference.

loongs-zhang commented 4 months ago

We can also refer to other useful resources such as https://github.com/boostorg/context/tree/develop/src/asm .BTW, I'm interested in trying it out in my free time.

Amanieu commented 4 months ago

Another useful reference is https://github.com/bytecodealliance/wasmtime/blob/main/crates/fiber/src/unix/s390x.S

Eragon615 commented 4 months ago

I consider myself a journeyman rust programmer, and I was thinking of learning some s390x assembler anyway... I'll look, and if it's not too hard I'll see if I can make it work.

jabir366 commented 3 months ago

Hi @Eragon615 I came from the same path as you, tried building zellij on s390x. I am also intrested in contributing to this