Skip to content

Add packaged asset resource provider#3339

Open
devshahofficial wants to merge 3 commits into
google-deepmind:mainfrom
devshahofficial:devshahofficial/filament-packaged-assets
Open

Add packaged asset resource provider#3339
devshahofficial wants to merge 3 commits into
google-deepmind:mainfrom
devshahofficial:devshahofficial/filament-packaged-assets

Conversation

@devshahofficial

Copy link
Copy Markdown
Contributor

Split out from #3254 in response to Haroon's request for smaller Filament PRs.

Summary

  • Adds a default mujoco: resource provider for packaged runtime assets.
  • Searches explicit asset env vars first, then assets next to the MuJoCo library, then local assets/.
  • Rejects unsafe absolute and parent-directory asset names.
  • Adds focused resource-provider tests.

Validation

  • git diff --check
  • cmake -S . -B /tmp/mujoco-resource-provider-build -DMUJOCO_BUILD_TESTS=ON -DMUJOCO_TEST_PYTHON_UTIL=OFF -DCMAKE_BUILD_TYPE=Release
  • cmake --build /tmp/mujoco-resource-provider-build --target user_resource_test -j2
  • /tmp/mujoco-resource-provider-build/bin/user_resource_test from the repository test/ cwd

Notes

@havess

havess commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Hey @devshahofficial ! Thanks for the PR. Would it be possible to move the plugin into our (plugins directory)[https://github.com/google-deepmind/mujoco/tree/main/plugin] instead?

I try to steer clear of special branches for specific resource loading/file support in user/ when I can.

@devshahofficial

Copy link
Copy Markdown
Contributor Author

Thanks @havess, done. I moved the mujoco: asset provider into plugin/resource_provider and removed the special-case registration path from src/user/user_resource.cc.

Validated with:

  • git diff --check
  • cmake -S . -B /tmp/mujoco-pr3339-build -DMUJOCO_BUILD_TESTS=ON -DMUJOCO_TEST_PYTHON_UTIL=OFF -DCMAKE_BUILD_TYPE=Release
  • cmake --build /tmp/mujoco-pr3339-build --target user_resource_test -j2
  • /tmp/mujoco-pr3339-build/bin/user_resource_test from test/ (20 passed)

@devshahofficial

Copy link
Copy Markdown
Contributor Author

Quick CI note: the lone macos-15-x86_64 failure looks infra-related rather than code-related. Configure failed while FetchContent was cloning GLFW because the runner could not resolve github.com:

fatal: unable to access 'https://github.com/glfw/glfw.git/': Could not resolve host: github.com

The follow-up artifact upload also failed with ENOTFOUND. I tried rerunning the failed run/job from gh, but GitHub rejected the rerun request, so this likely needs a maintainer-side rerun if the check does not get retried automatically.

@devshahofficial

Copy link
Copy Markdown
Contributor Author

Pushed an empty Trigger CI rerun commit because GitHub would not let me rerun the infra-failed macOS job directly. No source changes in this push; just trying to get a clean fresh matrix after the DNS failure.

@devshahofficial

Copy link
Copy Markdown
Contributor Author

@havess @mmossg I moved the mujoco: provider into plugin/resource_provider from the earlier note and reran CI; the matrix is green now.

I would land this after #3337. Could you take another look when you have bandwidth?

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.

3 participants