build: add ci workflow for building and testing with rust and wasm#21
Merged
RohanAdwankar merged 4 commits intoRohanAdwankar:masterfrom Oct 29, 2025
Merged
build: add ci workflow for building and testing with rust and wasm#21RohanAdwankar merged 4 commits intoRohanAdwankar:masterfrom
RohanAdwankar merged 4 commits intoRohanAdwankar:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds WebAssembly (WASM) compatibility to the oxdraw library, enabling it to be used in browser environments. The changes include WASM-specific test coverage, dependency configuration, and CI workflow updates.
- Adds WASM-specific integration tests for diagram parsing and SVG rendering
- Configures the library as both a cdylib and rlib crate type to support WASM compilation
- Updates CI workflow to test and build WASM packages
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/wasm_compatibility.rs | New WASM-specific test suite for diagram parsing and rendering |
| tests/cli.rs | Adds conditional compilation to exclude CLI tests from WASM builds |
| Cargo.toml | Adds cdylib crate type and platform-specific dev dependencies |
| Cargo.lock | Adds WASM-related dependencies (wasm-bindgen, js-sys, web-sys, etc.) |
| .github/workflows/ci.yml | New CI workflow with WASM testing and build steps |
Comments suppressed due to low confidence (1)
Cargo.toml:4
- Rust edition '2024' does not exist. The latest stable Rust edition as of January 2025 is '2021'. This should be changed to
edition = \"2021\".
edition = "2024"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RohanAdwankar
approved these changes
Oct 29, 2025
Owner
|
Awesome I just tested it out in #22 and it seems to be working great! Thankyou! |
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
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.
As requested in #20 (comment), this PR introduces a CI pipeline for oxdraw, enhancing WASM compatibility and improving test coverage for both native and WASM targets.
Additionally, I updated
Cargo.tomlto setcrate-typeto["cdylib", "rlib"], enabling WASM builds, and addedwasm-bindgen-testas a dev dependency for WASM testing. Theassert_cmddependency is now conditionally included only for non-WASM targets to prevent compilation issues.