fast, versioned buffer with time-travel for luau
| LICENSE | Initial commit | |
| README.md | Update README.md | |
| temporal.luau | Upload files to "/" | |
temporal
fast, versioned buffer with time-travel for luau
Usage
local temporal = require(...)
local state = temporal.new(1024)
local state = temporal.from_buffer(existing_buffer)
temporal.write_u32(state, 0, 12345)
temporal.write_f32(state, 4, 3.14159)
temporal.write_string(state, 8, "hello")
temporal.write_bytes(state, 16, some_buffer)
temporal.fill(state, 32, 64, 0xFF)
local val = temporal.read_u32(state, 0)
local str = temporal.read_string(state, 8, 5)
local buf = temporal.read_bytes(state, 16, 32)
temporal.commit(state)
temporal.seek(state, 50)
temporal.rewind(state, 10)
temporal.fast_forward(state, 5)
temporal.goto_start(state)
temporal.goto_end(state)
local forked = temporal.fork(state)
local snap = temporal.snapshot(state)
temporal.restore(state, snap)
temporal.get_frame(state)
temporal.get_head(state)
temporal.get_size(state)
temporal.stats(state)