Skip to main content

Build and test your first provider

This tutorial creates a Rust WebAssembly provider for an OpenAI-compatible endpoint. You can scaffold, test, and package it without a publisher account.

1. Install the tools

Install Node.js 22 or newer and the Rust toolchain, then install the published CLI:

npm install -g @glixo/glxdev@0.2.0
glxdev version
glxdev doctor

Run glxdev doctor before building. Resolve any missing tool or target it reports. These commands were checked with the npm release 0.2.0 on Windows; use glxdev help to see the flags supported by your installed version.

2. Create a provider

glxdev new --kind llm-provider --language rust --package-id com.example.my-provider --name "My Provider" --publisher example --base-url https://api.example.com/v1 --permission-host api.example.com --output ./my-provider
glxdev check --project ./my-provider

Replace the example URL and host with your provider's endpoint. The permission host must match the endpoint you intend to call. The generated glixo.extension.json describes the component and its requested permissions. Account settings live in schemas/account.json; keep credentials out of source files.

3. Build and test

glxdev build --project ./my-provider
glxdev test --project ./my-provider

The first test run can take longer while Cargo builds the local test host. The compat suite checks description, streaming, permission denial, cancellation, and traps. A passing suite checks the provider contract; also exercise your real endpoint and its authentication separately.

4. Package and verify

glxdev pack --project ./my-provider
glxdev verify --project ./my-provider/dist/package
glxdev publish --project ./my-provider/dist/package --dry-run

verify takes the package directory, not the source project. Check the JSON output's ok and installable fields. An unsigned package can pass integrity verification while remaining non-installable. A dry run lists publishing blockers without uploading a release.

5. Prepare a release

Follow Publishing API to set up your publisher identity and certificate. Rebuild and repeat the tests after changing code, dependencies, permissions, or configuration schemas.

Troubleshooting