Lua library that generate UUIDs leveraging libuuid.
The uuid/uuid.h
header must be available in the system INCLUDE_PATH
, otherwise you will hit an error like:
ld: library not found for -luuid
…
Failed compiling module lua_uuid.so
- Mac OS X
brew install ossp-uuid
- Debian Linux; Ubuntu
apt-get install uuid-dev
To generate a new UUID string:
local uuid = require "lua_uuid"
local uuid_str = uuid()
print("New UUID: "..uuid_str)