Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Integrating Lua with Rust - Programming Tutorial and Code Examples

Jeremy Chone via YouTube

Overview

Learn how to integrate Lua with Rust programming through this comprehensive tutorial video that demonstrates code examples across four key chapters. Master the fundamentals of Lua integration starting with simple evaluation and scoping, then advance to bidirectional function calls between Rust and Lua. Explore practical implementations including cargo setup, global scope management, environment configuration, and function execution with arguments. Discover why Lua is an excellent choice for embedding in Rust projects, offering advantages like a tiny 300KB footprint, efficient memory usage, multithreading support, and seamless integration through the mlua crate. Follow along with detailed code demonstrations from basic Lua execution to advanced cross-language function calls, all backed by a complete GitHub repository for reference. Perfect for developers looking to enhance their Rust applications with Lua's powerful scripting capabilities.

Syllabus

- 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
- Thanks

Taught by

Jeremy Chone

Reviews

Start your review of Integrating Lua with Rust - Programming Tutorial and Code Examples

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.