TASEmulators / TASEmulators/BizHawk
MoonSharp / the future of Lua
Open
Nobody has claimed this yet.
Meta
re: Lua API/scripting
re: Multiplatform
Request: Feature/Enhancement
Tool: Lua Console
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
(going to flesh this out more later the can has been kicked down the road now that Lua works under Mono)
(see existing discussion in https://github.com/TASVideos/BizHawk/issues/971#issuecomment-549660627, #1415, #1422, and #1491, and also in IRC logs if you have them)
options to choose from:
- Lua
- (status quo) NLua w/ same API surface
- MoonSharp w/ same API surface (fully managed, but it's still only up to Lua 5.2)
- or NeoLua, which is similar but with the DLR and, crucially, Lua 5.3 support i.e. integers
- Pluto (fork of Lua 5.4, probably no C# bindings)
- Roblox' Luau w/ same API surface (fork of Lua 5.1 with more or fewer features compared to Lua 5.4, notably no integers or stdlib
io, also I doubt there are C# bindings)- https://github.com/LorettaDevs/Loretta is a managed parser which supports the Luau dialect, need to investigate execution
- some form of Lua w/ new API surface
- C#
- Roslyn embedding is heavy but functional, case study: Space Engineers
- I'll make my own C#, with blackjack and hookers!
- I've considered forking the Roslyn C# compiler to create a new .NET language, but C# is becoming increasingly like my vision with every update. So see above re: embedded C#.
- grug
- New kid on the block, aims to be as embeddable as Lua without all the syntax footguns
- Kotlin
- blocked by either: 1. Xamarin merger finally adding JVM compat to .NET 8+ (and then us moving to .NET 8+), or
- 2. Kotlin compiler getting an MSIL target (unlikely)
- Python (see #1243)
- Python.NET (working, see ext. tools wiki)
- IronPython 3 (maybe dead?)
- IronRuby (dead)
- Rune
- blocked by unfinished C FFI (only Rust hosts can spawn a Rune VM for now)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing discussions in #971, #1415, #1422, and #1491, then compare the Lua, C#, Python, Kotlin, and Rust options listed here. Done means selecting a scripting direction and documenting the resulting API, runtime, and compatibility plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, kotlin, lua, python, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100