brik64-core 0.1.0-beta.4

BRIK64 Rust SDK beta for monomer helpers and EVA composition patterns aligned with CLI 0.1.0-beta.4.
Documentation

brik64-core

Crates.io docs.rs License

Rust SDK beta for BRIK64 monomer helpers and EVA composition patterns.

Current SDK beta: 0.1.0-beta.4 Aligned CLI beta: 0.1.0-beta.4

Installation

[dependencies]
brik64-core = "0.1.0-beta.4"

# With SHA-256 support:
brik64-core = { version = "0.1.0-beta.4", features = ["sha2"] }

The BRIK64 CLI is distributed separately in beta4:

curl -fsSL https://brik64.com/cli/install.sh | bash

Usage

use brik64_core::{mc, eva};

// Direct monomer use
let sum = mc::add8(200u8, 100u8);      // wrapping: 44
let (q, r) = mc::div8(17u8, 5u8);      // (3, 2) — division by zero safe
let s = mc::concat("hello", " world"); // "hello world"

// EVA sequential composition ⊗
let pipeline = eva::seq(
    |x: (u8, u8)| mc::add8(x.0, x.1),
    |sum| mc::mod8(sum, 10),
);
let result = pipeline((7u8, 8u8)); // add8(7,8)=15 → mod8(15,10)=5
assert_eq!(result, 5);

// EVA parallel composition ∥
let dual = eva::par(mc::add8, mc::xor8);
let (a, b) = dual((10u8, 5u8), (0b1100u8, 0b1010u8));
assert_eq!(a, 15);
assert_eq!(b, 0b0110);

// EVA conditional composition ⊕
let transform = eva::cond(
    |x: &i64| *x % 2 == 0,
    |x| x * 2,
    |x| x / 2,
);
assert_eq!(transform(4i64), 8);
assert_eq!(transform(5i64), 2);

Monomer Families

Family Range Functions
Arithmetic MC_00–07 add8, sub8, mul8, div8, mod8, abs64, neg64, clamp
Logic MC_08–15 and8, or8, xor8, not8, shl8, shr8, bool_and, bool_or
Memory MC_16–23 load, store, push, pop, peek, alloc, free, len_mem
Control MC_24–31 mc_if, mc_loop, nop, halt, cmp_eq, cmp_lt, cmp_gt, mc_call
I/O MC_32–39 read_file, write_file, append_file, read_str, write_stdout, write_stderr, file_exists, file_size
String MC_40–47 concat, substr, trim, len, contains, starts_with, ends_with, char_at
Crypto MC_48–55 hash_sha256*, hash_hex*, xor_bytes, rotate_left, rotate_right, constant_eq, zero_bytes, bytes_to_hex
System MC_56–63 time_unix, time_ms, env_get, env_set, pid, args, exit_code, sleep_ms

* Requires features = ["sha2"]

EVA Algebra

Operator Function Description
eva::seq Sequential: B(A(x))
eva::par Parallel: (A(x), B(y))
eva::cond Conditional: if pred { A(x) } else { B(x) }

Beta Boundary

This package is a beta SDK surface for Rust projects. It is useful for examples, local integration, and working with BRIK64-style monomer and EVA concepts in application code.

It does not by itself establish formal certification, N5/L5+N5 status, self-hosting, fixpoint, production approval, or CLI installation.

Digital Circuitality

License

Proprietary — All rights reserved. © 2026 Carlos J. Pérez.