Skip to content

feat(compat): add tinygltf 3.0.1 and 3.1.0 - #892

Merged
Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
FarnaHerry:feat/add-compat-tinygltf
Nov 24, 2026
Merged

Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
FarnaHerry:feat/add-compat-tinygltf

Conversation

@FarnaHerry

Copy link
Copy Markdown
Collaborator

Summary

  • Add compat.tinygltf (pkgs/c/compat.tinygltf.lua) at syoyo/tinygltf v3 release versions 3.0.1 and 3.1.0 (MIT):
    • Form-B inline C11 source build (c_standard = "c11", sources = { "*/tiny_gltf_v3.c" }, include_dirs = { "*" }, license_files = { "*/LICENSE" }) covering tinygltf v3's 3-file archive root layout (tiny_gltf_v3.h, tiny_gltf_v3.c, tinygltf_json_c.h).
    • Default fs feature (default -> fs, defining TINYGLTF3_ENABLE_FS) for stdio tg3_parse_file / tg3_write_to_file, opt-out via default-features = false.
    • Windows cflags = { "-D_CRT_SECURE_NO_WARNINGS" } for MSVC CRT deprecation warnings on fopen.
    • Plain GitHub tag URLs are used across linux, macosx, and windows because no local mcpp-res credentials are available; CN mirrors can be added later.
  • Add workspace test members (each declaring [indices] compat = { path = "../../.." }) and register them in mcpp.toml:
    • tests/examples/tinygltf (3.1.0 default): compile-time TG3_GLTF21_UNSTABLE check, in-memory JSON parse & vertex buffer payload check, GLB write/parse round-trip, stdio file write/parse via fs feature, and TG3_ERR_INVALID_INDEX validation check.
    • tests/examples/tinygltf-v301 (3.0.1 default): compile-time !TG3_GLTF21_UNSTABLE check, in-memory parse, GLB round-trip, and stdio file write/parse.
    • tests/examples/tinygltf-nofs (3.1.0, default-features = false): negative feature check proving tg3_parse succeeds while tg3_parse_file without custom callbacks fails when TINYGLTF3_ENABLE_FS is disabled.
  • Add extensions.autoupdate tracking syoyo/tinygltf release tag v${version}.
  • Add design doc .agents/docs/2026-11-24-add-tinygltf-plan.md.

Local Verification (mcpp 2026.11.23.1)

  • All repo Lua/Python lints and mcpp xpkg parse across all descriptors passed (compat.tinygltf: versions linux/macosx/windows 3.0.1, 3.1.0, features 2, parse OK).
  • Cold MCPP_HOME tests/run_members.sh tinygltf tinygltf-v301 tinygltf-nofs passed under both GCC (gcc@16.2.0) and LLVM (llvm@23.1.6).
  • tests/select_members.py --base upstream/main pkgs/c/compat.tinygltf.lua selected tinygltf tinygltf-v301 tinygltf-nofs.
  • xpkgindex_update unit tests (26 + 4 passed), tests/autoupdate/ci.py audit --base upstream/main (111 updateable descriptors), inspect, and check --package compat:tinygltf (up-to-date, current: "3.1.0") passed.

@Sunrisepeak
Sunrisepeak merged commit 73af7b9 into mcpplibs:main Nov 24, 2026
20 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.

2 participants