Which scripting languages work well embedded with Rust?

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

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • gluon

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

    Gluon

  • dyon

    A rusty dynamically typed scripting language

    Dyon

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • 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