add os detection for lib loading

This commit is contained in:
Redo 2022-11-05 12:27:47 -06:00
parent 7829193f1f
commit a6cc4bbea8

View File

@ -8,7 +8,12 @@ ffi.cdef [[
void sim_update_nets();
void sim_update_gates();
]]
local csim = ffi.load("./compiled_sim")
local csim
if jit.os=="Windows" then
csim = ffi.load("./compiled_sim.dll")
else
csim = ffi.load("./compiled_sim.so")
end
Simulation = {}