Skip to content

Zucchini v0.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 15:46
· 3 commits to main since this release

Squash, but with a fancy side of Luau's new solver and a touch of dynamicness.

Basic usage:

local player_serdes = zucchini.record {
    position = zucchini.vector,
    health = zucchini.uint8,
    name = zucchini.string,
    poisoned = zucchini.boolean,
    items = zucchini.array {
        zucchini.record {
            count = zucchini.vlq,
            name = zucchini.string,
        },
    },
    inns = zucchini.map { [zucchini.string] = zucchini.boolean },
    equipped = zucchini.opt { zucchini.string },
}

local player = { ... }

local cursor = zucchini.cursor()
serdes.ser(cursor, player)

local player2 = serdes.des(cursor) -- == `player`
local my_data = {
    this = "is some random data",
    which = {
        you = {
            do = "not know anything about",
        },
        some_number = 1234,
    },
    and_it_works = "!",
    catch_them_all = nil,
    and_more = vector.create(12, 64),
}

local cursor = squash.cursor()
zucchini.unknown.ser(cursor, my_data)

local my_data_out = zucchini.unknown.des(cursor) -- == `my_data`

Get it now at pesde or wally!