luau - Rust bindings to Roblox's Luau

Overview

luau - Rust bindings to Roblox's Luau

This library is an interface between Rust and Luau. It aims to be easy-to-use, fast, and safe (kind of like rlua). It also aims to support Luau-specific features first-class, such as:

  • types and analysis
  • multiple VMs on different threads (Parallel Luau)
  • thread-specific userdata support (for security identities and such)
  • async/await support for yieldable calls and yielding from C functions
  • very fast namecall
  • sandboxing, readonly and other safety features

!! WIP ALERT !!

This library is a heavy work-in-progress - that is, almost none of the features listed above are actually functional at the moment. However, the fundamental pieces are in place - luau-sys is available and aims to provide a safe C API for interfacing with all of Luau, including the C++ parts.

Check out the README.md for luau-sys for more information on how it works. The raw bindings are consumed by luau, which smooths over the raw C interface with modern Rust types and safety. Most work on this repository will be working with the "glue", as that's what dictates what functionality is available for Rust to call into (by doing C++ stuff and then translating that to pure C types).

The rest of the work will be consumer-facing API design of the luau crate that consumes luau-sys - probably taking heavy inspiration from rlua. Once the crate is actually usable for creating Luau VMs, compiling code for them, and executing it inside, all from Safe Rust, it may be published to Crates.io if the API design is good enough.

For now, most of the code in the luau crate is just a proof-of-concept and will be iterated upon and improved over time. What you see is most likely not what will make it into the 0.1 release. I'm always open to feedback, suggestions, and pull requests.

Contributing

Make sure to read CONTRIBUTING.md for general guidelines on questions, bug reports and contributions.

License

Copyright (C) 2021 LoganDark

This program is free software: you can redistribute it and/or modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

You might also like...
Rust - Python bindings

rust-cpython Rust bindings for the python interpreter. Documentation Cargo package: cpython Copyright (c) 2015-2020 Daniel Grunwald. Rust-cpython is l

Rust bindings for the Python interpreter

PyO3 Rust bindings for Python. This includes running and interacting with Python code from a Rust binary, as well as writing native Python modules. Us

Safe Rust --- GraalVM Polyglot bindings using procedural macros

The class macro is the primary way to generate bindings to Java types; it will generate a struct (with generics if specified) that implements Pass and Receive and has all the methods you give stubs for. The methods generated can be used like normal rust methods, however mutability is not enforced. The fully-qualified type name should precede a block containing method and constructor stubs. Java primitives like char, int, and byte are aliased to corresponding Rust types.

Rust bindings for accessing the Go containers/image stack

Rust bindings for accessing the Go containers/image stack This crate contains a Rust API that forks /usr/bin/skopeo and talks to it via a custom API.

Rust bindings for accessing the Go containers/image stack

Rust bindings for accessing the Go containers/image stack This crate contains a Rust API that forks /usr/bin/skopeo and talks to it via a custom API.

Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings

rusty_pi Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings. Time of 100M iterations approximation on Core i7 10th gen:

React bindings for rust

react-sys Rust bindings for React. WIP This crate is NOT ready for production and is under heavy development. This crate intends to be used by frender

Rust Blake hash bindings for Node.js.

@napi-rs/blake-hash Node.js binding for https://github.com/BLAKE3-team/BLAKE3. High performance, and no postinstall scripts. Support matrix node12 nod

(WIP) Rust bindings to QuickJS

(WIP) rusty_qjs Rust bindings to QuickJS. Todo JSValue::new_... returns a Result specific JSValue type, like JsString, JsNumber...? catch unwind for e

Owner
LoganDark
Former CTO of Allotrope Labs
LoganDark
Rust based WASM/JS bindings for ur-rust

ur-wasm-js WASM/JS bindings for the ur-rust rust library Getting started Installation Either build the library yourself with wasm-pack or install for

Lightning Digital Entertainment 5 Feb 28, 2024
A project for generating C bindings from Rust code

cbindgen   Read the full user docs here! cbindgen creates C/C++11 headers for Rust libraries which expose a public C API. While you could do this by h

Ryan Hunt 1.7k Jan 3, 2023
Automatically generates Rust FFI bindings to C (and some C++) libraries.

bindgen bindgen automatically generates Rust FFI bindings to C (and some C++) libraries. For example, given the C header doggo.h: typedef struct Doggo

The Rust Programming Language 3.2k Jan 4, 2023
Rust-JDBC bindings

jdbc A Rust library that allows you to use JDBC and JDBC drivers. Usage First, add the following to your Cargo.toml: [dependencies] jdbc = "0.1" Next,

Aurora 18 Feb 9, 2022
Lua 5.3 bindings for Rust

rust-lua53 Aims to be complete Rust bindings for Lua 5.3 and beyond. Currently, master is tracking Lua 5.3.3. Requires a Unix-like environment. On Win

J.C. Moyer 150 Dec 14, 2022
Safe Rust bindings to Lua 5.1

rust-lua Copyright 2014 Lily Ballard Description This is a set of Rust bindings to Lua 5.1. The goal is to provide a (relatively) safe interface to Lu

Lily Ballard 124 Jan 5, 2023
mruby safe bindings for Rust

mrusty. mruby safe bindings for Rust mrusty lets you: run Ruby 1.9 files with a very restricted API (without having to install Ruby) reflect Rust stru

Anima 200 Oct 12, 2022
Rust bindings for writing safe and fast native Node.js modules.

Rust bindings for writing safe and fast native Node.js modules. Getting started Once you have the platform dependencies installed, getting started is

The Neon Project 7k Jan 4, 2023
Objective-C Runtime bindings and wrapper for Rust.

Objective-C Runtime bindings and wrapper for Rust. Documentation: http://ssheldon.github.io/rust-objc/objc/ Crate: https://crates.io/crates/objc Messa

Steven Sheldon 336 Jan 2, 2023
High-level Rust bindings to Perl XS API

Perl XS for Rust High-level Rust bindings to Perl XS API. Example xs! { package Array::Sum; sub sum_array(ctx, array: AV) { array.iter().map(|

Vickenty Fesunov 59 Oct 6, 2022