Skip to content

COS2000 WASM Executor

Compatible Operating System · WASM Execution Loader. COS2000 provides the WASM loading and execution role in the sigMAX constellation.

COS2000 is a minimalist x86-64 operating system used as the WebAssembly executor in the sigMAX Pro architecture. Written primarily in C with x86 assembly, it includes its own kernel, device drivers, network stack, HTTP services and execution tools. It boots directly in a virtual machine; it does not require a Linux distribution inside that VM.

For sigMAX Pro, KubeVirt manages the VM on Kubernetes. Inside it, COS2000 compiles or loads WASM modules, exposes application routes, performs permitted native operations and reports execution diagnostics. Host and Config remain separate services outside the executor VM.

Explore all runtime capabilities Explore sigMAX Pro

COS2000 combines a WASM engine with the sigMAX primitive catalog. A contract declares its inputs, outputs, allowed imports and resource bindings; the module uses those declared interfaces to perform useful work.

CapabilityWhat it enables
Typed HTTP servicesValidate declared request fields, run business rules, return structured JSON and distinguish declared business errors from execution failures.
Data transformationWork with JSON, ObjectIR and DocIR; checked arithmetic, decimals, strings, UTF-8, bytes and URLs; bounded regex, CSV, XML, gzip and zstd operations.
External APIsCall HTTP or verified HTTPS endpoints through an authorized binding, with explicit method, path, header and response-size limits.
Service calls and eventsInvoke an external service with JSON or typed input/output, and publish JSON events to a configured HTTP endpoint.
File and object storageRead, write, delete and obtain the size of binary objects through a remote blob adapter. Persistence belongs to the selected external service.
Database-backed operationsCall a database service through an explicitly configured HTTP or invocation adapter. SQL execution and database persistence remain in that service.
Cache and request stateReuse bounded values through a volatile shared cache, or maintain private state for the current invocation.
Cryptography and identityCompute hashes and Base64, verify signatures, use HMAC through trusted key references, and inspect available trusted request identity and capabilities.
Application observabilityEmit supported logs and measurements, then correlate execution with the executor’s request history and metrics.

The primitive implementations are native freestanding C in COS2000. The compiler reuses the pinned sigMAX primitive catalog and ABI; it does not launch the Rust Host runtime inside the VM. A supported primitive still needs its allowed import and, where applicable, a valid binding or trusted resource.

The external adapters connect application logic to services outside the VM. For example, a handler can validate an order, invoke an inventory API, save a document through a blob adapter and notify an event endpoint. Each target is named in the contract and resolved by the executor’s binding configuration.

Blob adapters transfer raw bytes over HTTP(S), with a current limit of 1 MiB per object. Logical keys are checked before the host constructs the destination URL. blob.head currently obtains the size through a bounded GET because the transport does not expose response headers; it is not a metadata-only remote HEAD request.

Database access follows the same service boundary: configure an HTTP or invocation adapter for the relevant database-service endpoint. COS2000 does not embed PostgreSQL, an SQL driver, MinIO, Redis or a Dapr sidecar. Existing dapr_* binding names need an explicit COS2000 URL adapter; component and application names alone do not resolve a destination. The file storage and database service pages describe the wider sigMAX service implementations and their APIs.

HTTP bindings normally use fixed destinations. An explicit URL-argument mode can accept a request-supplied URL restricted by an origin allowlist. Redirect following is opt-in for bodyless GET/HEAD, limited to five hops, and rechecks every destination. HTTPS certificate verification remains enabled, and HTTPS-to-HTTP redirects are rejected.

The native cache supports get, set, delete and checked integer increments with TTL and quotas. Its namespace includes the binding, component and trusted tenant identifier when one is available. The inspected implementation permits up to 256 entries and 4 MiB of charged data across the executor. Cache contents disappear on reboot. They are neither a distributed cache nor durable database records.

state.* operations belong to the current request context. That context is renewed for every invocation, including when the WASM instance itself is reused. Temporary request state, shared cache and persistent external storage therefore have distinct lifetimes.

Cryptographic primitives include SHA hashes, HMAC and Ed25519/RSA-PSS signature verification. HMAC accesses a provisioned secret by logical reference without returning the secret bytes to WASM. The runtime can expose the authenticated controller certificate fingerprint as the request subject, or local for local execution. Tenant IDs, roles and claims require a trusted identity provider; their presence is not inferred from untrusted request fields.

A typed service compiled inside COS2000Radjae compiles a typed contract and its validated pseudo-code into a WASM module retained in the executor registry. A separate management action configures and enables a route. Incoming requests can then run the module through WAMR and receive its HTTP response.Typedcontract+pseudo-codeRadjaeparse andcompileWASM module+ sourceartifactsConfigure andenable a routeWAMRserviceexecutionHTTPresponse

COS2000 includes Radjae, a native compiler for typed sigMAX pseudo-code. A contract can carry fixed pseudo-code and compile entirely inside the OS. When configured, the compiler workspace can also ask an LLM to draft a contract or generate pseudo-code for review and validation.

  1. Supply a binary contract with declared inputs, outputs, imports and bindings.
  2. Radjae parses and type-checks its pseudo-code, validates the executable profile and emits WASM directly.
  3. The registry retains the resulting module together with the original contract and accepted pseudo-code.
  4. Upload a route configuration, then enable it to expose the selected module export through the application interface.

Contract submission does not run an external C compiler or shell. Fixed source, contract layout and the same pinned primitive library produce the same binary bytes; LLM generation is a separate, nondeterministic step. Compiling a module does not automatically activate its HTTP routes.

Raw uploaded WASM is also supported. Its numeric ABI accepts named JSON uint32 arguments and returns a uint32 result. Contracts compiled by Radjae provide the richer typed interface, structured responses, declared errors and configured primitive bindings.

This lifecycle separates blue source artifacts, turquoise preparation steps and violet execution. The cylinder is the executor’s in-memory registry. Compilation does not enable the route: a management action does that, and an incoming request triggers WAMR execution.

Kubernetes platform

  • Host + Config — Platform services outside the executor VM.
  • KubeVirt — Manages the executor VM lifecycle.

Inside the executor VM

COS2000 operating system

  • Management and application APIs.
  • WAMR and native sigMAX primitives.
  • WASM modules and instances → authorized external services.

Core deploys Host and Config together on one Docker Compose host, with WASM execution in the container and no dedicated execution isolation. Pro places the executor operating system inside a VM. The execution boundaries page explains the roles of WASM checks, containers and virtual machines.

Application listeners route requests to configured WASM exports. Kubernetes ingress and the platform’s reverse proxy remain deployment components outside COS2000; an outbound HTTP primitive is a service client, not an ingress controller.

The management API can list, upload, inspect, replace and delete modules and route configurations. Module metadata includes size, SHA-256 and validation state; retained binary, contract and pseudo-code artifacts can be retrieved separately. Configurations are uploaded disabled and explicitly enabled or disabled. A referenced module cannot be deleted, and enabled configurations must be disabled before deletion.

COS2000 can also pull a publication over HTTPS using a cos2000.sync/v1 manifest: at boot, periodically, or after an authenticated refresh notification. A configured origin can serve a node-specific manifest selected by MAC address or IPv4, with a shared manifest as the documented 404 fallback.

The pull path verifies artifact sizes and SHA-256 hashes, waits for active work to drain, prepares a candidate registry and activates it atomically. A failed publication preserves the previous modules, routes and enabled state. This is atomicity for one executor’s registry, not a cluster-wide rollout guarantee.

The VM retrieves published artifacts rather than cloning Git or running repository hooks. A controller or build pipeline produces and publishes those artifacts. The registry is held in RAM; synchronization or explicit upload restores its contents after reboot.

