Ben Chuanlong Du's Blog

It is never too late to learn.

Bundle Resource Files into a Rust Application

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. The Rust macro include_str includes a UTF-8 encoded file as a string; the Rust macro include_bytes includes a file as a reference to a byte array. Both of those 2 macros load files into the Rust binary at compile time and consume memory at run time. It might not be a good idea to use them for large files!

Lua Bindings for Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

rlua

rlua is the best one currently.

mlua

mlua provides High level Lua 5.4/5.3/5.2/5.1 (including LuaJIT) and Roblox Luau bindings to Rust with async …