Skip to content

Full Scala.js support #1263

@vigoo

Description

@vigoo

There is already a proof of concept attempt to support developing Golem components using Scala by compiling to Scala.js first and then use the jco/componentize-js toolchain to package the result into a WASM component.

The current binding generator does not properly map all WIT features to Scala.js (does not support imports, resources, and incorrectly maps some other types).

The goal of this ticket is to have a real scalajs binding generator, built on top of wit-bindgen (and ready to merge upstream if they want to accept it) that supports everything that WIT and Golem supports, with tests, and integrate it into a new version of sbt-wasm-component.

Improvement of the "scala to wit" macro is out of scope but the existing version should continue to work at least as good as was.

By completing this ticket, it should be possible to use any feature of Golem from Scala(.js) and to start building helper libraries to wrap low-level WIT APIs such as wasi-http into idiomatic Scala APIs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions