Which scripting languages work well embedded with Rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SaaSHub - Software Alternatives and Reviews
  • gluon

    A static, type inferred and embeddable language written in Rust.


  • dyon

    A rusty dynamically typed scripting language


  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

  • hematita

    A memory safe Lua interpreter

    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.

  • tl

    The compiler for Teal, a typed dialect of Lua

    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.

  • interfaces

    wasmCloud API interfaces: smithy IDLs and shared libraries (by wasmCloud)

    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).

  • capability-providers

    wasmCloud official capability providers

    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 .

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts