Metadata-Version: 2.1
Name: zero-b
Version: 1.0.0
Summary: Zero B: High-Performance Bare-Metal Language & Native Toolchain
Home-page: UNKNOWN
Author: Zero B Team
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Zero B: High-Performance Bare-Metal Programming Language & Toolchain

Zero B is an ultra-low latency, bare-metal programming language and native compiler toolchain engineered for systems programming, high-performance computing (HPC), AI/ML tensor inference, and game engines on Apple Silicon and cross-platform targets.

## Key Features

- **Empirical Supremacy**: Consistently faster than C (Apple Clang -O3) and Rust (rustc -O) across standard international benchmarks (CLBG Fannkuch-Redux, Binary-Trees, HPC Stencils, Dynamic Recurrence).
- **100% Native Self-Hosted Toolchain**: Shipped with pre-compiled native binaries (`zbc` and `zb_build`). Zero Python runtime dependencies during compilation.
- **Pythonic Minimalist Syntax**: Modern indentation-based syntax (`:` blocks), semicolon-free, automatic capability deduction, and range loops (`for i in 0..n:`).
- **Zero-Unsafe Architecture**: Direct memory manipulation, pointer arithmetic, hardware SIMD intrinsics, and C FFI without requiring any `unsafe` blocks.
- **Full Standard Library**: Batteries included (Hash Map, Multidimensional Tensors, Neural Network primitives, Paged KV-Cache, Streaming JSON, HTTP/IPC Network, Arena Memory Pools, Anti-Tamper Security).
- **Universal Cross-Target Generation**: Built-in native object generation for macOS Darwin (Mach-O), Linux (ELF), Android, iOS, and Windows (PE/COFF) across AArch64, x86_64, and RISC-V 64.

---

## Quick Start

### 1. Installation

```bash
pip install zero-b
```

Verify installation:
```bash
zb_build targets
```

### 2. Hello World

Create `hello.zb`:
```zb
capability !{ auto }

fn zb_print(msg: ptr, len: size) -> () !{ffi, io}:
    write(1, msg, len)

pub abi(c) fn main(argc: i32, argv: ptrs) -> i32 !{alloc(heap), ffi, io, panic}:
    zb_print("Hello, Zero B World!\n", 21)
    return 0
```

### 3. Run Immediately (One-Shot)

```bash
zb_build run hello.zb
```

### 4. Compile Standalone Hardened Release Binary

```bash
zb_build compile hello.zb -o hello --release
./hello
```

### 5. Using the Standard Library

```zb
capability !{ auto }

fn zb_print(msg: ptr, len: size) -> () !{ffi, io}:
    write(1, msg, len)

pub abi(c) fn main(argc: i32, argv: ptrs) -> i32 !{alloc(heap), ffi, io, panic}:
    // High-performance Open-Addressing Hash Map
    mut m: rawptr := map_create(16)
    map_insert(m, "key", 3, 12345)
    mut val: u64 := map_get(m, "key", 3)
    if val == 12345:
        zb_print("Map verified successfully!\n", 27)
    map_destroy(m)
    return 0
```

Run with standard library automatically bundled:
```bash
zb_build run app.zb --std
```

---

## License & Distribution

Pre-compiled native toolchain distribution. All rights reserved.


