Our great sponsors
-
Gluon
-
Dyon
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
lua and rust works well. With both the rlua and mlua bindings. There is also a lua vm written in rust: https://github.com/danii/hematita though it is rather early for that.
-
Going for lua also gives you access to multiple other langauges that compile to it. For example typescript to lua project (https://typescripttolua.github.io/ ), a statically typed language that is meant to stay close to lua named teal https://github.com/teal-language/tl and various other languages like moonscript, haxe, etc.
-
I like how wasmCloud does things - they define the interface using smithy like this https://github.com/wasmCloud/interfaces/blob/main/httpserver/httpserver.smithy (in the httpserver interface, the wasm side receives http requests as structs, and replies with responses as structs. The native-code side is responsible for listening on the TCP port etc. There are a bunch of other first-party interfaces, including an httpclient interface, for outgoing requests initiated by wasm). They then generate basic interface code for all supported languages from the smithy definitions. They also hand-write some helper functions, to make things easier on the wasm side (this isn't the same from language to language - there are more helpers for rust than other languages).
-
The native code ("provider") side of the interface also uses the smithy generated code. This lives in a separate repo - https://github.com/wasmCloud/capability-providers/blob/main/httpserver-rs/src/lib.rs .