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
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • gluon

    A static, type inferred and embeddable language written in Rust. (by gluon-lang)

    Gluon

  • dyon

    A rusty dynamically typed scripting language

    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.

  • 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