pulzr-package-sdk
Pulzar open source
pulzr-package-sdk
Build extension modules for the Pulzr platform: code you add to it, run as sandboxed WebAssembly, never as a service of your own.
Gateway support packages
Bring another company's gateway onto the platform: adopted, its devices' readings arriving like any device's.
Carrier drivers
Connect the platform to a cellular carrier's API, within the hosts you declare.
Any language
A small ABI for anything that compiles to WebAssembly, and a Rust crate that hides it.
Tested in the real host
pulzr-pkg test runs your module in the same host the platform runs it in.
A module in Rust
Section titled “A module in Rust”use pulzr_package::{export, Answer, Event, Package};
#[derive(Default)]struct Adapter;
impl Package for Adapter { fn handle(&mut self, event: Event) -> Answer { let mut answer = Answer::default(); if let Event::Message { topic, .. } = event { answer.log_info(format!("heard {topic}")); } answer }}
export!(Adapter);Build, check and test it
Section titled “Build, check and test it”pipx install pulzr-pkgrustup target add wasm32-unknown-unknown
pulzr-pkg new gateway acme-gateway # or: new carrier acme-carriercd acme-gatewaypulzr-pkg build # cargo build for wasm32; the module into dist/, its sha256 into the manifestpulzr-pkg validate # the manifest, the module's digest, imports, exports and limitspulzr-pkg test # tests/*.jsonl through the platform's own hostPackages
Section titled “Packages”| Package | Registry | For |
|---|---|---|
pulzr-package |
crates.io, API docs | writing a module in Rust: cargo add pulzr-package |
pulzr-pkg |
PyPI | the CLI and the host modules are tested in: pipx install pulzr-pkg |
pulzar-net/pulzr-package-sdk |
GitHub Action | building, testing and releasing a module from CI: uses: pulzar-net/pulzr-package-sdk@v0.2.0 |
Build a gateway packageThe manifest, events and answers, tests and releases, with a worked example.
Build a carrier driverWhat a driver may reach, its calls, and testing.
The extension ABIExports, host functions, metering, failure and tenancy.
The GitHub ActionBuild, check, test and release a module from CI.