lf-lang / lingo

Package manager and build tool for the Lingua Franca coordination language
BSD 2-Clause "Simplified" License
4 stars 1 forks source link

Librarify #50

Open petervdonovan opened 4 months ago

petervdonovan commented 4 months ago

This PR makes it possible to use parts of the Lingo code base in WebAssembly.

This PR is very experimental. It is also quite small, so the stakes are low here, and there isn't a big rush to get this merged.

The changes here are sufficient to a) compile this to WASM without errors, and b) make it easy to get the JSON build properties for a given LF file from JS/TS.

More changes would be required in order to make all of the functionality of Lingo work without panics; this is because apparently the norm in the Rust ecosystem is to panic at runtime when encountering an operation that doesn't support WASM instead of using Cargo features, which would result in compile-time errors.

tanneberger commented 4 months ago

we probably should setup a github action which checks if lingo still can be compiled into wsm