Skip to content

MOB-427: cpp_archive prebuilt bundles + .m through the C driver - #132

Merged
GenericJam merged 2 commits into
masterfrom
mob-427-plugin-prebuilt
Oct 9, 2026
Merged

GenericJam merged 2 commits into
masterfrom
mob-427-plugin-prebuilt

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

Lets a lang: :cpp_archive plugin NIF declare prebuilt: %{url, sha256, static_libs}: downloaded once per hash into ~/.mob/cache/plugin-prebuilt (sha256-pinned, https, bundle-relative paths; checked by mix mob.validate_plugin and again at build), {:prebuilt, dir} includes, target archives linked beside lib.a via the existing plugin_static_libs inputs (sim, device, mob.release --ios). .m sources go to the C driver with :cflags*. MOB_PLUGIN_PREBUILT_DIR for offline/mirrors. Decision: decisions/2026-10-09-cpp-archive-prebuilt-bundles.md.

Lets mob_scene3d (Filament) build into a blank iOS host from activation alone (companion mob_scene3d PR).

Verification: full mix test green (3035), credo clean. Blank mob.new 0.6.7 host + mob_scene3d branch: iOS 27 sim (iPhone 17) and physical iPhone SE deploy, model renders (scene readback status ready, GPU sample red), mix mob.selftest pass on both; mix mob.release --ios builds .ipa containing OBJC_CLASS$_MobScene3dView; fresh-cache download path exercised; Android emulator build + selftest pass.

Review: reviewer subagent (Codex rate-limited until 2026-10-13): SHIP, then MERGE after fixes (last nitpick fixed in this push).

A lang: :cpp_archive NIF may declare prebuilt: %{url, sha256, static_libs}.
MobDev.Plugin.Prebuilt downloads the tarball once per hash into
~/.mob/cache/plugin-prebuilt, refuses it unless it matches the pinned sha256,
resolves {:prebuilt, dir} includes and returns the target's listed archives,
which build_plugin_static_archives/3 links beside lib<module>.a through the
existing plugin_static_libs inputs (sim, device, mob.release --ios). Manifest
validation checks the URL, hash and paths. A .m source now goes to the C driver
with :cflags*, so an ObjC NIF can share an archive with an ObjC++ renderer.

Lets mob_scene3d (Filament) build into a blank iOS host from activation alone.
…g, posix errors, stale partial sweep, MOB_PLUGIN_PREBUILT_DIR
@GenericJam
GenericJam force-pushed the mob-427-plugin-prebuilt branch from 98479e1 to 713faea Compare October 9, 2026 17:33
@GenericJam
GenericJam merged commit 191eb9c into master Oct 9, 2026
6 checks passed
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.

1 participant