Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/omega-bridge
# omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
Unfinished: not checked yet
There is no published receipt of a rebuild from its source yet. What a receipt is
Get this repository
Git over HTTPS
`git clone --no-checkout https://interplane.io/projects/omega-bridge/repo.git omega-bridge && git -C omega-bridge checkout --detach 9a0669d3a2e3f90535149c1838a01911f31d6c56`
Source archive of `9a0669d3a2e3f90535149c1838a01911f31d6c56`
Download ZIP · tar.gz
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
README.md
# Omega Bridge
Omega's compatibility gateway. `src/toc.om` is an Omega program that converts a checked, bounded Omega subset into executable C and Python; `src/native.om` generates bindings so existing C, C++, Python, Rust, Zig and Go code calls compiled Omega; `src/gpu_adapter.om` negotiates and admits GPU artifacts and runs no kernel. Apache-2.0 WITH LLVM-exception.
Ownership rule (ARCH-0042 , Accepted (Drake, 2026-10-30)): Omega owns computation, CUDA++ owns GPU execution, Omega Bridge owns compatibility.
- Omega Bridge (this repository) owns compatibility: conversion to C and Python, native-call bindings, framework attachments (MAX conformance; PyTorch and GGML pending (#23/#30, ggml-omega#1/#2)) and GPU artifact negotiation. It exists so existing ecosystems can adopt Omega without rewriting; it makes them optional and does not constrain Omega to them.
- Omega owns computation: the language and its semantics, the seeded compiler and its pin. This repository builds with that compiler; it is not a second Omega compiler. Today `tools/bootstrap.sh` replays the seed itself and `src/toc.om` keeps its own front end; both stay as they are, and new compiler work goes to Omega (omega-mv#870 , omega-mv#871 ).
- CUDA++ owns GPU execution: encoder, GPU code generation, cubin writer, artifact admission, driver client and runtime. Omega device runs here go through CUDA++ (`conformance/build.sh` links `conformance/omega_runner.c` against its `libomega_gpu.a`; `tools/run-device-window.sh` calls its `cubin_probe`).
The source-only bootstrap of the pinned Omega compiler currently requires Linux AArch64. Generated C uses GNU C11 and POSIX; generated Python uses Python 3. This branch has local differential tests and caller demos; independent review remains required before release. No universal conversion or performance improvement is claimed.
## How it works / How I built it
`tools/bridge c|python file.om` checks two hashes: the converter against its source and the seed compiler against pin `191b776e…`. It then takes one snapshot of the input. The pinned Omega seed compiler checks the whole unit, and `build/bridge` (compiled from `src/toc.om`) parses that snapshot into typed expression nodes. Separate writers emit C or Python from those nodes. The generated program prints the same output, exits with the same status and traps with the same code as native Omega. A feature outside the subset is refused with its error code and nothing on stdout. Conversion never installs anything, so rollback means you stop importing the file.
`src/toc.om` was recovered from uncommitted omega source on base `29b12760`. Run unchanged, its emitter failed 8 of 20 inherited cases: traps turned into exit 0 or a segfault (evidence/01-recovered-red.log ). It was replaced by checked typed nodes. Limits: scalar subset only (no text, floats or heap), and the bootstrap proves a fixpoint, not DDC. The walkthrough has the full story, a source map, and an offline recipe with a positive case, a refusal case (exit 24) and a tampered-pin control (exit 65).
Build from exact pinned source:
```
quiet-build tools/bootstrap.sh
quiet-build tools/build.sh
quiet-build tools/test.sh
```
On a host without quiet-build, run those scripts directly. The bootstrap fetches the exact Omega source commit recorded in docs/PROVENANCE.md. Access to the upstream repository is required. An existing checkout can supply it through OMEGA_SOURCE; it is read only. No compiler binary is stored in this repository. If you already have the qualified seed, OMEGA_SEED can name it; its fingerprint is enforced.
The `Portable bridge behavior` workflow runs the existing baseline suite, `tests/seeded.py`, `tests/seeded_float.py`, `tests/seeded_views.py`, and `tests/freest.py` on disposable Linux AArch64 runners. It source-bootstraps the baseline, checks the exact seeded compiler hash, and exercises the pinned CUDApp revision/epoch roots. This is executable behavior and refusal coverage, not CodeQL or device qualification. Native x86 compiled-C consumer coverage is separate in CUDApp's `Ampere native x86 host` workflow; the failing native Omega compiler923 is not a dependency of either route.
The scalar profile admits unsigned shifts only when the count is a literal or resolved scalar constant below the operand's width. Dynamic, negative, boolean, signed-operand and out-of-width shifts remain refused across the whole unit, including unused helpers. Count validation precedes emission; the generated C uses unsigned operations, masking left-shift results to the source width. `tests/freest.py` compares accepted shifts against the pinned seed and challenges the result with a wrong-direction mutant.
Convert and run an example:
```
tools/bridge c tests/fixtures/fib.om > build/fib.c
gcc -std=gnu11 -O2 build/fib.c -o build/fib
build/fib
tools/bridge python tests/fixtures/fib.om > build/fib.py
python3 build/fib.py
```
Output goes to stdout only after the complete conversion succeeds. Source validation is mandatory. Conversion creates isolated temporary build files and never installs or replaces an application. Inspect generated output before opting to link or import it.
Run real C and Python application callers:
```
quiet-build python3 tests/attachments.py
```
See supported features and limits , caller ABI and ownership , design and study decisions , and provenance . Heap operations and other target languages are explicitly unsupported by the C/Python converters. Read-only text constants convert exactly in the baseline `tools/bridge c|python` (text conversion , checked by `tests/text.py`); inline text literals stay refused. The additive seeded C frontend supports f32/f64 scalars, constants, arithmetic and fsqrt, public float scalars and ushort/uint/f32 views and arrays (`tools/bridge-seeded c|h`, checked by `tests/seeded_float.py` and `tests/seeded_views.py`). The native `tools/native --float` profile also exposes typed scalar floats in C, Python, Rust, Zig and Go (`tests/native/float.py`); its compiler pin is separate from the baseline. GPU interoperability is a separate, opt-in adapter boundary (it converts no host program): see GPU adapter and the support matrix . Python/C input conversion is not implemented. The Python test harness is infrastructure; all conversion logic and both runtime emitters are in src/toc.om .
C shared libraries: `tools/bridge-seeded lib-c|lib-h|lib-map unit.om` (cabi-1) lowers one seeded Omega unit with `note cabi` declarations into library C, a public header and a version script, with lock-wrapped exports that publish outputs only after bounds checks and a provenance trailer `build/bridge` re-verifies. Checked by the seeded gate `tests/cabi/gate.om`; see C ABI library mode .
PyTorch: `torch.compile(model, backend="omega")` runs a small set of float32 core-ATen ops (mm, addmm, 2-D transpose, add, relu, softmax) on CPU through Omega-generated AArch64 kernels called via the native call ABI, and refuses everything else. The Python under `pytorch/omega_torch/` is interim glue that computes no tensor value. Exercised on CPU against PyTorch eager only; see docs/OMEGA-TORCH.md .
DeepInfer (deepseek-ai/DeepInfer) is a proposed translation and attachment target; its inventory, measured import coverage and extension plan are in DeepInfer as a bridge target .
Call compiled Omega in place from six languages (the native call adapter, a separate claim from conversion: it runs Omega's own machine code, it does not turn Omega into another language):
```
OMEGA_NATIVE_OMC= tools/native build/native tests/native/madd.om
```
That writes `libomega_native.so` and, from the same Omega signatures, `omega_native.h` (C and C++), `omega_native.py`, `omega_native.rs`, `omega_native.zig` and `omega_native.go`; a program includes or imports its file and calls `omega_madd`, nothing is declared by hand. One generator, src/native.om , writes all six. Contract, limits and the qualification run: native call ABI .
A worked integration: examples/deepinfer replaces DeepInfer's `FlopsEstimator` pair-count helpers with an OM-2 unit called through these bindings, differential-tested against the pinned upstream code.
`f32` and `ushort` array kinds (4-byte and 2-byte elements) are qualified by `OMEGA_NATIVE_OMC= sh tests/native/kinds.sh`. The contract is in native call ABI .
`tools/native --host` admits nine OM-2 file/identity words, three clocks and twelve bounded device words with the staged context-format compiler. Select AArch64 Linux by default or x86-64 Linux with `--target x86linux`; each hosted target enforces its own compiler fingerprint. Without the flag every host word is refused. Mapping libraries retain default128-slot exports and add C exports selecting explicit contexts with capacity1..4098. Owned fixed bind replaces only a PROT_NONE reservation. A failed bind retires the token after successful cleanup; cleanup failure quarantines the owned slot until `mapdrop` retries. This is a draft contract requiring Drake approval before merge. Compiler custody, generation ownership and destruction rules are in the native call ABI . `tests/native/v2/dev/run.py` exercises libc ioctl comparisons, shared-memfd publication, fixed-bind/context controls and runtime/compiler mutants on AArch64. `tests/native/x86/device.py` runs the same fixtures under the QEMU10.0.14 oracle and adds x86 syscall and MFENCE controls. Emulation is not native x86 qualification. GPU/chip qualification is NOT_RUN.
The staged AArch64 profile also admits five exact aien-gpu ABI1 ioctl requests, not the whole `'A'` family. CPU-only callers use fd-1 and check exact-length guards against libc; device, driver and GPU integration remain NOT_RUN. This trust-surface draft also requires Drake approval before merge. See the exact compiler fingerprint and request list in `docs/NATIVE-ABI.md`.
The native target defaults to `aarch64linux`. Hosted x86-64 SysV Linux bindings are selected explicitly; there is no build-host architecture inference:
```
OMEGA_NATIVE_OMC=/path/to/baseline/omc \
OMEGA_NATIVE_X86_OMC=/path/to/x86/omc \
CC=x86_64-linux-gnu-gcc \
tools/native --target x86linux build/native-x86 tests/native/madd.om
```
The existing pinned `OMEGA_NATIVE_OMC` remains required to build the generator. The separately pinned `OMEGA_NATIVE_X86_OMC` compiles both OM-1 and OM-2 inputs; its target directive is not added to the source identity. Pins and the exact generator contract are in native call ABI . `--freestanding` also accepts `--target x86linux` (omega-mv#940). Cross-building a library does not execute its callers. QEMU results are emulator evidence, not native x86-64 qualification; native execution is NOT_RUN until exercised on an x86-64 host. The historical AArch64 evidence does not qualify this x86 integration. The x86 emulator suite selects its oracle with `QEMU_X86_64`; use the unpatched QEMU 10.0.14 oracle and guest Python setup documented in native call ABI . QEMU 8.2.2 has observed signal and `/proc/self/maps` limitations for these callers. At the current x86 compiler pin, the full suite plus mismatched-pin and failed/missing-toolchain controls passed EMULATED; see the pinned receipts . Earlier pins' receipts remain in `evidence/native-x86-62775d2a.json`, `evidence/native-x86-badedbb0/`, `evidence/native-x86-f7752bc5/` and `evidence/native-x86/`. Physical x86 execution remains NOT_RUN.
## Pending Linux kernel-leaf envelope experiment
`src/kernel_leaf.om` emits a fixed-symbol AArch64 assembly envelope for the companion restricted `kleaf` compiler experiment. It matches the inspected Linux `7.0.0-1019-nvidia` leaf tracing/PAC metadata, not an arbitrary kernel ABI. It requires trusted compiler/source custody: framing checks are not a general machine-code verifier. It does not implement driver policy, Linux effects, a module loader or the userspace native trampoline.
This source-only experiment is not integrated into `tools/native`, does not change any compiler fingerprint or production admission path, and is not a kernel/GPU qualification claim. The compiler-side `seed/omc/kernel-leaf-experiment.py` is its host oracle and exact kbuild-object comparison. GNU assembly/object tooling remains a disclosed build dependency.
## Framework attachments
Framework Attachment Scope (receipt)
llama.cpp / ggml aien-dev/ggml-omega , an out-of-tree ggml backend built on `src/native.om` host device (draft ggml-omega#1): 16 ops on Omega CPU code; opt-in `OmegaGB10` device (draft ggml-omega#2): MUL_MAT, RMS_NORM, swiglu on the GB10 through CUDA++ (CUDApp#139 `gemm_ex`), every other op on ggml's CPU backend; test-backend-ops against the CPU backend on the chip, MUL_MAT 871 / RMS_NORM 7 / SWIGLU 12 cases OK, 0 FAIL
PyTorch attach/torch : `torch.library` ops `cudapp::mm` (f32, bf16, f16) and `cudapp::swiglu` (f32) calling CUDA++ (`omega_gpu_gemm_ex`, `omega_gpu_swiglu_f32`) on the GB10 CPU tensors in and out (staged to the chip per call), no autograd; checked against torch CPU plus `torch.library.opcheck` and a mutant (`attach/torch/test_cudapp_torch.py`); receipt `evidence/attach-gb10-20261027T0726Z/`, EXERCISED on a single GB10
`attach/torch` is migration-pending host glue (`ctypes` at the torch ABI surface, switch `MIGRATION_PENDING`); its named successor is the `omega_native.py` binding that `tools/native` writes (the `python` word of `src/native.om`) once CUDA++ entries are callable as Omega units. Neither attachment has run a model on the GB10 yet: that needs an exclusive GPU window.
## Human-Directed Agentic Engineering
Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions.
For the documented method and a systems-software case study, see Gregory M. Kurtzer, Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering (2026) . This method citation does not widen the checked conversion subset or replace independent review.
## License
First-party material is licensed under the Apache License, Version 2.0 with LLVM Exceptions (`Apache-2.0 WITH LLVM-exception`). See LICENSE and NOTICE . The LLVM exception permits compiled object code derived from this software to be redistributed under terms of the recipient's choosing. Third-party components keep their own notices.
## For developers: proof and records
The full record of this project. Words that are used only here are explained once:
ID
The project's permanent id on Interplane: the SHA-256 of its first signed record. This one is `git:e5d8f4e54790fa57b920ac38a945ede952471a55004ea25af70e1cb48b63816a`. Its old id, kept only so that old links still work: `z3Hr9ZaiKHwwuNzPK5M8c7uw6pj7y`.
Owner
The key that signs every record of the project. This forge lists the project under drakestapleton; its key is `SHA256:qg3vxoE9ul3Cgk5heosQvPmO9pqIJNsdcsGJ2cHghTs`.
Refs and HEAD
Refs are the names that point at versions: branches and tags. HEAD is the version a fresh copy starts from, the newest commit of the default branch.
Patch
A proposed change, reviewed before it is merged. This forge does not show proposed changes from its own store yet. The list is under Proposed changes .
Receipt
A public record that someone checked a claim, with the fingerprint of its evidence file. The state at the top of this page is read from the list at interplane.io/receipts . This project has no receipt in that list yet.
Clones and fetches over HTTPS: 7 by visitors (git smart-HTTP `info/refs` requests answered 200 in the front-door download log; our own addresses and bots left out; since 2026-11-08) · not measured `git-upload-pack` requests from all clients (the source of this count is retired)
Downloads: 13 by visitors (13 source archives, 0 release assets; forged access log; our own addresses left out; since 2026-11-07)
commit `9a0669d3a2e3f90535149c1838a01911f31d6c56` Branches Tags History
`9a0669d` Use len us / len uns bounds (1024) in uname, bname, and unit-name tables Drake Stapleton committed 2026-11-21
```
.github/
attach/
conformance/
docs/
evidence/
examples/
max-cpu/
pytorch/
src/
tests/
tools/
.crumb 4302
.gitignore 75
AGENTS.md 12784
AUDIT_SCOPE.md 15065
LICENSE 12278
MISSION-REPORT.md 7983
NOTICE 1348
README.md 15604
SECURITY.md 3045
```
Every record: History (commits) · Branches · Tags · Releases, with the SHA-256 of each download · Patches · Issues · This project as JSON