Skip to content

Conversation

@NewYaroslav
Copy link
Owner

Summary

  • detect Emscripten in CMake and disable unsupported backends
  • run tasks with emscripten_async_call when pthreads are unavailable
  • forward console logs to JS console in Emscripten builds
  • optionally parse ANSI colors in the browser via a single EM_JS helper
  • add Node smoke test for Emscripten builds
  • add async flush test to ensure wait() drains the queue
  • run Emscripten smoke tests in CI via setup-emsdk

Testing

  • cmake -S . -B build
  • cmake --build build --target file_logger_test
  • cmake --build build
  • ctest --test-dir build
  • emcmake cmake -S . -B build-ems -DLOG_IT_CPP_BUILD_TESTS=ON -DLOGIT_EMSCRIPTEN=ON -DLOGIT_FORCE_ASYNC_OFF=ON
  • cmake --build build-ems --target ems_console ems_async_flush
  • node --no-experimental-fetch build-ems/tests/ems_console.js
  • node --no-experimental-fetch build-ems/tests/ems_async_flush.js

https://chatgpt.com/codex/tasks/task_e_68c6ce019ce0832ca52cad725740541e

Ensure UTF8ToString is kept in the generated JS runtime to avoid ReferenceError at startup.
@NewYaroslav NewYaroslav merged commit 4097acf into main Sep 14, 2025
8 checks passed
@NewYaroslav NewYaroslav deleted the codex/implement-emscripten-build-configuration branch September 20, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant