Repository navigation
rutis v0.19.1
rutis 0.19.1
0.19.1 fixes the places where the 0.19.0 developer-experience evaluation (#663) found that what the documentation says does not work, and adds the three Rust APIs Dim needs to upgrade to 0.19. Plugin code and rutis.json stay as they are; the "Behaviour changes" section lists every difference you can see.
Hosts
- A
reconcileafterready()always loads the runtimes' rows (#934, #945). A host following Build a host open to plugins, waiting forRuntimeHandle::ready()and then callingreconcile, sometimes found a Node runtime's row still atwaiting for runtime <name>afterreconcilereturned, and could not find its services then. Now, whenreconcilereturns, every row is running or listed infailures; the same holds for hosts that do not callfollow_row. After a runtime restarts (restart(), once the new process'sready()returns), its rows load again by themselves at once, withoutLoader::reload; while the loader is doing another operation (for example areconcilethat has not returned), they wait for it to end. 0.19.0 already did this; section 3 of the guide now says so. - A runtime plugin is starting from when it is made (#964). A host following the guide mounts its runtime with
root.plugin(runtime)(not awaited) and then awaitsRuntimeHandle::ready(): on a busy machine, beforeSpawnPlugin'sapplybegan, its state wasIdle,ready()returnedNoneat once, and the host took the runtime for one that failed to start. Now it isStartingfromSpawnPlugin::new, andready()waits for the start to end;Idlemeans stopped only. The start count (RuntimeHandle::starts) counts once on coming intoStarting, not again whenapplybegins. - The synchronous waterfall is back, as
ctx.waterfall(event).sync(terminal)(#946, #947). 0.19.0 removedwaterfall_sync, and the replacements the migration guide gave (the asynchronouswaterfall, the synchronousbail) cannot chain synchronous middleware. Now the samewaterfallends with.sync(terminal)and runs to the end synchronously: listeners registered withon_synccallnextas before; asynchronous listeners registered withon, and listeners in another process, fail withAsyncListener(listener of t/draft in row chat, in another process, is asynchronous and cannot run in a synchronous waterfall). The terminal must beSend. Thewaterfall_sync(event, terminal)of 0.17 / 0.18 becomeswaterfall(event).sync(terminal); the table in migrating to 0.19 is updated. Loader::instance_rows(instance)(#941, #960): the rows running in an instance now, as(row id, FiberView), nested instances included, the instance's own group not; in configuration and creation order; empty when the instance was removed or does not exist. It reads the current state each time and does not build configuration and Schema for every row (before, the only way was to take everything fromentries()and filter).- Copies of plugin definitions from other languages mount in the host's own instances (#948, #961).
Definition::atworks out the instance a copy is in from the plugin's place in the tree, and no longer requires a loader instance. A host mounts an ordinary plugin withctx.plugin, callsctx.mark_scope("session")in it, and declares as before withServiceCatalog::register_shared_instancewhich group a name belongs to; the copy then resolves to the services in that instance.mark_scopemoves fromrutis::internalto a public method ofCtx, with the same name and behaviour. Copies in loader instances do not change.
rutis-host
run/devcheck a row's configuration against the plugin's Schema at start, ascheckand reloading while running do. Before, a configurationcheckrefused started all the same withrun, and the plugin got the wrong value; now the row fails at start:greeter: config: greeting should be a string, got 3.- Python plugins
addinstalls in a uv project are no longer removed byuv sync. When the Python runtime's project directory (runtimes.py.project, by default the directory ofrutis.json) haspyproject.tomlanduv.lock, the host uses the.venvthere, and uv is installed,add/upgrade/removeuseuv add --dev/uv remove --dev, and the plugin is recorded inpyproject.toml. Otherwiseuv pipis used as before.
Testing tools
- TypeScript: the process exits after a test whose call never returns fails on its timeout (one item of #933, #943). Under
node --test(npm test, the template, CI), once thetimeoutofnode:testfails the test,npm testprints the summary and exits with 1; before, the process never exited and CI hung. Running the file directly withnodeis unchanged.
Documentation
- The TypeScript test example in section 5 of Build a host open to plugins passes as written: the fake service in the test returns its result directly, and the guide says why (#932, #942).
- The first step of the Swift plugin guide installs
rutis-host(swift testneeds it) (#931).
Behaviour changes
| Where | Before | Now |
|---|---|---|
A SpawnPlugin's state after it is made, before its apply |
Idle; ready() answers None at once |
Starting; ready() waits for the start to end |
When reconcile returns after ready() |
a runtime's row may still be waiting for runtime <name> |
running, or in failures |
rutis-host run / dev start with a configuration that does not match the Schema |
runs as usual | the row fails: <row>: config: … |
rutis-host add / upgrade / remove of a Python plugin in a uv project |
uv pip install / uninstall |
uv add --dev / uv remove --dev, recorded in pyproject.toml |
TypeScript test: a call never returns, node:test times out |
the process does not exit | prints the summary, exits with 1 |
Definition::at in an instance the host marked itself |
"tools" is a service inside "session" instances: put the row in the "session" group |
mounts; the copy uses the services of its instance |
Compatibility
- The protocol is unchanged and 0.19.1 connects with 0.19.0 as usual. The formats of
rutis.jsonandrutis.dev.jsonare unchanged. - New public API: in rutis,
Waterfall::syncandCtx::mark_scope(moved fromrutis::internal::CtxInternal; code thatuses that trait still compiles); in rutis-loader,Loader::instance_rows. - In a uv project, a plugin installed by 0.19.0's
addthat has not been throughuv syncmakes 0.19.1'sremovefail, becausepyproject.tomldoes not have it: runuv pip uninstall --python .venv/bin/python <package>, thenrutis-host remove <row>again; it says the package is no longer there and removes the record ininstalledand the row as usual. Ifuv synchas run, the plugin is already gone:addit again.
Packages
All of these are version 0.19.1: on crates.io rutis, rutis-macros, rutis-bridge, rutis-loader, rutis-types, rutis-host, rutis-sdk, rutis-dylib, rutis-dylib-meta, rutis-dylib-launcher; on npm @arcships/rutis, @arcships/rutis-runtime, @arcships/rutis-bun, @arcships/rutis-host and the five platform packages; on PyPI rutis, rutis-host; the Go module github.com/arcships/rutis/go/rutis (tag go/rutis/v0.19.1); the Swift package (v0.19.1); the rutis-host binaries on the GitHub release page. The Kotlin SDK, as in 0.19.0, is used from source at the tag v0.19.1.