mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
protocol carries the events and the ten actions, and every action carries the id its dispatch and completion are recorded under. encode and decode are the only two functions that know the byte format, so ZAP takes over from serde_json without moving a type or a symbol. core is a Session with step, snapshot and restore, and no effects at all: no filesystem, no process, no socket, no runtime. codex-core is not separable as it stands — tokio, an HTTP client, a rollout store, a pty — so the model-request and tool-result loop is driven here, and the module doc names what stays coupled upstream. An observation is accepted only while its id is outstanding, so a replayed result runs nothing twice. ffi is the C ABI: seven symbols, generational handles so a stale one is refused rather than resolving to the next session, catch_unwind on every entry point so a panic poisons one session instead of aborting the process, and dev.h written beside it. A C program exercises the archive. protocol and core build for wasm32-wasip1; make wasm is the check. Co-authored-by: Hanzo Dev <[email protected]>
71 lines
2.3 KiB
Makefile
71 lines
2.3 KiB
Makefile
TOOL := cargo run --quiet --manifest-path crates/hanzo-upstream/Cargo.toml --
|
|
CARGO := RUST_MIN_STACK=8388608 cargo
|
|
|
|
.PHONY: all prepare build release install test test-upstream wasm bump v8 fmt clean reset help
|
|
.DEFAULT_GOAL := help
|
|
|
|
all: build
|
|
|
|
## prepare: apply the owned edits to the pinned upstream checkout
|
|
prepare:
|
|
@$(TOOL) prepare
|
|
|
|
## build: build the dev binary
|
|
build: prepare
|
|
@$(CARGO) build --locked -p hanzo-dev --bin dev
|
|
|
|
## release: build the optimized dev binary
|
|
release: prepare
|
|
@$(CARGO) build --locked --release -p hanzo-dev --bin dev
|
|
|
|
## install: put the release binary on PATH
|
|
install: release
|
|
@$(CARGO) install --locked --path crates/hanzo-dev --bin dev
|
|
|
|
## test: run the Hanzo test suite
|
|
# hanzo-upstream is a detached workspace, so the root run cannot see it — and it
|
|
# is the code that edits upstream in place, which is the last thing to leave
|
|
# untested.
|
|
test: prepare
|
|
@$(CARGO) nextest run --locked --no-fail-fast $(ARGS)
|
|
@$(CARGO) nextest run --no-fail-fast --manifest-path crates/hanzo-upstream/Cargo.toml $(ARGS)
|
|
|
|
## wasm: build the reasoning half for wasm32-wasip1
|
|
# protocol and core carry no effects, so they run wherever a wasm host runs.
|
|
# ffi is native by definition and stays out of this.
|
|
wasm:
|
|
@$(CARGO) build --locked --target wasm32-wasip1 -p dev-protocol -p dev-core
|
|
|
|
## test-upstream: run the upstream suite against the pinned submodule
|
|
# voice-host wants GStreamer >= 1.28, which no current distribution ships, and
|
|
# nothing else in the workspace depends on it.
|
|
test-upstream: v8
|
|
@. target/v8-env.sh && $(CARGO) nextest run --no-fail-fast \
|
|
--manifest-path upstream/codex/codex-rs/Cargo.toml \
|
|
--workspace --exclude codex-voice-host $(ARGS)
|
|
|
|
## bump: move the upstream submodules to newer revisions
|
|
bump:
|
|
@$(TOOL) bump $(ARGS)
|
|
@$(TOOL) prepare
|
|
|
|
## v8: download and verify the V8 build the JavaScript runtime links
|
|
v8:
|
|
@$(TOOL) v8
|
|
|
|
## fmt: format the crates Hanzo owns
|
|
fmt:
|
|
@$(CARGO) fmt -p hanzo-dev -p hanzo-config -p hanzo-tui -p dev-protocol -p dev-core -p dev-ffi
|
|
@$(CARGO) fmt --manifest-path crates/hanzo-upstream/Cargo.toml
|
|
|
|
## clean: discard build output
|
|
clean:
|
|
@$(CARGO) clean
|
|
|
|
## reset: return the upstream checkout to its pinned revision
|
|
reset:
|
|
@git submodule foreach --quiet 'git reset --quiet --hard'
|
|
|
|
help:
|
|
@grep -hE '^## ' $(MAKEFILE_LIST) | sed 's/## / make /' | sort
|