feat: add WebAssembly support for C/C++ FFI and CI validation#29
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe release updates the workspace to 1.1.1, documents C/C++ FFI WebAssembly support, adds CI builds for two WASM targets, and records the related changelog and roadmap entries. ChangesWASM FFI release support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/wasm-build.yml (1)
36-38: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy liftAdd a C/C++ link smoke test.
Both new jobs only run
cargo build; they never compile/link the example withemccor WASIclang. Add minimal link validation for each documented toolchain, or narrow the release claims to Rust artifact compilation.Also applies to: 48-50
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/wasm-build.yml around lines 36 - 38, Extend the wasm32-unknown-unknown-capi and corresponding WASI C API workflow jobs beyond cargo build by compiling and linking the documented C/C++ example with the appropriate emcc or WASI clang toolchain. Keep the smoke tests minimal and ensure each job validates its claimed toolchain, or revise the release claims to state Rust artifact compilation only.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture/wasm.md`:
- Around line 139-140: Update the “String Lifetimes” documentation to state that
the returned *const c_char pointers are borrowed from TxDocument/TxPrinter-owned
CString caches, must not be freed by callers, and become invalid after document
mutation or when the owning wrapper is dropped.
In `@ROADMAP.md`:
- Line 320: Align the C/C++ FFI WASM Support roadmap item with the 1.1.1 release
by moving it under a clearly labeled 1.1.1 phase or updating the surrounding
phase scope from 1.1.0. Ensure the roadmap does not associate this deliverable
with the 1.1.0 milestone.
---
Nitpick comments:
In @.github/workflows/wasm-build.yml:
- Around line 36-38: Extend the wasm32-unknown-unknown-capi and corresponding
WASI C API workflow jobs beyond cargo build by compiling and linking the
documented C/C++ example with the appropriate emcc or WASI clang toolchain. Keep
the smoke tests minimal and ensure each job validates its claimed toolchain, or
revise the release claims to state Rust artifact compilation only.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2a2570ae-5dfa-41ea-aeee-52d2b39de8fe
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
.github/workflows/wasm-build.ymlCHANGELOG.mdCargo.tomlROADMAP.mddocs/architecture/wasm.md
…ersions 1.1.0 & 1.1.1
Contribution Checklist
Description
Closes # 28
Related Issue
Type of Change
Checklist
cargo clippy --all-targets -- -D warningspasses with no warningscargo fmt --checkpasses with no formatting issuescargo test --all-targetspassescargo test --docpassesunsafecode (or it is properly justified and documented)Additional Notes
Summary by CodeRabbit
New Features
tinyxml2-capiC/C++ bindings onwasm32-unknown-unknownandwasm32-wasip1.Documentation
CI / Build