Skip to content

Replace hlua with piccolo in luascad for WASM compatibility#9

Merged
hmeyer merged 1 commit intomainfrom
switch-luascad-to-piccolo
Mar 15, 2026
Merged

Replace hlua with piccolo in luascad for WASM compatibility#9
hmeyer merged 1 commit intomainfrom
switch-luascad-to-piccolo

Conversation

@hmeyer
Copy link
Owner

@hmeyer hmeyer commented Mar 15, 2026

Summary

  • Swaps hlua (Lua 5.2 C bindings, not WASM-compatible) for piccolo 0.3 (pure-Rust stackless Lua VM)
  • Consolidates lobject.rs, lobject_vector.rs, printbuffer.rs, sandbox.rs into a single luascad.rs
  • LObject stored as piccolo static UserData with a shared methods metatable (translate/rotate/scale/clone)
  • Sandbox via Lua::core() — loads base/coroutine/math/string/table, no I/O, no require, no load, no dofile
  • print and build capture via Arc<Mutex<_>> instead of mpsc channels
  • All 31 integration tests pass unchanged

Test plan

  • CI passes (cargo build --workspace + cargo test --workspace)
  • All 31 luascad integration tests green

🤖 Generated with Claude Code

- Swap hlua (Lua 5.2 C bindings) for piccolo 0.3 (pure-Rust Lua VM)
- Consolidate lobject, lobject_vector, printbuffer, sandbox into luascad.rs
- LObject stored as static piccolo UserData with shared methods metatable
- Sandbox via Lua::core() (base/coroutine/math/string/table, no I/O)
- print/build capture via Arc<Mutex<_>> instead of mpsc channels
- All 31 integration tests pass unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hmeyer hmeyer merged commit aa95163 into main Mar 15, 2026
1 check passed
@hmeyer hmeyer deleted the switch-luascad-to-piccolo branch March 16, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant