https://github.com/kong/lua-uuid
Lua library to generate UUIDs leveraging libuuid
https://github.com/kong/lua-uuid
Last synced: 5 months ago
JSON representation
Lua library to generate UUIDs leveraging libuuid
- Host: GitHub
- URL: https://github.com/kong/lua-uuid
- Owner: Kong
- License: mit
- Created: 2015-11-07T05:19:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-02T22:24:25.000Z (over 3 years ago)
- Last Synced: 2025-03-31T18:41:58.712Z (6 months ago)
- Language: Lua
- Size: 7.81 KB
- Stars: 25
- Watchers: 23
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua_uuid
Lua library that generate UUIDs leveraging [libuuid](http://linux.die.net/man/3/libuuid).
## Requirements
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`## Usage
To generate a new UUID string:
```lua
local uuid = require "lua_uuid"
local uuid_str = uuid()print("New UUID: "..uuid_str)
```