README.md
December 28, 2023 ยท View on GitHub
:lizard: :yo_yo: zig spin
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.
-
Add
spinas a dependency in yourbuild.zig.zon.build.zig.zonexample.{ .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>to12200000000000000000000000000000000000000000000000000000000000000000, and Zig will provide the correct found value in an error message. -
Add
spinas a module in yourbuild.zig.build.zigexampleconst 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.
| Component | Status | Example |
|---|---|---|
| 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
-
wit-bindgen-cli v0.2.0- guest language WIT bindings generator.cargo install --git https://github.com/bytecodealliance/wit-bindgen --rev cb871cf wit-bindgen-cli