Phase 5 foundation: per-platform go:embed split [draft, stacks on #2] - #3
Merged
Merged
Conversation
Implements epic Open Concern #8: one binary can embed only one platform's ONNX Runtime library, so the ORT go:embed moves out of the shared assets_embed.go into per-platform assets_embed_<GOOS>_<GOARCH>.go files (darwin-arm64 first; each defines embeddedORTLib + ortLibFile). Model and tokenizer stay in the shared embed — identical bytes on every platform. Each later Phase 5 platform lands as one sibling file + manifest entries. Also, prerequisites for building on Linux at all: - Makefile: portable SHA256 var (sha256sum on Linux, shasum -a 256 on mac) - dylibCandidates: add the versioned libonnxruntime.so.1.26.0 the official Linux tarball actually ships - tripwire test: ortLibFile must be a name findDylib recognizes No behavior change on darwin-arm64: untagged tests green, tagged integration test passes (Phase 0 distance ordering reproduced), packaged app re-extracts embedded assets and answers an MCP search. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The prerequisite for every Phase 5 platform (epic Open Concern #8): one binary can embed only one platform's ONNX Runtime library, so the hardcoded macOS dylib embed moves into per-platform
assets_embed_<GOOS>_<GOARCH>.gofiles. Model + tokenizer stay in the shared embed (identical bytes everywhere).Stacks on #2 (Phases 0–4) — review that first; this diff is only the foundation.
Changes
assets_embed_darwin_arm64.go— the per-platform piece: ORT embed directive +embeddedORTLib+ortLibFile. Each later platform (Linux, Windows, macOS-Intel) adds one sibling file + manifest entries, nothing else.assets_embed.go— platform-neutral now; extraction reads the lib from the per-platform FS.assets.go—dylibCandidatesgains the versionedlibonnxruntime.so.1.26.0the official Linux tarball ships.Makefile— portableSHA256(Linuxsha256sum/ macOSshasum -a 256) somake assetsruns in Docker/CI.ortLibFilemust be a namefindDylibrecognizes.Verification (darwin-arm64 — zero behavior change)
go test ./...green, untagged build stays native-lib-freego vet ./...cleanmake buildsucceeds; packaged app re-extracted its embedded assets from scratch (runtime dir cleared first) and answered an MCP stdio searchNext PRs (per epic Phase 5 plan)
Linux (Docker) → macOS x86_64 (Rosetta) → Windows x64 (Rust tokenizer build).
🤖 Generated with Claude Code