Skip to content

refactor: remove @embedFile, switch to fetch-first workflow - #34

Merged
N283T merged 6 commits into
mainfrom
feature/remove-embedfile
Apr 16, 2026
Merged

refactor: remove @embedFile, switch to fetch-first workflow#34
N283T merged 6 commits into
mainfrom
feature/remove-embedfile

Conversation

@N283T

@N283T N283T commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove the embedded PDBx dictionary and two-stage build from build.zig
  • Simplify dictionary resolution in main.zig to 3-tier (--dict → env → cache → error)
  • Delete src/compile_tool.zig and data/mmcif_pdbx.dic (5.6 MB)
  • Add minimal test fixture tests/fixtures/minimal.dic for compile round-trip testing
  • Update README for fetch-first workflow

Results

  • Repo: -5.6 MB (removed committed dictionary)
  • Binary: 1.1 MB ReleaseFast (down from ~3.2 MB)
  • build.zig: single-stage (was three-stage)
  • Clear error message when no dictionary: Run 'mmcif-dict fetch' to download

Closes #33

Test plan

  • zig build succeeds
  • zig build -Doptimize=ReleaseFast succeeds
  • zig build test passes
  • Binary size ~1 MB (confirmed 1.1 MB)
  • No-dictionary error message is clear and actionable
  • compile round-trip with test fixture works
  • mmcif-dict fetch + query round-trip (requires network)

N283T added 6 commits April 16, 2026 11:02
Remove the two-stage build pipeline (compile_tool + @embedfile) and the
embedded PDBx fallback. The binary now always resolves a dictionary from
--dict, $MMCIF_DICT_PATH, or the config cache, erroring with a helpful
message if none is found.
Remove src/compile_tool.zig (build-time .dic-to-.mdict converter) and
data/mmcif_pdbx.dic (~5.6 MB bundled dictionary source), both made
redundant by the removal of @embedfile in the previous commit.
- Handle access() errors explicitly instead of silent discard (main.zig)
- Update CI step name to remove stale "embedded" reference
- Add [Unreleased] CHANGELOG section documenting removal
- Fix stale "PDBj JSON" description in README
@N283T
N283T merged commit ca4d837 into main Apr 16, 2026
1 check passed
@N283T
N283T deleted the feature/remove-embedfile branch April 16, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove @embedFile and switch to fetch-first workflow

1 participant