{"id":52029392,"url":"https://github.com/tegmentum/sqlite-wit","last_synced_at":"2026-08-01T11:03:50.158Z","repository":{"id":367419177,"uuid":"1266864121","full_name":"tegmentum/sqlite-wit","owner":"tegmentum","description":"Canonical WIT contract for SQLite WebAssembly extensions (sqlite:extension package)","archived":false,"fork":false,"pushed_at":"2026-07-03T11:29:02.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-03T13:22:51.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tegmentum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-12T02:48:41.000Z","updated_at":"2026-07-03T11:29:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tegmentum/sqlite-wit","commit_stats":null,"previous_names":["tegmentum/sqlite-loader-wit","tegmentum/sqlite-wit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tegmentum/sqlite-wit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fsqlite-wit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fsqlite-wit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fsqlite-wit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fsqlite-wit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tegmentum","download_url":"https://codeload.github.com/tegmentum/sqlite-wit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tegmentum%2Fsqlite-wit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36154740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-08-01T11:03:49.635Z","updated_at":"2026-08-01T11:03:50.149Z","avatar_url":"https://github.com/tegmentum.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tegmentum/sqlink\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tegmentum/sqlink/main/sqlink_logo.png\" alt=\"SQLink\" width=\"320\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# sqlite-wit\n\nCanonical WIT contract for SQLite WebAssembly extensions. Defines the interface a `.wasm` extension implements so it can be loaded into a SQLite host — whether that host is native SQLite + a WASM runtime ([`sqlite-wasm-loader`](https://github.com/tegmentum/sqlite-wasm-loader)) or SQLite-compiled-to-WASM ([`sqlite-wasm`](https://github.com/tegmentum/sqlite-wasm)).\n\nVendored into both consumers as a git submodule.\n\n## Package\n\n```\nsqlite:extension@1.0.0\n```\n\n## Files\n\n| File           | Contents                                                              |\n|----------------|-----------------------------------------------------------------------|\n| `types.wit`    | Shared types: `sql-value` (variant), error, enums, records           |\n| `host-spi.wit` | Host-imported SPIs: `spi`, `prepared`, `transaction`, `schema`, `logging`, `config`, `state`, `cache`, `random`, `text`, `hashing`, `encoding` |\n| `guest.wit`    | Guest-exported interfaces: `metadata`, `lifecycle`, `scalar-function`, `aggregate-function`, `collation`, `authorizer`, `update-hook`, `commit-hook` |\n| `world.wit`    | Six capability-graded worlds: `minimal`, `stateful`, `lifecycle-aware`, `authorizing`, `hooked`, `full` |\n\n## Design\n\n**Declarative registration.** Extensions don't imperatively call `register-scalar-function(...)` on the host. They export a single `metadata.describe()` that returns a `manifest` listing every scalar function, aggregate, and collation they provide, with guest-assigned IDs. The host calls `describe()` once after instantiation and wires everything up. The host then dispatches by calling back into the corresponding interface (`scalar-function.call(func-id, args)`, `aggregate-function.step(func-id, context-id, args)`, etc.).\n\n**Variant `sql-value`.** SQL values use the idiomatic component-model `variant`:\n\n```wit\nvariant sql-value {\n    null,\n    integer(s64),\n    real(f64),\n    text(string),\n    blob(list\u003cu8\u003e),\n    wit-value(wit-value-payload),\n}\n```\n\nThe `wit-value` arm (new in `@1.0.0`) carries a canonical-CBOR-encoded WIT record together with a 32-byte `canon:wit` shape hash and a symbolic name. Used by record-typed shim functions; hosts decode via wasm-side imports declared in the manifest's `typed-values` field. See [`MIGRATION-1.0.md`](MIGRATION-1.0.md).\n\n**Capability-graded worlds.** Pick the smallest world that fits the extension. A pure scalar function uses `minimal`. A stateful aggregate uses `stateful`. Mix in `lifecycle`, `authorizer`, or `hooks` as needed. Use `full` only when you genuinely need the kitchen sink.\n\n## Versioning\n\n`@1.0.0` is the first stable contract version. Subsequent breaking changes follow semver: incompatible WIT shape changes bump the MAJOR; additive interface members bump the MINOR. The contract surface — the union of all interfaces and worlds in `wit/` — is what the version covers.\n\nSee [`MIGRATION-1.0.md`](MIGRATION-1.0.md) for the `@0.1.0` → `@1.0.0` upgrade guide.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegmentum%2Fsqlite-wit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftegmentum%2Fsqlite-wit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegmentum%2Fsqlite-wit/lists"}