Skip to content

Instantly share code, notes, and snippets.

@CryZe
Last active June 14, 2023 08:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CryZe/a7df91f5c7470a5ceb0ffaa02a25abb8 to your computer and use it in GitHub Desktop.
Save CryZe/a7df91f5c7470a5ceb0ffaa02a25abb8 to your computer and use it in GitHub Desktop.
A survey about programming language support for LiveSplit One's Auto Splitting Runtime

Auto Splitting Runtime Support

Supported languages

Rust

  • πŸ‘ Modern language with really good WebAssembly support
  • πŸ‘ Great ecosystem where most crates work perfectly fine in WebAssembly
  • πŸ‘ Easy project setup
  • πŸ‘Ž Ownership and borrowing make things a little harder
  • πŸ‘Ž WebAssembly files are not small by default (you need a bunch of flags, no_std and co.)

C

  • πŸ‘ Good WebAssembly support
  • πŸ‘ What you see is what you get (full control over memory)
  • πŸ‘Ž Not super trivial to set up a project (need WASI or other WASM sysroot and makefiles / CMake)
  • πŸ‘Ž No modern language features

TinyGo

  • πŸ‘ Easy language
  • πŸ‘ Small WebAssembly files by default
  • πŸ‘Ž Requires WASI (only a single import for writing an abort message though, could easily be snipped)
  • πŸ‘Ž Project setup is absurd (GOROOT, GOPATH, go.mod, ...)
  • πŸ‘Ž Huge compiler toolchain (2 GiB)

AssemblyScript

  • πŸ‘ Easy language (TypeScript, though with a few semantic differences)
  • πŸ‘ Very small WebAssembly files by default
  • πŸ‘ Easy project setup
  • πŸ‘Ž Limited and unclear limitations compared to real TypeScript
  • πŸ‘Ž Toxic maintainers (project may even be half abandoned)

Interpreted languages (WIP support)

TypeScript / JavaScript

  • πŸ‘ Easy language
  • πŸ‘ Easy project setup
  • πŸ‘Ž Slow due to being interpreted
  • πŸ‘Ž The default number type is unsuitable for addresses (floating point)

Not yet supported languages

Go

Early WASI support with no custom imports or exports yet.

C#

Early WASI support with no custom imports or exports yet.

Dart

Requires unfinished WASM proposals such as WASM GC that our runtime doesn't support yet. Freestanding support is somewhat unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment