Rust + Lua - Why & Full Code Examples

preview_player
Показать описание
Lua with Rust programming! Why and How!F
ull code example in 4 chapters: simple eval, scope, Rust calls a Lua function, and Lua calls a Rust function.

- 00:00 - c00 - Intro
- 00:36 - c01 - Cargo Toml & Setup
- 01:43 - c01 - First Lua exec & eval
- 05:03 - c02 - Scope - Globals
- 07:14 - c02 - Scope - set_environment
- 09:41 - c03 - call lua fn - why
- 11:27 - c03 - call lua fn - load Lua function
- 13:11 - c03 - call lua fn - calling
- 14:58 - c03 - call lua fn - with args
- 16:23 - c04 - Lua calls Rust Functions
- 21:52 Thanks

*Why Lua?*
- Light - only ~300 KB when embedded.
- Efficient - Small Memory footprint, fast.
- Powerful - Supports multithreading, async, and ergonomic APIs for Rust integration.
- Designed for embeddability, making it efficient, simple, and battle-tested for scripting needs.

== Jeremy Chone:

== Jeremy Chone Rust Video Playlists:

Рекомендации по теме
Комментарии
Автор

Nice video! Luau is a more modern version of Lua (has typings, faster, etc) that's also supported by mlua. Definitely a great thing to consider for those looking at this space!

camwoo
Автор

Wow, I am really motivated to bring Lua scripting into my projects now. Thanks for the excellent demonstration. Please keep making videos!

Galakyllz
Автор

Wow thank you, I was asking myself how I could embedd lua scripts with Rust ! This is all I needed to know ! I want to integrate teal script (that will compile to lua) so people could have a typed scripting language. Thanks again !

fabricehategekimana
Автор

Thank you very useful. I always wanted to someday add lua to my game engine and I now understand the workflow.

letronix
Автор

I think that embedding WASM would be a great choice as well. It's sandboxed, fast, lightweight and it can be compiled from many languages (e.g. C++ or Rust).

cno
Автор

Nice!
We need to get full python interface eventually.
I know we can do it via this type of way, but make it able to be python only by embedding this functionality into the engine.
We need to draw that crowd - python is massive now.

jeffg
Автор

Hello sir I completed your rust book programming playlist.... I'm from embedded c background, how can I use Rust programming in Embedded devices like ESP32 microcontrollers...does rust programming support popular microcontrollers...please make videos on how to use in microcontrollers...thanks for knowledge your sharing....your videos are really valuable information ❤.

GouthamGunasekaran
Автор

Lua is a Brazilian language. It means moon

ricardorochadev
Автор

interesting. unrelated, have you ever used nifs with elixir and rust? a crate called rustler that's very interesting

eyz-
Автор

I wonder if javascript can be embedded like that or if it's just too "big and all powerful".

danser_theplayer
Автор

C++ + Go is much better than Rust + Lua

surplusking