Commit graph

34 commits

Author SHA1 Message Date
Shiawase
b0eb323392
feat(ffi): add callbacks for memory allocation and debug hooks (#1)
From [lua.h](c51743268b/VM/include/lua.h (L446))

- Added OnAllocate callback to LuaCallbacks struct
- Fixed callback function signatures for UserAtom, DebugInterrupt, and DebugProtectedError
- Updated Callbacks function to correctly map additional debug and allocation callbacks from Luau
2025-04-26 17:51:08 +01:00
749c2ae39d
build: remove redundant not nil check for error 2025-04-26 08:57:18 +01:00
fb8d0c1514
build: make build script more ergonomic
* Moved cloning functionality into its own `cloneSrc` function
* Start writing compiled data into CWD instead of user home dir, in
  order to prevent mangling between projects
* Introduce `LEI_LUAU_SRC` variable to allow users to provide a path to
  an already checked out luau source dir; when not set, a temporary
  directory is created and removed after compilation
* Do not panic if cmake build dir already exists, just skip creating in
  that case
* Automatically set required C includes path for commands
* Added warning to commands if the `.lei` directory is not present in
  the gitignore
2025-04-26 08:50:50 +01:00
d82a23b44c
refactor: rename package internal->ffi & fix compile err
Fixed a compile error to do with passing too many arguments to
`lua_setuserdatametatable` when it only accepts 2.
2025-04-26 08:49:43 +01:00
725efd14f8
refactor: export raw bindings as ffi package 2025-04-26 07:51:49 +01:00
08e1de819f
fix: luau does not export a luaL_errorL, write our own 2025-04-26 07:49:28 +01:00
342c56b4da
chore(pkg): update deps 2025-04-26 07:49:08 +01:00
516d7a4f76
build: fix panics for initial runs and remove def exports 2025-04-26 07:48:36 +01:00
efaccf57ad
feat(build): add cleanbuild system + a touch of color 2024-07-22 19:34:32 +05:30
9088f6188d
fix: glance over lua.h bindings and fix issues 2024-07-22 18:56:04 +05:30
982735a0a4
feat: include open bindings for lauxlib 2024-07-21 12:41:38 +05:30
7c8932710f
feat: complete all lua.h bindings 2024-07-20 17:17:02 +05:30
33572b82ab
chore(build): add todo comment for build script 2024-07-20 14:04:08 +05:30
dd9ee216a8
feat: implement go "useful macro" equivalents for lua.h 2024-07-20 13:55:39 +05:30
e468a36ec7
fix: ptr handling in int conv bindings for lua.h 2024-07-20 13:17:29 +05:30
0884e8d7c0
fix(build): handle args order properly 2024-07-19 22:44:49 +05:30
1ab459e2f9
chore: remove incomplete func call for testing 2024-07-19 22:34:37 +05:30
2829fa5c31
feat: complete lua.h debug bindings 2024-07-19 22:31:54 +05:30
ba0fb22db0
feat: complete lua.h bindings ref system 2024-07-19 20:45:30 +05:30
f8b1807e91
feat: complete lua.h bindings till misc funcs 2024-07-19 20:42:29 +05:30
89ab81e6e7
feat: include more lua.h bindings (50% there!) 2024-07-19 00:00:27 +05:30
1e26c9cac0
fix: just pass C pointers in NewState & PushCClosureK 2024-07-18 22:04:27 +05:30
594added91
chore: remove CGo generated objects 2024-07-18 19:01:26 +05:30
2077850b16
feat: more lua.h bindings & export Go types 2024-07-18 19:00:39 +05:30
983b343315
fix(build): don't hardcode go command in build script 2024-07-18 17:57:44 +05:30
2cd7e2cc45
chore: apply formatting 2024-07-18 17:56:01 +05:30
3983ba60d1
fix: incorrect copy src path 2024-07-18 17:54:38 +05:30
c11af84788
chore: rebrand to 'lei'
Lei refers to a garland of flowers in Hawaiian culture, which seems
fitting since Luau has Hawaiian references as a language too.
2024-07-18 17:47:42 +05:30
41cd6a66a6
feat: include build script for compiling and linking against luau 2024-07-18 17:45:33 +05:30
a0bf86ec76
fix: linking issues, explicitly link against libstdc++ 2024-07-18 16:24:48 +05:30
3e906f1c0e
feat: some more lua.h bindings 2024-07-18 00:25:35 +05:30
a594376f38
fix: convert all C.* arguments to Go types 2024-07-17 23:02:14 +05:30
62a8b35c46
feat: setup proper linking & implement more lauxlib bindings 2024-07-17 21:14:41 +05:30
e17ec038cd
init: initial work on luau bindings 2024-07-17 17:09:44 +05:30