Repository navigation
rutis v0.11.0
rutis 0.11.0
0.11.0 is released early and ships what is on main. Above all it brings leaf plugin events: Node, Bun, Python and Go plugins can send and receive events within their runtime process with ctx.on / ctx.emit, and receive the events the host sends (plugin API 2). Next come cross-language value types: dates and times, binary data, maps, sets, big integers, decimals and UUIDs now cross between Rust, Node, Bun, Python and Go, each language receiving its own native types. Third come remote runtimes: a runtime can connect to rutis by itself, one listener accepts many connections, and each connection is an instance; the Bun runtime can run remotely too. A few values now cross differently; see "Compatibility".
Packages
All of these are at 0.11.0:
| Registry | Packages |
|---|---|
| crates.io | rutis (the core), rutis-bridge, rutis-loader, rutis-host; the dylib toolchain rutis-sdk, rutis-dylib, rutis-dylib-meta, rutis-dylib-launcher |
| npm | @arcships/rutis, @arcships/rutis-runtime, @arcships/rutis-bun, @arcships/rutis-host, and the five platform host packages |
| PyPI | rutis, rutis-host |
| Go | github.com/arcships/rutis/go/rutis (tag go/rutis/v0.11.0) |
| GitHub | rutis-host binaries for Linux / macOS (x64 / arm64) and Windows (x64), with SHA-256 files |
rutis-cli is still released on its own.
New
- Leaf plugin events (#366, plugin API): Node, Bun, Python and Go plugins gain
ctx.on(name, listener)andctx.emit(name, ...args)(in Goctx.Onandctx.Emit). Events are dispatched within one runtime process: those a plugin emits itself, those other plugins in the process emit, and those the host sends in. Listeners are removed when their plugin unloads.ctx.emitcalls listeners synchronously in the order they registered and does not wait for the Promises / coroutines they return. On the host side, the Rust API declares which events the host may send to a runtime (RuntimePlugin::emits,LocalRuntime::emits) and sends them withProcess::emit: it waits for every listener to finish and gathers their errors in anAggregateError; undeclared names are refused. Node and Bun use Cordis's own event service and share one bus with Cordis plugins in the same process; Python and Go implement the same semantics.internal/*belongs to the runtime and cannot be listened to, emitted or declared. Events do not cross processes: the runtime → host direction is not available yet, andrutis.jsonhas no way to declareemitsyet. The test tools declare events at load and send them in witht.emit(Node, Python) orloaded.Emit(Go'srutistest). - Cross-language value types (#308, #355, #360, design, plugin API): the session protocol gains ten tagged values: points in time (
instant), local dates and times (datetime), dates (date), times of day (time), binary data (bytes), maps (map), sets (set), big integers (bigint), decimals (decimal) and UUIDs (uuid). Wire formats and capabilities: protocol design §6.1. Each value has a capabilityvalue-<tag>and is sent only to a far end that declared it; to one that did not, only that call fails, the session goes on, and the protocol version does not change. Plugins write their language's native code and rutis does the conversion; in every language an integer beyond ±(2^53−1) crosses as a big integer automatically.- Rust (
rutis-bridge):session::Valuegains ten variants, with the typesInstant,DateTime,Date,TimeOfDay,BigInt,DecimalandUuid(small types of rutis-bridge's own, no chrono, num-bigint or uuid), andBytes,ValueMapandValueSetfor generated code. An integer beyond ±(2^53−1) is sent as abigintautomatically (a JSON number inValue::Data, andi64,u64,i128,u128fields througharg; design V6): it used to go as a JSON number (JS got the nearest double), and to a far end that did not declarevalue-bigint(0.10 and older) that call now fails; a receivedbigintdecodes into an integer field that holds it.Value::json()fails on the new values (as on references), except abigintthat fits 64 bits (it gives the number). A host forwarding a call checks again against the downstream far end's capabilities;Process::emitchecks its arguments against the runtime's; an event forwarded between nodes (NodeEvent) holding a new value is refused. - Cordis generator:
Date→Instant,Uint8Array→Bytes,bigint→BigInt,Map<K, V>→ValueMap<K, V>,Set<T>→ValueSet<T>(keys limited to strings, numbers, booleans and bigints);ArrayBuffer,BufferandDataVieware still not bound. - Node, Bun (#410): a
Datecrosses as a point in time, aUint8Array(Bufferincluded),ArrayBufferorDataViewas binary data, and aMap,Setorbigintas its own type. A point in time arrives as aDate(truncated to the millisecond), binary data as aUint8Array, and maps, sets and big integers asMap,Setandbigint; local date-times, dates, times of day, decimals and UUIDs have no JS type and arrive as plain strings, their content complete. An integer from another language arrives as anumberwithin range and as abigintbeyond ±(2^53−1).@arcships/rutisexports the constructorsrutis.datetime(…),rutis.date(…),rutis.time(…),rutis.decimal(…)andrutis.uuid(…), for creating one of these five values from nothing or passing one on as its type; a plain string is still a string. Other typed arrays (such asInt16Array) cannot cross, since their element type would be lost. - Python (#412): a
datetimewith a time zone crosses as a point in time (arriving in UTC), adatetimewithout one as a local date and time, anddate,time(without a time zone),bytes(bytearrayandmemoryviewincluded),set(frozensetincluded),DecimalandUUIDas their own types; adictwith a key that is not a string crosses as a map. They arrive as the same Python types.datetime,DecimalandUUIDcross by value, no longer by object reference. Anintbeyond ±(2^53−1) crosses as a big integer automatically. A received big integer or map is a subclass ofintordict, used as anintordictas usual; passed on as it is, it is still a big integer or map, so a5nfrom JS passed back to JS through Python is still5n. Times keep microseconds; finer digits are truncated. - Go (#413): a
time.Timecrosses as a point in time (UTC, to the nanosecond), a[]byteas binary data, a map whose keys are not strings as a map, amap[K]struct{}as a set, and a*big.Intor an integer beyond ±(2^53−1) as a big integer; the new typesrutis.DateTime,rutis.Date,rutis.TimeOfDay,rutis.Decimalandrutis.UUIDstand for the other five values. Struct fields and the items of slices and maps are each encoded by these rules (field names still followjsontags), no longer throughencoding/json. Received values decode into the declared Go types; decoded intoany, a map is amap[any]any, a set a slice without duplicates, and a big integer a*big.Int. - The test tools (
@arcships/rutis/testing,rutis.testing, Go'srutistest) pass values by the same rules and are checked against the same expectations file as the real runtimes;rutistestjoins that check in this release.
- Rust (
- Runtimes that connect in (#382, #383, #384, design, connecting nodes): a runtime on a remote machine can connect to rutis by itself, for machines behind NAT, whose address changes, or whose number changes (many devices, autoscaled workers).
- The runtime side: the Python, Node and Bun runtimes and Go plugin binaries all take
dial:wss://… --id <id> --peer <rutis id> <project>, with the token inRUTIS_TOKENand, when rutis uses a self-signed certificate, its CA inRUTIS_CA.--idmust be unique per process: two processes with one id keep taking over from each other. It reconnects by itself: the delay starts at 0.5 s and doubles up to 30 s; a refused token or id is retried every 30 s; an incompatible protocol exits with 1; SIGTERM / Ctrl-C unloads the rows and exits with 0. Every disconnect unloads the rows, and each reconnection is a new session. Status lines go to stderr:connected to …,connection lost (…); retrying in …,refused: auth-rejected (…),refused: incompatible (…); stopping. Python dialing out works on CPython 3.13.6 too (listening still does not). - The rutis side:
runtimes.remote[]inrutis.jsongainslisten(a listener name from the top-levellisten) andinstances(aninstancedgroup), written together, with no link row. One listener accepts many connections; all of them present the same token (RUTIS_TOKEN_<NAME>, orRUTIS_TOKEN) and each declares its own id. Every connection is one instance of the group: created when it connects, closed when it disconnects, and taken over by a new connection with the same id. The group's rows run in each instance on that connection, and the services they provide are seen only in that instance; when a connection lacks a plugin, that row fails in that instance alone. Only one of the two fields, a missing listener or group, or a missing token is a rutis-host start-up error. - Rust libraries:
rutis-bridgegainsAccessPointPlugin(one listener accepting many runtime connections) and the identity layerAdmission,SharedToken;rutis-loadergainsRuntimeInstances(one instance per connection).
- The runtime side: the Python, Node and Bun runtimes and Go plugin binaries all take
- The Bun runtime can run remotely (#384): the Bun runtime can listen (
listen:wss://…, with the certificate inRUTIS_CERTandRUTIS_KEY) and dial out;languageinruntimes.remote[]accepts"bun", with rows named<runtime name>:<module>. - The Go runtime joins wait-cycle detection (#385): the Go runtime declares
sync-wait. When synchronous calls through a Go plugin would form a wait cycle, the caller receivesSyncWaitCycleinstead of possibly hanging. The Node, Python, Bun and Go runtimes are now all covered. - Documentation: the app integration design (#381); task guides for coding agents in
.agents/skills/(remote plugins, adding a runtime; #393).
Fixes
- When a row was unloaded and its runtime closed right after, or all of a runtime's services were withdrawn, while another service was being published, the withdrawn service could stay in rutis for good (#372). The withdrawal now always completes. Every runtime was affected; a Bun test found it first.
- The 0.10 known issue, three value inconsistencies between languages (#355), is handled with the value types: Python's
datetime,DecimalandUUIDcross by value;time.Time,[]byteand big integers in Go struct fields are checked one by one; a key whose value is undefined in a Python dict becomesNone, consistent withnullin the other languages.
Tests and quality
- A conformance test for dialing out in every language (
dial_conformance): Python, Node, Bun and Go run the same cases against one access point. - The CI redesign (nightly runs, a release gate, self-hosted runners) and a few fixes to intermittent failures, with no user-visible change.
Compatibility
- Plugin API 2:
definePlugin/define_plugin/rutis.Definemark plugins with plugin API 2 (leaf events). 0.11 runtimes still accept API 1 plugins. Plugins written with the 0.11 SDK need a 0.11 runtime; an older runtime refuses to load them and says what to upgrade. Go plugin binaries also need a 0.11 host. Protocol versions are unchanged: local sessions are still protocol 2 and sessions with endpoint identities protocol 3; the Go manifest format is unchanged. - SDK dependencies:
@arcships/rutisand@arcships/rutis-bunnow depend on@deepseek-ai/cordis4.0.4 (one package, with no dependencies of its own).@arcships/rutisused to have no dependencies; its test tool now runs the plugin on Cordis's event service. Plugins do not load the test tool at run time. rutis.json: still format 1.runtimes.remote[]gains the optional fieldslistenandinstances, andlanguagegains"bun". Existing files need no change; a 0.10 rutis-host cannot read a file that uses them.- Some values cross differently (design §8), and plugin code may need changes:
- Python:
datetime,DecimalandUUIDused to cross by object reference (the far end got a proxy); they now cross by value. - Go:
time.Time,[]byteand integers beyond ±(2^53−1) inside structs used to go throughencoding/json(becoming strings, base64, or unchecked); they now cross as their value types. - Go:
map[string]struct{}used to cross as an object; it now crosses as a set. - Python: a dict key whose value is
undefinedused to be dropped; it is nowNone, as in the other languages. - Integers beyond ±(2^53−1) used to be refused when Python or Go sent them, and arrived in JS as the nearest double when Rust sent them; they now cross as big integers automatically, with no change to your code. JS receives them as
bigint(within range they are stillnumber). A JSnumberbeyond that range is still inexact; usebigintto be exact. - In JS, local date-times, dates, times of day, decimals and UUIDs arrive as strings; passed on from JS they lose their type; to send or pass them on as their type use
rutis.datetime(…),rutis.date(…),rutis.time(…),rutis.decimal(…),rutis.uuid(…). - Values refused in 0.10 (JS
Date,Map,Set,Uint8Array,bigint; Pythonset,bytes, and so on) can now cross, and the test tools no longer refuse them.
- Python:
- Mixing with older versions: new values are sent only to 0.11 far ends. With runtimes of 0.10 and earlier, calls carrying a new value (integers beyond ±(2^53−1) included) still fail; other calls are unaffected. Both ends must be on 0.11 to pass the new values.
- Wire: the frame depth limit goes from 144 to 208 levels (one
maplevel takes three JSON levels on the wire); values still nest at most 64 levels. - Rust API:
rutis-bridge'ssession::Valuegains ten variants and is marked#[non_exhaustive]: code matchingValueexhaustively needs a_ =>arm. Later variants will not be breaking changes.Valuenow implementsPartialEq.rutis-bridge'sChannelErrorgains the variantRejected(the far end refused this side's id after the channel opened, WebSocket close code 4003): code matching it exhaustively needs another arm.- The Rust side declares the
value-*capabilities in its handshake (in both formats). - New:
RuntimePlugin::emits,LocalRuntime::emits,Process::plugins, and the access point,RuntimeInstancesandUnavailableabove. rutisis unchanged, andrutis-loaderhas no breaking changes.
- dylib: dylib plugins must be recompiled with the 0.11.0 SDK.
- Minimum versions are unchanged: Rust 1.88, Node 22, Python 3.10, Bun 1.4, Go 1.24.
Known issues
- Bun cannot tell "the server certificate is not trusted" from other TLS handshake failures, so when Bun dials out every TLS handshake failure counts as an authentication failure and is retried every 30 s.
- On Windows, a Node runtime dialing out is stopped by the console passing Ctrl-C on to its child process; this has not been tried on Windows.
Getting started
npx @arcships/rutis-host@0.11.0 new greeter --lang nodeuvx --from rutis-host==0.11.0 rutis-host new greeter-py --lang pythonThen read TypeScript plugins, Bun plugins, Python plugins, Go plugins, embedding in Rust or connecting nodes.