README.md

December 28, 2023 ยท View on GitHub

:lizard: :yo_yo: zig spin

CI CD DC LC

Zig SDK for the Spin serverless application framework created by the Fermyon team.

:rocket: Usage

WIP! Haven't yet figured out a way to correctly package the library with the Zig package manager.

  1. Add spin as a dependency in your build.zig.zon.

    build.zig.zon example
    .{
        .name = "<name_of_your_package>",
        .version = "<version_of_your_package>",
        .dependencies = .{
            .spin = .{
                .url = "https://github.com/tensorush/zig-spin/archive/<git_tag_or_commit_hash>.tar.gz",
                .hash = "<package_hash>",
            },
        },
    }
    

    Set <package_hash> to 12200000000000000000000000000000000000000000000000000000000000000000, and Zig will provide the correct found value in an error message.

  2. Add spin as a module in your build.zig.

    build.zig example
    const spin = b.dependency("spin", .{});
    exe.addModule("spin", spin.module("spin"));
    exe.linkLibrary(spin.artifact("spin"));
    

:battery: Progress

Legend: :green_circle: - tested, :yellow_circle: - untested, :red_circle: - unimplemented.

ComponentStatusExample
HTTP (outbound):green_circle:Click
HTTP (inbound):green_circle:Click
Redis (outbound):red_circle:Click
Redis (inbound):red_circle:Click
PostgreSQL:red_circle:Click
MySQL:red_circle:Click
SQLite:yellow_circle:Click
Config:green_circle:Click
KVS:red_circle:Click
LLM:red_circle:Click

:arrow_down: Dependencies