Skip to main content

Crate arachne_runtime

Crate arachne_runtime 

Source
Expand description

Portable blocking Arachne session runtime shared by native clients and language bindings. No membership API is implied by creating an authenticated transport endpoint.

Modules§

admission_state
Stable host-facing vocabulary for the admission lifecycle.

Structs§

AdmissionAuthorization
AdmissionReply
Client
Typed adopter seam over the portable runtime. The JSON dispatcher remains private to adapters; consumers use typed lifecycle operations here.
ClientConfig
Configuration for one workspace-facing runtime client.
ConnectionCapacityMetrics
ConnectivityReport
ControlTimingMetrics
DeliveryFailure
DeliveryReport
DurationSummary
A duration series measured in microseconds since the endpoint started.
EndpointInfo
Error
InterestObservation
InvitationDetails
InvitationInfo
JoinAdmissionStep
JoinRequest
MemberInfo
MemberRoster
MembershipGossipMetrics
PeerPolicy
PeerRoute
Publication
PublicationCandidate
RecoveredPublication
RecoveryAdoption
RecoveryCandidate
RecoveryRangeReady
RecoveryRangeRequest
RouteHint
WorkspaceActivity
The one restart-safe workspace lifecycle value. Membership and delivery details remain separate projections; this value only answers where the workspace operation is and why it stopped.
WorkspaceCandidate
WorkspaceInfo
WorkspaceMetrics
A bounded, read-only snapshot for native adapters and diagnostics.
WorkspaceState

Enums§

ErrorKind
MemberKind
Network
Address discovery and transport selection for a typed runtime client.
Presence
RecoveryRangeStatus
RecoveryStage
RouteKind
WorkspacePhase
Durable lifecycle phases projected to every adapter.

Constants§

MAX_REQUEST
Maximum JSON request or metadata size in bytes.

Functions§

cancel
Interrupt outbound control exchanges. The owner still calls close to release the endpoint once its serial JNI request returns.
close
Stop a session and release its transport, tasks and runtime.
create
Create an endpoint session. Credentials must be unique to this workspace-facing endpoint. Blocking: invoke outside an async runtime. Call close to release its resources.
create_lan
Opt in to local endpoint advertisement and lookup. No public discovery or relay. Uses the supplied workspace-scoped identity; discovery does not grant membership.
create_nearby
Advertise a device-level nearby-invitation endpoint on the local network.
create_relay
Force Iroh relay paths for a diagnostic WAN check while preserving the caller’s network connection and workspace-scoped endpoint identity.
create_relay_with_options
Use a caller-supplied relay map for controlled qualification or an operator-managed relay deployment.
create_wan
Opt in to Iroh’s public Pkarr lookup and relay network, with LAN discovery retained as a local fallback. External services provide routes, not authority.
create_wan_only
Use public endpoint lookup without LAN discovery or saved address hints. Direct Iroh paths remain enabled for a diagnostic WAN check.
describe
Return endpoint metadata for a live session.
enable_record_storage
Atomically migrate the current accepted owner and delivery state into an empty record store. The host supplies a private path and protected storage root and must retain its endpoint credential lock. Existing stores require restore; never overwrite one with an older legacy snapshot or fall back on open failure. A pending join may migrate too; admission atomically replaces its records. Host route/unknown-outcome metadata remains separate and must be preserved.
execute
Execute a bounded JSON request. Staged security changes require save/readback/adopt.
execute_stored
Execute metadata with a binary snapshot; return metadata and snapshot separately. The caller must durably save and read back staged snapshots before adopting them.
inspect_invitation
Verify invitation presentation without allocating an endpoint or join identity.
restore_record_storage
Restore only the authoritative native store into an empty endpoint session. Failure must not trigger legacy fallback. Removal consumes the session.
save_candidate
Commit the exact staged candidate, including counters and delivery state. This does not adopt, send, reply or release application data. Retry after a successful commit is idempotent; callers still invoke the matching adoption.
wait_for_work
Park the calling thread until this session may have work, without holding the session lock. Ok(true): drain with poll_admission until it returns null, then call again. Ok(false): the session closed. Spurious true is allowed.

Type Aliases§

ClientResult