Back to Typelevel
GSoC 2026

Cats Effect & FS2 for Wasm/WASI

The recent efforts of the `scala-wasm` project have made it possible for Scala to use the WebAssembly Component Model binary format as a compilation target. Although, the implementation has not yet been finished, it is already possible for developers to run Scala code on Wasm runtimes. In order for the Scala language to succeed in the Wasm ecosystem, core libraries which rely on platform APIs must be ported to the Wasm/WASI platform. The goal of this project is to prototype porting the core parts of the Cats Effect and FS2 libraries to the Wasm/WASI platform. The CE runtime prototype will be single-threaded and based around `wasi:io/poll`. The end result is expected to be similar to the (now-replaced) single-threaded LLVM runtime which used a `libuv`-style event-loop. The FS2 porting effort is going to focus on `fs2-core` and the `network` and `file` APIs from `fs2-io`. As a part of this project, a standalone reimplementation of java.nio.file API will be developed as a separate library. Planned Deliverables: 1. A working prototype of Cats Effect's single-threaded runtime compiling and running on Wasm/WASI free of glue JavaScript code. This prototype will serve as a basis for an upstream implementation. 2. Prototype port of the core FS2 module and the fs2.io.file and io.network APIs. 3. A standalone library reimplementation of JDK file APIs for WASI. Initial scope of the implementation will be adjusted to the needs of the fs2.io.file port. 4 An extensive documentation of the project. 5. A report regarding implementation details and findings discovered over the course of the project which will help with further porting efforts of Scala compilers and other platform-dependent libraries. 6. Wasm test environment and CI created for this project can upstreamed to sbt-typelevel so that it can be used in other projects.

Project details

Contributor

Mariusz Jakoniuk

Mentors

Not available

Technologies

Not listed in the archive