~ober/jerboa-asm

Imported from ~/mine/jerboa-asm

download snapshot

about

# jasm

`jasm` is a pure Jerboa binary-to-assembly source library and CLI.

The goal is to grow toward `llvm-objdump`-style decoding and output parity
without linking to LLVM, shelling out to LLVM tools, using FFI, or requiring
external libraries at runtime.

## Current Scope

- Pure Jerboa decoder core.
- Seed x86-64 decoder for common prologue/control-flow instructions.
- Seed AArch64 decoder for common integer/load/store/return instructions.
- A Jerboa CLI for raw byte disassembly.

Object-file readers and broader ISA tables live in Jerboa `.ss` source modules.

## Security and Release Gates

```sh
make verify
make release-evidence
```

`make verify` runs the local security baseline, import check, normal tests,
malformed parser regression tests, deterministic object-fuzz evidence, and
native binary smoke tests. Release evidence is written to
`dist/release-evidence/` with SBOM, reproducibility, and target proof status.

Runtime file reads are bounded by `JASM_MAX_INPUT_BYTES` (default 64 MiB). Raw
hex CLI input is bounded by `JASM_MAX_HEX_CHARS` (default 16 MiB).

Generated native artifacts are ignored and must not be tracked. The root `jasm`
binary is built by `make binary` and is a release artifact, not source.

Production support also requires a reviewed `JASM_TARGET_PROOF_FILE` with the
markers documented in `docs/release-evidence.md`. `JASM_REQUIRE_TARGET_PROOF=1`
fails closed when that target proof is missing or incomplete.

## Run

```sh
make verify
make binary
./jasm raw --arch x86-64 --syntax intel --hex '55 48 89 e5 c3'
./jasm raw --arch aarch64 --hex '20 00 80 d2 c0 03 5f d6'
./jasm raw --arch mips --hex '27 bd ff e0 03 e0 00 08'
```

## Security Docs

- `SECURITY.md`
- `docs/threat-model.md`
- `docs/parser-hardening.md`
- `docs/release-evidence.md`

## Source API

```scheme
(import (jerboa prelude))

(include "lib/jasm/instruction.ss")
(include "lib/jasm/format.ss")
(include "lib/jasm/disasm.ss")

(disassemble->string 'x86-64 (hex-string->bytevector "55 48 89 e5")
  '((syntax . intel) (address . 0)))
```

recent commits