Skip to content

Conversation

@stayaway245
Copy link

No description provided.

@mentatbot
Copy link

mentatbot bot commented Apr 14, 2025

I'm getting to work. See my steps and track my cost here.

  • Wake on any new activity.
    I always see new activity while actively working. When paused, I'll only respond when tagged unless this box is checked.

@stayaway245 stayaway245 merged commit 57aa4fc into main Apr 14, 2025
1 check failed
Copy link

@mentatbot mentatbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: Use internal Luau headers with compatibility layer for luaL_register

This PR has merged changes to use internal Luau headers directly with a compatibility layer for luaL_register functionality. The changes look well-implemented and address compatibility issues between Lua and Luau APIs.

Key Changes

  1. Build Configuration:

    • Modified .github/workflows/build.yml to use internal Luau headers from the project
    • Removed steps to install external Lua or create custom headers
    • Set environment variables to properly locate internal headers
    • Created CMake finder modules for Lua and LuaFileSystem that point to internal headers
  2. Compatibility Layer:

    • Added a compatibility layer in source/lfs.c that implements luaL_register using Luau's native API
    • Created custom function luau_register that mimics the behavior of Lua's luaL_register
    • Added function remapping for lua_pushcfunction to use Luau's lua_pushcclosurek

Benefits

  • Simplifies the build process by removing external Lua dependencies
  • Makes the codebase more consistent by using the internal Luau headers everywhere
  • Maintains compatibility with code that expects traditional Lua C API functions

The implementation is clean and focused on addressing the specific compatibility issue while making minimal changes to the existing code.

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.

2 participants