Skip to content

build: add ci workflow for building and testing with rust and wasm#21

Merged
RohanAdwankar merged 4 commits intoRohanAdwankar:masterfrom
hongjr03:master
Oct 29, 2025
Merged

build: add ci workflow for building and testing with rust and wasm#21
RohanAdwankar merged 4 commits intoRohanAdwankar:masterfrom
hongjr03:master

Conversation

@hongjr03
Copy link
Contributor

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.toml to set crate-type to ["cdylib", "rlib"], enabling WASM builds, and added wasm-bindgen-test as a dev dependency for WASM testing. The assert_cmd dependency is now conditionally included only for non-WASM targets to prevent compilation issues.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RohanAdwankar merged commit 76b8d2f into RohanAdwankar:master Oct 29, 2025
6 checks passed
@RohanAdwankar
Copy link
Owner

Awesome I just tested it out in #22 and it seems to be working great! Thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants