Skip to content

Emscripten: use fetch + ASYNCIFY for ofxEmscriptenURLFileLoader (fix emscripten_async_wget2 deprecation) - #8560

Closed
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:emscripten-asyncify-fetch
Closed

danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:emscripten-asyncify-fetch

Conversation

@danoli3

@danoli3 danoli3 commented Sep 12, 2026

Copy link
Copy Markdown
Member

Fixes emscripten_async_wget2 deprecation (removed in 6.x) in ofxEmscriptenURLFileLoader.cpp:27.

  • Replace emscripten_async_wget2_data / emscripten_async_wget2 with emscripten_fetch + ASYNCIFY for 6.0.6
  • Add -s ASYNCIFY=1 -s FETCH=1 to config.emscripten.default.mk (enables emscripten_fetch and sync ofLoadImage)
  • Keep fallback to emscripten_async_wget2 for old emscripten (<3) via EMSCRIPTEN_major / EMSCRIPTEN_MAJOR ifdef
  • Fixes ofLoadImage/ofURLFileLoader sync fetch on 6.0.6

Test: emscripten smoke test + ofLoadImage via URL should build and run on 6.0.6.

Related to discussion on asyncify for ofURLFileLoader.

…emscripten_async_wget2 deprecation)

- Replace emscripten_async_wget2 (deprecated, removed in 6.x) with emscripten_fetch + ASYNCIFY
- Add -s ASYNCIFY=1 -s FETCH=1 to config.emscripten.default.mk
- Keep fallback to emscripten_async_wget2 for old emscripten (<3) via __EMSCRIPTEN_major__ check
- Fix for 6.0.6 where emscripten_async_wget2 is removed, fixes ofLoadImage/ofURLFileLoader sync
- Original issue: emscripten_async_wget2 deprecation in ofxEmscriptenURLFileLoader.cpp:27
@danoli3 danoli3 closed this Sep 12, 2026
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