Default ports are configurable through identity provisioning.

InterfaceDefaultPurpose
HTTP health8080GET /healthz for liveness.
HTTPS management8443Modules, configurations, compilation, synchronization, diagnostics and metrics.
HTTP application8081Enabled application routes.
HTTPS application8444Enabled routes with the current mandatory controller certificate policy.

Management paths under /v1/ are never forwarded through the application listener. A successful health probe reports liveness; module readiness and HTTPS identity provisioning have separate status.

Management HTTPS uses mutual TLS, certificate-chain validation and an exact fingerprint for the authorized controller. A separately provisioned collector can read /metrics without receiving management or execution permissions. Outbound synchronization has its own client identity, restricted to the configured origin. Ordinary outbound HTTP primitives do not transmit that identity or the controller’s credentials.

Execution, Concurrency and Resource Control

Section titled “Execution, Concurrency and Resource Control”

The integrated engine is WAMR, with distinct service and standalone paths.

PathExecution model
HTTP application servicesWAMR embedded in the COS2000 kernel, using x86-64 Fast JIT by default and sharing compiled code across prepared instances.
Standalone /exec/wasmClassic interpreter in an ELF64 user process running in ring 3, for inspection and explicit calls.

The ring-3 boundary of the standalone command does not describe the kernel HTTP execution path. Modules use WASM32, software memory checks and explicit imports. WASI, AOT, WASM threads and shared memory are disabled.

PolicyBehavior after a request
safeConsumes a pristine prepared instance and destroys it after use. Memory, globals and tables do not carry into the next request.
performanceReuses a healthy instance after normal return. Guest memory, globals and tables persist; host request context and fuel are renewed.

An instance has one active borrower at a time. Traps and exhausted fuel discard the affected instance. These policies operate inside an existing VM; they do not create a VM for every request.

COS2000 can execute WASM requests on secondary CPU workers while CPU 0 manages networking, TLS, shared services and the console. Request-local native work such as hashing or JSON processing can run on workers. Shared resources retain their required serialization.

The scheduler offers direct execution, asynchronous suspension while waiting for I/O, cooperative fairness and a preemptive mode with eligible task migration. A waiting task keeps its exclusive WASM instance and private context; concurrency still consumes bounded task and instance-pool capacity. Without secondary workers, execution falls back to CPU 0.

Execution engine, scheduling and instance lifetime are separate settings. Optional optimized JIT and CPU acceleration depend on the build profile and instructions exposed to the guest. They do not imply the same throughput on every host or hypervisor.

The inspected execution profile sets four bounds:

2 MiB

Executable module size.

8 MiB · 128 pages

Linear memory.

1 MiB each

JSON input and output buffers.

1,000,000 fuel units

Maximum metered WASM execution.

The upload registry has its own larger acceptance bound; accepting an artifact does not mean it can execute.

Native operations have separate checks and budgets. Fuel is not elapsed time or CPU cycles: a network wait can consume time without consuming WASM instructions. Task deadlines, transport limits, native-call checks and pool admission complement the instruction budget. These software controls and the VM boundary serve different purposes.

COS2000 provides an x86-64 UEFI boot environment, memory and process management, a framebuffer console and USB input. Its network stack supplies Ethernet, ARP, IPv4, ICMP, TCP/UDP, DNS, DHCP and clock synchronization, with modern Virtio-net as the QEMU default. Network status and diagnostic commands expose addressing, link state and retained driver failures. These are OS facilities; WASM modules reach external resources through their declared primitives and bindings.

Boot configuration covers network addressing, DNS, clock synchronization, execution defaults, artifact synchronization and identity provisioning. Generated configuration is packaged in the boot image. Runtime shell changes do not automatically persist into the next boot.

