Skip to content

Lua binding #56

@2bndy5

Description

@2bndy5

I found this mlua project which seems to be a painless way to compile rust crate(s) into a lua module. It even supports an async runtime in rust via lua coroutines.

Its been a while since I messed with lua, and I never went as complex as using third-party libraries. I only remember that using nested tables was a horrible way to supplement the language with OOP behavior...

If this idea pans out, then I'll also have to figure out how to document lua API (preferably using mkdocs).

Publishing seems to be a goal of mlua. They provide a dependency (a build backend) on luarocks for compiling rust extensions to lua module(s).

mlua also supports the embedded luau interpreter. However, I'm not sure what exactly this means for embedded devices (like ESP8266-based NodeMCU). Support for luau could probably be made an opt-in feature when compiling the rust source.

As with the other rf24-rs bindings, the lua binding would exclusively target Linux platforms. This is mainly to avoid depending on a platform specific implementation of SPI and GPIO peripherals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions