Bridge between Lua world and the .NET (compatible with .NET/UWP/Mac/Linux/Android/iOS/tvOS). NLua is a fork project of LuaInterface (from Fábio Mascarenhas/Craig Presti). You can use/instantiate any .NET class without any previous registration or annotation. NLua runs on top of KeraLua binding, it encodes the string using the ASCII encoding by default. If you want to use UTF-8 encoding, just set the Lua.State.Encoding property to Encoding.UTF8. Calling instance methods: To call instance methods you need to use the : notation, you can call methods from objects passed to Lua or to objects created inside the Lua context. Calling static methods: You can call static methods using only the class name and the . notation from Lua. If you are using Xamarin.iOS you need to Preserve the class you want to use inside NLua, otherwise the Linker will remove the class from final binary if the class is not in use.

Features

  • Evaluate simple expressions
  • Pass raw values to the state
  • Retrieve global values
  • Retrieve Lua functions
  • Pass .NET objects to the state
  • Use .NET assemblies inside Lua

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow NLua

NLua Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of NLua!

Additional Project Details

Operating Systems

Android, Apple iPhone, Linux, Mac

Programming Language

C#

Related Categories

C# Frameworks

Registered

2022-09-15