Local toolWhat an operator can do
ShellInspect networking, certificates, listeners, CPUs and tasks; list and execute loaded modules; use the verified HTTP(S) client.
F8 CompilerEdit contracts, compile pseudo-code and inspect retained source, WASM instructions, imports, exports and binary sections.
F9 DebugStep through interpreted WASM and use breakpoints.
F10 ServiceManage modules and configurations, enable routes, inspect journals and statistics.
F11 ExplorerBrowse files and registry artifacts, inspect binary previews and edit text in a small RAM workspace.
haltRequest an ordered local shutdown of services, devices and secondary CPUs before firmware power-off.

The local console is trusted administration without a user-login model. Remote administration keeps its separate mTLS policy.

The COS2000-specific screen.print primitive can draw bounded UTF-8 text or individual pixels on the local console when explicitly allowed. This is local display output, separate from a service’s HTTP response or a browser frontend.

Published modules, routes, pseudo-code and contracts appear as read-only files under /ram. A separate /ram/files workspace supports a bounded set of editable text files and loses its contents at reboot. It does not replace application file storage or a persistent volume. Boot-image files and published registry artifacts cannot be modified by saving an Explorer draft.

The current implementation includes a local halt command. It begins immediately, cancels outstanding service work and waits up to five seconds for it to drain. If that phase cannot complete, shutdown is cancelled before device teardown and the shell remains available for diagnosis.

After this barrier, COS2000 stops the network and USB devices, attempts to stop secondary CPUs and requests firmware power-off through UEFI. A limited ACPI S5 fallback is available when the supported firmware data permits it; it is not a general AML interpreter. Once device teardown has begun, the path does not return to the shell. A failure to confirm CPU shutdown, or a firmware call that returns, leaves a diagnostic explaining that the machine is halted but still powered.

This is a guest operating-system operation, separate from KubeVirt’s VM lifecycle. It does not persist the RAM registry, cache or editable workspace, and it does not establish a Kubernetes graceful-termination integration.

The management HTTPS /metrics endpoint exports Prometheus measurements for requests, invocations, fuel, memory, instance pools and JIT compilation. Application and management journals give operational summaries; correlated diagnostics connect a request with its worker, WASM instance, native calls and network waits.

Application responses carry X-COS2000-Request-Id. An authorized controller can retrieve the retained timeline or request a diagnostic capture through /v1/diagnostics; the shell provides the same inspection family. Histories are bounded and in memory, with explicit indicators for dropped events or incomplete captures. A capture is not a stop-the-world snapshot or a source-level trace of every instruction.

In KubeVirt, each VM needs a distinct metrics target and stable labels. Combining VMs behind one load-balanced target would mix independent counter histories. COS2000 holds current counters; external Prometheus-compatible storage supplies history, dashboards and alerting.

These capabilities were checked against the sibling cos2000v2 source tree. Paths identify implementation evidence, not public download links.

Source paths by subsystem
AreaSource paths
OS and provisioningREADME.md, docs/NETWORK.md, docs/CPU.md, docs/IDENTITY.md
Compiler and typed contractsservices/compiler_service.c, docs/PSEUDO_CODE.md
Primitive implementationsservices/primitives.c, services/primitives_crypto.c, docs/PRIMITIVES.md
External resources and cacheservices/primitives_external.c, services/PRIMITIVE_BINDINGS.md
Services and publicationservices/api.c, services/sync.c, docs/SERVICES.md, docs/SYNC.md
Engine and schedulingwasm/module.c, wasm/kernel/config.h, lib/workers.c, docs/ASYNC.md
Local toolsdocs/PSEUDO_CODE.md, docs/EXPLORER.md, docs/WASM.md
Controlled shutdownlib/power.c, lib/uefi_power.c, lib/acpi_power.c, lib/smp.c, services/server.c
Metrics and diagnosticsservices/metrics.c, services/diagnostics.c, docs/METRICS.md, docs/DIAGNOSTICS.md

Continue with the capability catalog, sigMAX Pro or WASM execution boundaries.