Rust + Lua - Why & Full Code Examples

Published: 13 December 2024
on channel: Jeremy Chone
13,403
560

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

rust-xp-lua - GitHub Repo - https://github.com/jeremychone-channe...

Why Lua?
Light - only ~300 KB when embedded.
Simple - Thanks to the mlua crate (https://crates.io/crates/mlua), it's a blast to use in Rust programming.
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:

Discord general-rust -   / discord  
Discord rust10x -   / discord  
Twitter -   / jeremychone  

https://britesnow.com - BriteSnow is my enterprise consulting company I have been running for 15 years. We help enterprises build and modernize next-gen applications. Feel free to send an email to jeremy.chone@britensow.com if you have any questions.

Big thanks to CrabNebula (https://crabnebula.dev/) for sponsoring this channel.

== Jeremy Chone Rust Video Playlists:

JC - Rust - Everything Rust Programming - Tutorials, Courses, Tips, Examples:    • JC - Rust - Everything Rust Programming - ...  
JC - Rust & AI Programming:    • JC - Rust & AI Programming  
JC - Software Engineering:    • JC - Software Engineering  
JC - Rust Web App Production Coding Series:    • JC - Rust Production Coding - Web App Series  
JC - Rust For Desktop App:    • JC - Rust Programming for Desktop App  
JC - Rust Programming for Web Development:    • JC - Rust Programming for Web Development  
JC - Rust Courses:    • Rust Course 2021 by the book | RustLang  
JC - Rust for Java Developers:    • Rust for Java Developers  


On this page of the site you can watch the video online Rust + Lua - Why & Full Code Examples with a duration of hours minute second in good quality, which was uploaded by the user Jeremy Chone 13 December 2024, share the link with friends and acquaintances, this video has already been watched 13,403 times on youtube and it was liked by 560 viewers. Enjoy your viewing!