glacier-ng 4.0.0

This commit is contained in:
lw-everestlinux committed 2026-10-29 09:15:34 -04:00
commit 0cf4829fa5
159 files changed
+33717

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
-- glacier_ffi.lua
--
-- The test suite's handle on libglacier-ng. A thin wrapper over
-- lib/glacier_cdef.lua, the single source of truth for every ffi.cdef()
-- declaration. This file used to carry its own copy of all of them, and
-- had already drifted (it was missing GL_INSTALL_ERR_SCOPE) — the exact
-- duplication bug CLAUDE.md describes. Don't add declarations here; add
-- them to lib/glacier_cdef.lua.
--
-- Usage:
-- local glacier = require("glacier_ffi")
-- local ctx = glacier.new_context()
-- glacier.lib.gl_init_live_context(ctx, glacier.SCOPE_USR, 1000)
--
-- The combined .so is loaded by glacier_cdef.load(): LIBGLACIER_SO if
-- set, else <project>/lib/glacier/libglacier-ng.so.
-- lib/ lives one level up from tests/, wherever this is run from.
local here = (debug.getinfo(1, "S").source:match("^@(.*/)") or "./")
package.path = here .. "../?.lua;" .. package.path
local ffi = require("ffi")
local cdef = require("lib/glacier_cdef")
local M = {}
for k, v in pairs(cdef) do M[k] = v end
M.ffi = ffi
M.C = ffi.C
M.lib = cdef.load()
return M