blob: 51142b3da34e7ae8dcaf666a47cdb494ee171e47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# 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)
```
|