GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing developing-today.github.io — The crates - id

The crates

Source: primary sources are pkgs/id/Cargo.toml, pkgs/id/src/lib.rs, and the per-crate manifests and lib.rs files under pkgs/id/crates/. This chapter is complete without following those links; they record provenance only.

The id code lives in one Cargo workspace rooted at pkgs/id/. The workspace has 24 members: the root package id plus 23 crates under pkgs/id/crates/. Default members are 18: the root plus 17 crates. id-native-shell, id-hw-shell, id-tui-shell, id-android-remote, id-bevy-bridge, and id-bevy-presenter are workspace members but not default members, so a plain cargo build in pkgs/id/ never acquires the Bevy desktop dependencies or the shell code. The 23 sub-crates declare 335 pub mod items in total across their lib.rs files. The counting rule for every module count in this chapter (derived and re-verified 2026-11-28, #14428 item 4): count the pub mod declarations in the crate’s src/lib.rs — file-backed and inline modules alike, including feature- and cfg-gated declarations; private modules, pub(crate) modules, and re-exports do not count. Under that rule every per-crate count in this chapter was re-derived from current lib.rs files and matched, except id-import-notion below, which this pass corrected; the root adds 26 modules of its own code plus about 90 re-exported modules (see The id facade crate).

The workspace is the product of a numbered split of one original crate, recorded in the crate doc headers as umbrella issue #3447: Phase 1 extracted id-core (#3447), step 1 extracted id-caps (#4403), steps 2a and 2b extracted id-store and id-events (#4405), step 3 extracted id-sync (#4406), step 4 extracted id-groups (#4407), step 5 extracted id-worlds (#4408), steps 6b and 6c extracted id-directory and id-web (#4409), and step 7b extracted id-cli (#4411). Four crates are not split products: id-config (slice 9111-01, #10178), id-currency-registry (F1 and F2 of #2062, #2317 and #2318), id-render (#7918, decision records #5849 and #5855), and id-import-notion (slice 1, #8419); id-client (#13403), id-tui-shell (#12818), id-pg (#13760), and id-grants (#14790) are likewise purpose-built rather than split products. The Bevy pair — id-bevy-bridge (slices 1–3, #13702–#13704) and id-bevy-presenter (slices 4–5, #13705–#13706) — and id-android-remote (#1831) are purpose-built as well. The three shells are separate consumers, covered in Guest apps and shells as consumers.

Dependency direction

Production [dependencies] edges only; dev-dependencies are named where they matter.

  • id-core has 10 production dependents: every other split crate plus the facade.
  • id-caps depends on id-core. id-store depends on id-core. id-events depends on id-core and id-store. id-groups depends on id-core, id-events, and id-store. id-sync depends on id-core, id-events, and id-store.
  • id-directory depends on id-caps, id-core, id-events, and id-sync. It does not depend on id-worlds; id-worlds depends on id-directory, because WorldCore holds a directory::Directory as persisted state.
  • id-worlds depends on id-caps, id-core, id-directory, id-events, id-groups, id-store, and id-sync. id-web depends on all of those plus id-worlds. id-cli depends on the same set as id-worlds, plus optional id-web.
  • The facade id depends on id-caps, id-cli, id-core, id-currency-registry, id-directory, id-events, id-groups, id-store, id-sync, and id-worlds, plus optional id-web.
  • Both shells production-depend on the facade only, each with default-features = false, features = ["world"]. Each shell also dev-depends on id-worlds with the sandbox feature for its test harness.
  • id-config has no production dependent anywhere in the workspace. The facade names it only under [dev-dependencies], for the invariant tests in pkgs/id/tests/. ARCHITECTURE.md formerly stated that only the root depends on id-config; the code disagrees — that root edge is a dev-dependency, not a production dependency (disagreements LIB-4 and DES-11, now reconciled in ARCHITECTURE.md, which names the edge as dev-only).
  • id-currency-registry depends on nothing and its only production dependent is the facade.
  • id-render and id-import-notion depend on nothing and have no dependents, but both are default members and both carry maintained integration test suites. ARCHITECTURE.md calls them candidates for removal or for documenting as unused; no code, manifest, or test marks either crate deprecated or slated for removal (disagreement LIB-11).

The twenty-four members

id (root, the facade). Purpose: the published library surface and the id binary; the root Cargo.toml description, “A peer-to-peer file sharing CLI built with Iroh”, predates the worlds, directory, and currency surface (disagreement LIB-13). Public modules: 26 modules of its own code in pkgs/id/src/, plus about 90 modules re-exported from sub-crates at id:: paths. Key types and functions: Cli, Command, the cmd_* command functions, open_store, StoreType, load_or_create_keypair, and the constants KEY_FILE, CLIENT_KEY_FILE, SERVE_LOCK, STORE_PATH, and META_ALPN. Features: default = ["sandbox", "world"], plus sandbox, world, ssh, web, dht, and currency-poc-tb. Dependents: id-native-shell and id-hw-shell in production; id-store dev-depends on it for tests. Full treatment: The id facade crate.

id-core — 68 public modules. Purpose: foundation leaf modules (Phase 1 of the split, #3447); everything depends on these modules and they depend on almost nothing. Key types and functions: the constants KEY_FILE = ".iroh-key", CLIENT_KEY_FILE = ".iroh-key-client", SERVE_LOCK = ".iroh-serve.lock"; discovery (PeerDiscovery, PeerInfo, PeerAnnouncement); tuple, canonical_cbor, frames (MAX_FRAME_BYTES), membership, holders, signed_envelope, and the graph record model. Features: default = ["world", "sandbox"], plus web, test-utils, and test-provider. Dependents: all ten production consumers in the workspace. Full treatment: The data crates.

id-caps — 29 public modules. Purpose: the capability catalog, execution limits, and the declarative world manifest (split step 1, #4403). Key types and functions: the provider catalog in world_caps (entries include time.now, chat.say, kv.get, blob.put, http.fetch); world_limits (RuntimeLimits); agent_delegation (AgentId, Role, Delegation, JoinGrant, verify_join); the Roc library-import gate family (library_manifest, library_resolution, library_gate, library_attach); and mcp_bridge / mcp_policy. The November additions are account_quota (per-account quota policy and fuel-rate ledger, F12.10), agent_quota_ledger (the per-(agent, world) quota ledger core, #8301), cap_notice (capability-change notices, #12921) and role_config (role definitions as first-class versioned world config, #8299). The 2026-11-25 shared-surfaces additions include agent_majority (#10052), owner_review (#8302), task_delegation (#10051), and shared_review (#10053). Features: default = ["sandbox"], plus the test-only test-provider. Dependents: the facade, id-cli, id-directory, id-web, and id-worlds. Full treatment: Worlds and capabilities as a library.

id-store — 35 public modules. Purpose: the store layer — store traits, blob store, event headers, documents, tags, and search (split step 2a, #4405). Key types and functions: store::{StoreType, open_store, load_or_create_keypair} with STORE_PATH = ".iroh-store"; chain::{ChainExt, Event, sign}; tags, tag_index, and tag_claims; documents::{DocumentRef, DOCUMENT_KIND}; and search. The 2026-11-27 additions are event_rows and turso. Features: none beyond default = []. Dependents: the facade, id-cli, id-events, id-groups, id-sync, id-web, and id-worlds. Full treatment: The data crates.

id-events — 12 public modules. Purpose: the event store, group projection, writer sets, and sync gating (split step 2b, #4405). Key types and functions: EventStore and Ingest; the attestation family (GenesisAgreement, ResultClaim, sign_genesis, sign_claim, compute_state); the deterministic group projection in groups::fold (GroupView, Projection); writer sets in idset (WriterSet, Entry, Excludes); and WorldAccess. Features: none beyond default = []. Dependents: the facade, id-cli, id-directory, id-groups, id-sync, id-web, and id-worlds. Full treatment: The data crates.

id-groups — 3 public modules. Purpose: the group policy and enforcement remainder — group actions and log, local warnings, the blob gate, and group encryption (split step 4, #4407). The group model itself lives in id-events; this crate holds blob_gate::{BlobPolicy, Request, decide}, the encryption family built on p2panda-encryption’s DataScheme, and groups::{actions, log, warnings}. Features: none beyond default = []. Dependents: the facade, id-cli, id-web, and id-worlds. Full treatment: The data crates.

id-sync — 30 public modules. Purpose: log sync, the meta protocol, file operations, envelopes, and artifacts (split step 3, #4406). Key types and functions: protocol::{META_ALPN, MetaRequest, MetaResponse} with META_ALPN = b"/iroh-meta/3"; log_sync (SyncProtocol); transfer; artifact; envelope_outbox::Outbox; announcement::{Announcement, SignedAnnouncement}; and the federation family. The 2026-11-26/27 additions are discovery_client and discovery_join (the client discovery settings on the join path, #15646) and snapshot_serving. Features: default = [], plus opt-in dht (off by default) and test-utils. Dependents: the facade, id-cli, id-directory, id-web, and id-worlds. Full treatment: The data crates.

id-directory — 16 public modules. Purpose: the home-server directory — directory, views, auth, mail, invites, and seitan admission (split step 6b, #4409). Key types and functions: Directory (new, open, replay, append, sign_up, add_key, verify_account), Account, Group, Member, DirectoryEntry, Actor, and the BoundaryGate trait; the seitan V2 admission protocol; and the keyset and recovery family (now including keyset_pairing). Features: none beyond default = []. Dependents: the facade, id-cli, id-web, and id-worlds. Full treatment: The data crates.

id-worlds — 55 public modules. Purpose: the world runtime, sessions, sandbox, and cross-world authority (split step 5, #4408); at 107 .rs files (counted with find crates/id-worlds -name '*.rs') it is the largest crate in the workspace. Key types and functions: sandbox::{Sandbox, WorldInstance, GuestCall, CallStats, CallMetrics}; world::{WorldCore, WorldHandle}; shell_contract; program_bundle; guest_burn; and account_charge::{WorldChargeConfig, WorldAccountRegistry, ChargeMode}. Features: default = [], plus sandbox (adds wasmtime), ssh, and test-utils. Dependents: the facade, id-cli, and id-web in production; both shells dev-depend on it. Full treatment: Worlds and capabilities as a library.

id-web — 6 public modules. Purpose: the web layer — HTTP and WebSocket server, routes, templates, and markdown (split step 6c, #4409). Six modules are declared pub mod: gallery, presentation, runs, sessions, world_ws and wss_https (the WebSocket/WSS + HTTPS fallback adapter, #8215); the rest of the surface is private modules behind curated re-exports. Key types and functions: create_router, create_router_for_app, create_program_router, WebInterface, WebMode, WebSecurity, SeitanState, and PublicationMounts. Features: default = [], plus sandbox. Dependents: the facade (optional, under the facade web feature, re-exported as id::web) and id-cli (optional, under its web feature).

id-cli — 19 public modules: 16 file-backed plus 3 inline bridge modules (blob_gate, groups, local_events). The count is the pub mod declarations in crates/id-cli/src/lib.rs; the private peer_announcement and test modules are not counted. Purpose: the command-line application layer (split step 7b, #4411): cli (argument parsing), commands (subcommand implementations), repl, and server_config, plus shared support modules. Key types and functions: Cli, Command, KeyCommand, KeysetCommand, TagCommand; the cmd_* functions; option structs ServeOptions, ServeInfo, PeekOptions, PeersOptions, SearchOptions, ReplContext; MetaClient (the local-versus-remote chooser, defined at crates/id-cli/src/meta_client.rs:31); MetaProtocol, MetaRequest, MetaResponse, FindMatch, TaggedMatch, MatchKind; and run_repl. Features: default = ["sandbox", "world"], plus world, sandbox, ssh, web, and dht. Dependents: the facade only. The command surface itself is documented in The id command line.

id-config — 9 public modules. Purpose: the versioned configuration contract and its hard invariants (slice 9111-01, #10178). Public modules: resolve (re-exporting resolve::{LayerOverride, ResolutionInput, ResolveError, ResolvedLayers, resolve}) and rollout (staged config activation and rollback by revision, slice 9111-05, #10217), plus the slice-03 planes added 2026-11-25/26 — storage (part 2, #15195), tiers (part 3, #15204), remotes (part 4, #15210), links (part 5, #15226), peers (part 6, #15274), and namespaces (part 7, #15379) — and the explain explanation surface; everything else is defined at the crate root. Key types and functions: CONFIG_SCHEMA_VERSION = 1; FIXED_GATE_IDS (the 5 ids signature-verification, validation, replay-protection, authorization, tenant-scope); ConfigDocument (parse, validate, resolve); ResolvedConfig (canonical_json); ConfigError (12 variants); Mode, SyncScope, Tier, Ceilings, and field_class. The doctrine in the crate header is literal: the five fixed admission gates can never be disabled by configuration, ceilings only narrow, validation is fail-closed, and resolution is deterministic. Features: none. Dependents: none in production; the facade dev-depends on it only. One further disagreement: crates/id-config/src/negotiation.rs exists on disk but is never declared in the crate’s lib.rs, so the published crate does not contain it; its only compilation is by path from the facade’s tests/config_downgrade.rs (disagreement LIB-5). The configuration surface is documented in Configuration and environment.

id-currency-registry — 5 public modules. Purpose: the currency control-plane registry (F1 of #2062, #2317; account factory F2, #2318): the Postgres schema and migrations for ledger_allocation, currency, currency_issuer, and account, plus the monotonic, never-recycled ledger-u32 allocator. Public modules: allocator, factory, grants, registry, store. Key types and functions: Allocator and AllocError; Registry, RegistryError, CurrencyRecord, CurrencyStatus, SupplyPolicy; Factory, FactoryError, CurrencyAccounts, AccountCluster, AccountSpec, AccountKind, CreateOutcome; the Store trait with InMemoryStore; and the MIGRATION_0001_UP / MIGRATION_0001_DOWN constants. The ratified split is 0x00000001..=0x000FFFFF for tenancy and system, 0x00100000.. for currencies; ledger 0 is never allocated. Features: default = [] only. Dependents: the facade only, which composes it in pkgs/id/src/currency/gateway_poc.rs.

id-render — 10 public modules. Purpose: the rendering pipeline compiler core (#7918): parse and vocabulary validation of semantic markup, then a five-stage pipeline over one target-neutral intermediate representation — parse, validate, compose, lower per target, emit artefact plus coverage report. Public modules: assertion_vocabulary, compose, gui_table, lower, lower_gui, lower_native, native_table, tooling, vocabulary, web_table; parse and validate are private modules whose functions are wrapped at the crate root. Key types and functions: Document, Element, Node, Span, BuildError; parse, validate, parse_and_validate, compose_document, lower_document, lower_document_native, lower_document_gui. Features: none. Dependents: none; it is a default member with six integration test files.

id-import-notion — 8 public modules. Purpose: the Notion importer (slice 1, #8419, and the slices that followed): manifest and inventory primitives, page/block content, database rows, and comments, with the API transport injected by callers. Public modules: comments, content, databases, rows, and the 2026-11-26/27 additions export (the Markdown+CSV export reader, #13524), export_only (the export-only degraded mode) and reimport (classify and reconcile re-imports), plus fidelity (the persisted fidelity report every import ends with — objects by outcome with per-item reasons for every non-clean item, reconciled against the inventory exactly once; slice 5, #13525), over a src/lib.rs of 1,489 lines. Key types and functions: NOTION_API_VERSION; the NotionApi transport trait; crawl_inventory; Inventory, InventoryObject, Stage, Outcome; and Manifest (new, verify_resume_identity, record_progress, validate_inventory_reconciles, save_atomic, load). A bearer token is never accepted by or serialized from Manifest. Features: none. Dependents: none; it is a default member with its own integration tests (recorded_inventory.rs, recorded_content.rs, recorded_databases.rs, recorded_rows.rs, recorded_comments.rs).

id-native-shell — 8 public modules. Purpose: the native reference shell (F13.6, design #788): a Bevy desktop client speaking the F13.1 shell contract. Public modules: audio, directory, events, form, providers, render, scene, widget, plus a private session module whose surface is re-exported at the crate root. Features: none. Production dependency: the facade with features = ["world"], plus Bevy 0.19 and iroh. Dependents: none; not a default member. Full treatment: Guest apps and shells as consumers.

id-hw-shell — 0 public modules. Purpose: the ESP32-class hardware shell spike (more-shells v1 slice 3, #10929): the presence, journal-head, and confirm/act subset of the F13.1 shell contract. The whole crate is one src/lib.rs of 996 lines. Key types and functions: CONTRACT_NAME = "shell", CONTRACT_VERSION = 1, capability_statement(), HwShell, PresentedChoice, SelectableField, and HwError. Features: none. Production dependency: the facade with features = ["world"]. Dependents: none; not a default member. Full treatment: Guest apps and shells as consumers.

id-tui-shell — 5 public modules. Purpose: the terminal (TUI) shell for id (more-shells v2 slice 2, #12818): the text-native world-session client on the F13.1 shell contract. Its src/lib.rs (58 lines) declares five file modules added by the 2026-11-26 TUI slices: frames and session (frames, the session fold, reconnect and recorded sessions, #12818), present (the three-panel text projection over the session fold, #15755), and render and keys (the ratatui renderer and key handling, #15769); the contract surface stays at the crate root. Dependents: none; it is a workspace member but not a default member. Full treatment: Guest apps and shells as consumers.

id-client — 2 public modules. Purpose: the client-only Rust facade for the id native Android client v1 (slice 1 of #7938, child #13403). Public modules: enrollment and session. Dependents: none in the workspace; it is a default member.

id-pg — 0 public modules. Purpose: the Postgres-over-HTTP adapter (#5805): allowlisted query translation (#13760), endpoint registration (#13758), typed mapping (#13761), error mapping (#13762), and live/materialized read paths (#13763). Its test harness includes injectable transport tests and real PostgREST container contracts (#13764). The public API is re-exported at the crate root; see pkgs/id/crates/id-pg/src/lib.rs. Features: none. Dependents: none yet.

id-grants — 2 public modules. Purpose: the selective-sharing grants model core (decision record #5799; slice 1 of #14790): a pure library with no I/O that validates grants against the model’s invariants and answers whether a requester may perform an operation on an object. The surface is re-exported at the crate root: the grant (Grant, GrantId, Subject, Scope, Operation, Duration, Delegation), the set (GrantSet, with root and attenuated delegated inserts, revocation that cascades to children, and one-time snapshot consumption), the checks (check_attenuation, AccessRequest, Requester, Decision), the error vocabulary (GrantError), and MAX_DELEGATION_DEPTH. Public grants carry read and subscribe only and are never delegable (#5802). The publication module (#14781) holds the owner’s publish and unpublish actions for public shares: Publications creates the public grant and its PublicationRecord together, derives the ShareManifest from the live record, mints unguessable ShareIds that are never reused, resolves an unpublished identifier exactly like an unknown one, and gates objects by a ClassLevel ceiling. Its listing (#14782) is the owner’s public catalogue: ListingEntry values for live, listed shares only, re-checked against each share’s grant at read time, with no counts. The persist module (#14790 slice 2b) gives a set a versioned stored form, GrantSetSnapshot, written by GrantSet::to_snapshot; GrantSet::from_snapshot re-validates every grant and every delegation’s attenuation on load and refuses the whole snapshot with a LoadError if any check fails. Features: none. Dependents: id-store, whose grant_authority module adds the owner’s live grants at the object tier of the #5678 read order; the remaining public-share slices (#14781 to #14784) build on it.

id-android-remote — 0 public modules. Purpose: the Android remote-drive transport bridge (#1831), in its Cargo.toml’s words: “Iroh session bridge for the Android remote-drive proof of concept (#1831)”. The whole crate is one src/lib.rs; it speaks the existing /id-world/1 shell session protocol and stays a client — it never starts a world host or listener. Features: none. Dependents: none; it is a workspace member but not a default member.

id-bevy-bridge — 7 public modules. Purpose: the Bevy projection bridge for id worlds, slices 1–3 (#13702, #13703, #13704). The journal is the only authority; Bevy holds a materialised projection. Public modules: fixture, intent (intents sent to the append gate, confirmed only when their journal position applies), map (IdEntityMap: ID entity id to Bevy Entity, plus the journal position at which each mapping was created), oracle (the replay oracle), projection (one journal position applied wholly or not at all), schema (BridgeSchema: predicate to component type, as data; classification is total and fail-closed), and tail (the atomic journal tail in JournalSet, with a per-tick lag budget). Features: none. Dependents: id-bevy-presenter; not a default member.

id-bevy-presenter — 6 public modules. Purpose: the Bevy presenter-client reference app for id worlds, Bevy slice 4 (#13705) with the host posture of slice 5 (#13706): a 2D app that joins a world hosted in another process, declares its provider manifest, and shows predicted presentation that reconciles or snaps back. Public modules: app, host, journal_store, provider, remote, and world_host. Features: none. Dependents: none; not a default member.

Embedding examples from real call sites

The shipped binary is itself a facade consumer: pkgs/id/src/main.rs:10-13 imports id::{Cli, Command, PeekOptions, PeersOptions, SearchOptions, ServeOptions, cmd_find, cmd_get_multi, cmd_gethash, cmd_id, cmd_list, cmd_migrate_tags, cmd_peek, cmd_peers, cmd_put_hash, cmd_put_multi, cmd_search, cmd_serve, cmd_show, cmd_tag, run_repl}, and pkgs/id/src/main.rs:202 calls id::cli::normalize_args(std::env::args_os()).

The integration suite is the largest consumer: use id:: occurs 165 times under pkgs/id/tests/. One import block in pkgs/id/tests/first_app_poc.rs:33-45 spans three crates entirely through facade paths — id-store (chain, documents, tag_claims), id-events (event_store, idset), and id-core (waiting).

Direct crate paths are also in use where the facade does not re-export a crate. pkgs/id/src/currency/gateway_poc.rs:120-125 imports id_currency_registry::{AccountCluster, AccountKind, AccountSpec, ClusterError, CreateOutcome, Factory, FactoryError, InMemoryStore, Registry, RegistryError, Store, SupplyPolicy} directly, because the facade exposes nothing from id-currency-registry at id:: paths. The three config test files under pkgs/id/tests/ (config_invariants.rs, config_precedence.rs, config_downgrade.rs) consume id_config:: directly for the same reason.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.