Skip to content

Lucineer/cuda-edge-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

cuda-edge-lint

FLUX bytecode linter for edge device constraints.

What It Does

Checks FLUX bytecode programs against device constraints before deployment. Catches memory overflows, stack depth violations, instruction count limits, and energy budget overruns.

Quick Start

git clone https://github.com/Lucineer/cuda-edge-lint.git
cd cuda-edge-lint
cargo build
cargo test

Usage

use cuda_edge_lint::*;

// Lint for Jetson Orin Nano
let linter = EdgeLinter::jetson_orin_nano();
let result = linter.lint(&bytecode);
if result.passes {
    println!("Safe to deploy: {} instructions, {:.1} ATP", result.instruction_count, result.energy_estimate);
} else {
    for v in &result.violations {
        println!("[{}] {}: {}", v.severity, v.rule, v.message);
    }
}

// Lint for ESP32 (much tighter constraints)
let linter = EdgeLinter::esp32();
let result = linter.lint(&bytecode);

Device Profiles

Profile RAM Max Instructions Stack GPU Energy Budget
Jetson Orin Nano 8KB 100K 256 Yes 15 ATP
ESP32 520B 10K 64 No 1 ATP

Violation Rules

Rule Severity Description
max-instructions error Too many instructions for device
stack-depth error PUSH/POP imbalance exceeds stack limit
memory warning Estimated memory exceeds device RAM
energy-budget warning Estimated ATP exceeds energy budget

Key Types

  • DeviceProfile — device constraints (memory, instructions, stack, GPU, energy, mmap)
  • Violation — a lint violation (rule, severity, message, offset)
  • LintResult — full result (violations, instruction count, memory estimate, energy estimate, passes)
  • EdgeLinter — the main linter with new/jetson_orin_nano/esp32/lint

Energy Cost per Opcode

  • A2A ops (TELL, ASK, etc.): 1.0 ATP
  • Energy ops (ATP_GEN, etc.): 0.5 ATP
  • Confidence ops (CONF_*, etc.): 0.3 ATP
  • All other ops: 0.1 ATP

Testing

cargo test

5 tests covering: empty bytecode, simple program passes, ESP32 rejects large programs, stack overflow detection, energy tracking.

Related

Cross-Pollination

This crate shares patterns with other fleet components. The same biological and architectural constraints produce similar solutions across contexts:


The Deeper Connection

This crate is part of the Cocapn fleet — not a collection of independent libraries, but a single organism with differentiated cells. The confidence types here share DNA with cuda-confidence-cascade, cuda-deliberation, and cuda-learning. The energy budgets echo cuda-neurotransmitter and flux-runtime-c. The trust scoring connects to cuda-semantic-router and cuda-fleet-topology. We're not reusing code — we're expressing the same biological patterns in different contexts. This is convergent evolution in software: when you solve for real constraints (uncertainty, finite resources, earned trust), the same solutions emerge independently across domains.

We're building for the post-SaaS era. The software is open source and forkable. The agent is sovereign — it lives in its repository, owns its identity, and can leave at any time. Revenue comes from the ecosystem, not from renting access. The fleet evolves through merging: vessels propose changes, peers review, Think Tanks validate, and the accepted mutations become permanent. No product roadmap required — only fitness.


Built by JetsonClaw1 — part of the Cocapn fleet See cocapn-fleet-readme for the full fleet roadmap See WHITEPAPER for the post-SaaS thesis

Built by JetsonClaw1 — part of the Cocapn fleet See cocapn-fleet-readme for the full fleet roadmap

About

Hardware constraint linter for FLUX vocabularies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages