* Fix#655: Join async threads before engine destruction to prevent heap-use-after-free
Issues #632 and #636 (PRs #651 and #653) both stem from the same root cause: async
threads spawned via async() can outlive the Dispatch_Engine, accessing shared state
(global objects map, type maps) after it has been destroyed. The fix moves async()
registration from the stdlib module into ChaiScript_Basic, where spawned threads are
tracked via Dispatch_Engine. The engine's destructor now joins all outstanding async
threads before destroying shared data structures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: follow rule of 5, explicitly default move operations
Requested by @lefticus in PR #656 review.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix#472: Add Emscripten/WebAssembly build for browser-based ChaiScript
Port Rob Loach's ChaiScript.js work (https://github.com/RobLoach/ChaiScript.js)
into the main repository as an Emscripten build target. Adds a GitHub Actions
workflow that builds ChaiScript to WebAssembly and publishes artifacts (JS, WASM,
HTML) for embedding in the official ChaiScript.com website. Includes an HTML
interactive playground frontend and a native test validating the eval API surface.
Co-Authored-By: Rob Loach <robloach@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: publish WASM assets as release under wasm-latest tag
Add a publish job to the emscripten workflow that creates a prerelease
tagged wasm-latest with chaiscript.js, chaiscript.wasm, and
chaiscript.html as downloadable assets. Runs only on pushes to the
develop branch. The website repo can fetch these via the public
GitHub Releases API on a daily cron without any cross-repo auth.
Requested by @lefticus in PR #662 review.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Rob Loach <robloach@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix#660: Fix Windows builds, remove Appveyor, add sanitizer CI builds
Add missing #include <chrono> to src/main.cpp which caused MSVC build
failures since high_resolution_clock and duration_cast were used without
the header (GCC/Clang included it transitively). Remove obsolete
appveyor.yml (superseded by GitHub Actions). Add ASAN+UBSAN build
jobs for Linux and macOS in the CI workflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: add Windows ASAN+UBSAN sanitizer support
- Add MSVC-native ASAN support in CMakeLists.txt (/fsanitize=address)
with /RTC removal and /INCREMENTAL:NO (both incompatible with ASAN)
- Add Windows MSVC ASAN CI job
- Add Windows ClangCL ASAN+UBSAN CI job (UBSAN requires Clang, not
available in native MSVC)
- Fix sanitizer guard to include AppleClang (macOS sanitizer jobs were
silently not enabling sanitizers)
Requested by @lefticus in PR #661 review.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review: remove Windows sanitizers, add TSAN for Linux/macOS
Remove windows-sanitizers and windows-clangcl-sanitizers CI jobs.
Add linux-tsan and macos-tsan CI jobs using ENABLE_THREAD_SANITIZER.
Requested by @lefticus in PR #661 review.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The already used functionallity already
requires a more recent cmake version.
Short summary why a never version is required:
CMAKE_CXX_STANDARD requires >=3.1
CMAKE_COMPILER_IS_GNUCC requires >3.7
ENABLE_LTO can be simplified with >3.11 (3.13 VS)