generated from cpp-best-practices/cmake_template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Wasm build #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lefticus
wants to merge
28
commits into
integrate
Choose a base branch
from
wasm-build
base: integrate
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Wasm build #9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add cmake/Emscripten.cmake for WASM build configuration - Configure pthreads, ASYNCIFY, and resource embedding - Add web/shell.html with xterm.js terminal emulation - Use FS.init() to connect stdin/stdout to xterm.js - Conditional compilation for WASM vs native builds - URL parameter support for script selection (?script=name) - Fix JSON parsing for tiles without animation data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set up log_sink before loading scripts to prevent stdout spam - Add coi-serviceworker for GitHub Pages compatibility - Service worker adds required COOP/COEP headers for SharedArrayBuffer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Deploy main branch to root URL
- Deploy develop branch to /develop/
- Deploy all tags to /{tag}/
- Uses Ninja for parallel builds
- Preserves existing deployments with keep_files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove FORCE from cache variables - Enable IPO (was unnecessarily disabled) - Disable static analysis and warnings-as-errors for WASM - Disable testing (no WASM test runner) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove debug __EMSCRIPTEN__ logging - Shorten verbose multi-line comments to inline comments - Reduce code noise while maintaining functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidates all Emscripten-related configuration in one place. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use a single main(int argc, const char** argv) for both native and WASM builds by enabling CLI11 in Emscripten builds and populating Module.arguments from URL parameters. This eliminates duplicate main() functions and consolidates argument parsing logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Enable native WebAssembly exception handling with -fwasm-exceptions - Make stdout/stderr flush on newlines for immediate visibility - Write stderr to both browser console and visible terminal - Reduce terminal height from 50 to 30 rows to match actual usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolved critical input issues in WebAssembly build where dialogs would bounce (close and immediately reopen) and script prompt showed repeating characters. Root cause: stdin() was returning JavaScript null instead of 0 when the input buffer was empty. FTXUI's official WASM implementation expects 0 (NULL character) to signal no data available. Changes: - Update FTXUI dependency from 5.0.0 to 6.1.9 - Fix stdin() to return `stdin_buffer.shift() || 0` matching FTXUI pattern - Add CPR (Cursor Position Report) filter to prevent escape sequences from contaminating user input - Wrap popup_renderer button in Container::Vertical for proper focus management - Remove redundant onBinary handler (onData handles all input) - Update bitmap.hpp for FTXUI 6.1.9 API (removed selected_box field) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Configure Dependabot to automatically check for and update GitHub Actions versions on a weekly basis. This will keep workflow actions up to date and create PRs for version updates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update outdated GitHub Actions to their latest versions to fix compatibility issues and failing builds: - actions/checkout: v2 → v4 - actions/github-script: v3 → v7 - codecov/codecov-action: v2 → v4 - github/codeql-action: v2 → v3 - EndBug/add-and-commit: v4 → v9 These updates resolve Node.js deprecation warnings and ensure compatibility with current GitHub Actions runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Conservative update to more recent but stable platform versions: Operating Systems: - ubuntu-20.04 → ubuntu-22.04 (LTS, supported until 2027) - macos-10.15 → macos-13 (Ventura) - windows-2019 → windows-2022 (latest stable) Compilers: - llvm-15.0.2 → llvm-17.0.6 (stable release) - gcc-11 → gcc-13 (stable release) These updates ensure compatibility with current toolchains while avoiding bleeding-edge versions that may have stability issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## integrate #9 +/- ##
===========================================
Coverage ? 2.44%
===========================================
Files ? 15
Lines ? 980
Branches ? 534
===========================================
Hits ? 24
Misses ? 900
Partials ? 56
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed critical bugs in Hardening.cmake that caused compilation errors: 1. **Bare -D flag error**: NEW_CXX_DEFINITIONS incorrectly included -D prefix. target_compile_definitions() expects bare names (e.g., "_GLIBCXX_ASSERTIONS"), not compiler flags (e.g., "-D_GLIBCXX_ASSERTIONS"). CMake adds -D automatically. 2. **Quoted flags in command line**: Used string concatenation instead of list operations, causing flags to be grouped and quoted incorrectly. 3. **Order-of-operations**: Moved travels_options creation before first use to ensure proper initialization. 4. **Global hardening option**: Added travels_ENABLE_GLOBAL_HARDENING option to explicitly control whether hardening applies globally. Changes: - Initialize hardening variables as lists, not strings - Use list(APPEND) instead of string concatenation - Remove -D prefix from compile definitions (add back for CMAKE_CXX_FLAGS) - Properly convert lists to strings for global CMAKE_CXX_FLAGS - Add travels_ENABLE_GLOBAL_HARDENING option in travels_setup_options - Add debug output to track flag propagation This fixes the "macro names must be identifiers" error when building lodepng and other targets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Clean up debug output that was added for troubleshooting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Switch from CMAKE_CXX_FLAGS variables to add_compile_options(), add_compile_definitions(), and add_link_options() for global hardening. These commands apply to all targets in the current directory and subdirectories, including FetchContent dependencies, providing better global scope than CMAKE_ variable manipulation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Renamed workflow from deploy-pages.yml to wasm.yml and updated to: - Build WASM on all events (PRs, releases, pushes to main/develop/tags) - Deploy to GitHub Pages only on pushes to main, develop, or tags - Skip deployment on pull requests and releases This ensures WASM builds are validated on every CI run while only deploying when appropriate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The worker.js file is not generated in the current Emscripten build as the worker code is embedded inline in the main JS file. Removing this copy command prevents CI failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.