bitwire

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: Apache-2.0

README

Bitwire

ci License

One contract for access through relative paths.

Bitwire defines the interface between a model's generated adapters and the runtime that carries its interactions. A wire gives access to an origin; selecting a path or mounting several origins must preserve that same interface. The contract is shared across languages, generators and runtime implementations.

Status: 0.2.0 candidate; 0.1.0 remains released. All eight bindings separate send access from receive attachment and closure. A test-only Go/TypeScript composition experiment exercises shared dispatch, relative paths and preservation. The earlier ten Nightseam cases remain a pinned 0.1.0 baseline. The language matrix records publication and adoption separately. No production endpoint runtime is included.

The interface

interface Wire {
  send(path: Path, message: Message): void;
}

interface Endpoint extends Wire {
  receive(receiver: Receiver): () => void;
  close(code?: number, reason?: string): void;
}

interface Receiver {
  message?: (path: Path, message: Message) => void | Promise<void>;
  closed?: (code: number, reason: string) => void;
}

Paths are sequences of opaque strings, relative to the wire's origin. Message carries a request, response, event or cancellation and may hold a local return capability. An Endpoint accepts one active receiver and returns its detach function. Path registration and matching belong to a composed dispatcher; selected receiving views share that owner. The design decision explains why access and ownership are separate capabilities. The contract gives these names their shared meaning.

Selection and mounting are governed by laws, not by the choice of carrier:

at(at(w, a), b) ≃ at(w, a ++ b)
at(w, [])      ≃ w

These are contract laws. Runtime implementations supply at and mount; Bitwire's independent cases check their observable behavior.

Who owns what

Project Responsibility
Bitwire Shared access contract, language declarations and independent conformance criteria.
Nightseam Its runtime, carriers, peers, tunnels, live-reference machinery and generator.
Bitlink Its planned protocol projections and generated adapters.
Bitsystem Typed spaces and the kernel/system operations exposed through them.

Sharing an interface is necessary for composition. Interoperability also requires agreement on the message profile, operation addresses, contract identity and live reference rules. The starting profile remains nightseam.duplex/1; creating this repository does not rename it or establish a new on-the-network protocol.

The ownership decision records the scope. Integration status distinguishes the intended dependency direction from today's implementations.

The complete scope includes Go, TypeScript, Python, Rust, Swift, C++, Java and Haskell. See the language bindings and first delivery plan for package coordinates and readiness.

Layout

Path Contents
wire/go Go contract declarations; standard library only.
wire/ts TypeScript contract declarations; no runtime dependencies.
wire/py Typed Python contract and wheel/source package checks.
wire/rs Rust contract crate and outside-checkout consumer.
wire/swift SwiftPM Bitwire product and native contract.
wire/cpp C++20 header and installable Bitwire::wire CMake target.
wire/java Java 21 dev.bitspark:bitwire Maven artifact.
wire/hs Haskell Bitwire module and Cabal source package.
docs Purpose, contract, profile boundary, decisions and integration plan.
conformance Independent cases and pinned public Nightseam drivers.
scripts Portable repository checks, also used in CI.

Components contain their language presentations, following Nightseam and Archon. There is one root Go module and a pnpm workspace. No generator or transport is a dependency of the contract packages.

Work on it

Use Go 1.26, Node.js 24 or later, and pnpm 12.4.1:

pnpm install --frozen-lockfile
node scripts/check.mjs

The core check validates documentation, Go and TypeScript. Run node scripts/conformance.mjs for executable access observations, and node scripts/smoke-packed.mjs after building for installed npm/Go consumers. The native package checks and required toolchains are documented in each binding's README and exercised by CI. These commands need no private sibling checkout or registry publishing credentials.

Documentation and contributions

Start at the documentation index and CONTRIBUTING.md. SECURITY.md describes private reporting; CODE_OF_CONDUCT.md describes participation.

License

Apache License, Version 2.0. See LICENSE and NOTICE.

Directories

Path Synopsis
conformance
reference/go command
This executable is a test-only composition reference, not a shipped runtime.
This executable is a test-only composition reference, not a shipped runtime.
wire
go
Package wire declares the Bitwire 0.2 access contract.
Package wire declares the Bitwire 0.2 access contract.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL