Everything the scripting API leaves out
Over forty modules, documented with examples and typed for the Lua Language Server and Nebra.
Crypto and security
Hashing, Argon2 passwords, AES and ChaCha encryption, signatures, JWT and one time passwords.
- Crypto
Networking
HTTP servers with routing, WebSockets, TCP and UDP sockets, Redis, MQTT and NATS.
- HTTP
- WebSocket
- TCP
- UDP
- Redis
- MQTT
- NATS
Data and formats
JSON, TOML, YAML, MessagePack, CBOR, XML, CSV, compression and archives in memory.
- JSON
- YAML
- CSV
- Compression
- Zip
- Buffer
Native computation
Pathfinding, spatial queries, procedural generation, images and real parallel Lua in workers.
- Pathfinding
- Spatial
- ProcGen
- Image
- Worker
Math and randomness
Quaternions, curves, statistics, safe formulas, geometry, big integers, decimals and seeded noise.
- Math
- Geometry
- BigInt
- Decimal
- Random
Text, time and tooling
Regex, templates, word filters, time zones and cron, translations, caches, metrics and tests.
- Regex
- Template
- Time
- Locale
- Cache
- Testing
Off the game thread
Heavy work runs on native worker threads. Results come back as callbacks, promises or awaits, without stalling the tick.
Safe by default
Linear time regex for player input, sandboxed workers, network allow lists and errors with the script location.
Free when unused
Modules are built on first access. Leave entire modules out at compile time with Cargo features.
Await native work
local Crypto = Quark.Import("Crypto")
Player.Subscribe("Spawn", function(player)
Quark.Async(function()
local hash = Quark.Await(Crypto.Argon2Hash, "secret")
Console.Log("stored " .. hash)
end)
end)
Serve HTTP from the game server
local server = Quark.HTTP.Listen(8080)
server:Get("/players", function(request, response)
local names = {}
for _, player in ipairs(Player.GetAll()) do
table.insert(names, player:GetName())
end
response:Json(names)
end)
Add Quark to your server
Copy the package, require it and start the server with unsafe libraries enabled.
Installation guide