Repository navigation
v0.57
·
27 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Sabine 0.57
- Sabine writes a TypeScript client for an app's bridge commands and events, so the page and the
app share one contract instead of copies kept in step by hand. Commands registered with
bridge_typedorbridge_typed_async, and events declared with the newbridge_event, go into
the file[bindings] pathnames inSabine.toml, ascommandsandeventswith the app's own
types. Each type reads as the app sends it, and params as the app accepts them.bridge_type
adds a type no command or event names, so shared page packages can have bindings too. bridge_typedandbridge_typed_asyncneed params and results that derivespecta::Type, next
to serde's derives. Addspecta = { version = "=2.0.0-rc.27", features = ["derive"] }to the
app's dependencies.sabine bindingswrites the file,sabine bindings --checkfails when it is out of date, for CI,
andsabine devrewrites it before it starts the page. New apps fromsabine newcall their
commands through it.- Events declared as
BridgeEvent<T>are sent withBridgeEventEmitter::send, and bytes events,
BridgeEvent<Bytes>, withsend_bytes.