← Back to context

Comment by unleaded

1 year ago

This gets mentioned a lot but has it been used in practice? How would you pass objects and methods etc to the scripting language? Autogenerated C headers?

To be able to use WASM-compiled languages for embedding you first need a small WASM runtime you can depend on (and things like ref types, GC etc which have been standardized only in the last couple of years).

That didn't exist until recently, but now you can use https://github.com/bytecodealliance/wasm-micro-runtime/blob/...

I am not aware of anyone using this yet, but I hope to see that become common in the next few years.

The WebAssembly component model is aimed at having composable components that can call each other. The components can be written in any language, compiled to WebAssembly, and interoperate: https://github.com/WebAssembly/component-model/

Extism is a plugin framework for WebAssembly:

https://extism.org/

https://github.com/extism/extism

Postgres and Extism: https://dylibso.com/blog/pg-extism/

Wasm plugins for Zellij: https://zellij.dev/documentation/plugins

Visual Studio Code can run WebAssembly extensions: https://code.visualstudio.com/blogs/2024/05/08/wasm

A project to bring WebAssembly plugins to Godot: https://github.com/ashtonmeuser/godot-wasm

WasmEdge can be embedded in applications: https://wasmedge.org/docs/embed/overview

Wasmer can be embedded in applications: https://blog.wasmer.io/executing-webassembly-in-your-rust-ap...

Wasmtime can be embedded in applications: https://docs.wasmtime.dev/lang.html