io.popenwith commands like
'uname'can help identify a system. See [LuaRocks cfg.lua] and .
string.dumptherefore can provide information such as endianness,
sizeof(lua_Number), and whether floating point is supported. See [A No-Frills Introduction to the Lua 5.1 VM]. However, not all LuaImplementations implement the standard Lua bytecode format.
Note: some things can be tricky like Cygwin, which is like a *nix emulator on Windows. For portability purposes, Cygwin is mainly considered *nix, but it has some Windows features.