Skip to content

docs(wasm): fix outdated api references in readme (fixes #42)#50

Merged
kalwalt merged 1 commit intodevfrom
fix-wasm-readme-issue-42
May 1, 2026
Merged

docs(wasm): fix outdated api references in readme (fixes #42)#50
kalwalt merged 1 commit intodevfrom
fix-wasm-readme-issue-42

Conversation

@kalwalt
Copy link
Copy Markdown
Member

@kalwalt kalwalt commented May 1, 2026

PR Summary

  • Type: Documentation fix
  • Files changed: crates/wasm/README.md
  • Impact: Resolves user confusion about the WASM API.

Detailed Description

This PR addresses #42, where the npm README for @webarkit/purecv-wasm contained outdated API references that caused runtime errors for users.

The following corrections were made to the documentation:

  1. Replaced PureCvMatrixU8 with the actual exported Mat class.
  2. Updated Mat.create() to the correct Mat.new() syntax.
  3. Changed camelCase function names (e.g., gaussianBlur) to the modern snake_case WASM bindings (gaussian_blur).
  4. Replaced hardcoded integer values with proper imports (CV_8UC3 and BORDER_DEFAULT).
  5. Updated the API coverage section to reflect the snake_case naming conventions (e.g., absdiff, cvt_color, morphology_ex).
  6. Fixed the import path (dist-std/purecv_wasm.js).

Review Checklist

  • Code examples are copy-pasteable and syntactically correct.
  • Referenced constants (CV_8UC3, BORDER_DEFAULT) are properly imported.
  • Memory management section accurately references Mat instead of PureCvMatrixU8.
  • API coverage list uses up-to-date snake_case names.

Risk Assessment

  • Risk Level: Lowest
  • Mitigation: This is solely a documentation change targeting the WASM package README. It does not affect the actual purecv Rust or WASM code execution.

Test Coverage

  • N/A (Documentation only)

Size Recommendations

  • Status: Excellent. This PR is small, atomic, and addresses a single issue directly.

Fixes #42

@kalwalt kalwalt self-assigned this May 1, 2026
@kalwalt kalwalt added documentation Improvements or additions to documentation enhancement New feature or request wasm labels May 1, 2026
@kalwalt kalwalt merged commit b65b6dc into dev May 1, 2026
3 checks passed
@kalwalt kalwalt deleted the fix-wasm-readme-issue-42 branch May 1, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant