feat(en-014): feature-gate models3d + image-extras for pure-2D games#64
Merged
Conversation
…rator updates - bloom-shared: new models3d (gltf/image_dds) and image-extras (jpeg/bmp/ tga/hdr) cargo features, default-on; pure-2D games opt out via Perry's per-package feature forwarding - macos: forward the new features; HDR decode gated behind image-extras - watchOS: gen_stubs.js manual-override support (ffi_stubs_manual.rs), draw-list + Swift host updates - mesh SDF textures allocate COPY_DST for ticket 022 disk cache - gitignore: perry cache, local jolt cmake tree, sweep outputs
The wasm build compiles bloom-shared with --no-default-features, so the new EN-014 gates removed EngineState.models out from under bloom-web's unconditional model FFI (24 build errors in CI). Web games do use 3D models, so the web crate now declares the same default-on feature set as native/macos; pure-2D web games opt out via Perry feature forwarding once the web FFI surface is gated (tracked for the FFI consolidation work).
Same break class as the web fix one commit back: every platform crate compiles bloom-shared with default-features = false, so the EN-014 gates removed EngineState.models from all of them while their model FFI stayed unconditional (build-linux CI failure; windows/android/ ios/tvos would fail identically, they're just not in CI). Mirror the macos feature block everywhere.
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.
Summary
models3dcargo feature (gltf, gltf_json, image_dds,ModelManager, model staging) andimage-extras(JPEG/BMP/TGA/HDR codecs — PNG stays always-on). Both default-on, so existing games are unaffected.bloom_set_env_clear_from_hdr) is gated behindimage-extras; 24 model/HDR FFI exports are cfg-gated with ABI-stable warn-once no-op stubs when features are off (Perry's TS glue references every FFI symbol an imported module declares, even uncalled ones, so the symbols must exist).Motivation
A pure-2D game (Bloom Jump) was shipping gltf/gltf_json/image_dds and the non-PNG image decoders in every binary. With Perry's new per-project nativeLibrary feature forwarding (perry >= 0.5.1126), games opt out via perry.toml:
which also drops Jolt via the existing
joltfeature. Measured on Bloom Jump (macOS, with the perry-side fixes): 26.1MB → 17.3MB, game verified rendering + audio.Compatibility
cargo buildproduces the same engine as before.Testing
cargo checkgreen on bloom-shared and bloom-macos for default,--no-default-features, and mixed profiles.