Skip to content

Conversation

dahlia
Copy link

@dahlia dahlia commented Jun 13, 2025

Summary

This PR removes all support for rdf-canonize-native bindings from the library, implementing the plan outlined by the maintainer in digitalbazaar/jsonld.js#567.

Motivation

As stated by @davidlehn in digitalbazaar/jsonld.js#567:

  • We're no longer actively using or updating digitalbazaar/rdf-canonize-native.

  • The performance of digitalbazaar/rdf-canonize on modern runtimes is fine for our use case.

  • We've also moved forward with spec related updates and other improves in the JS code.

  • I think the plan going forward will be to update rdf-canonize to drop support for rdf-canonize-native entirely.

The native bindings add maintenance complexity while providing limited performance benefits with modern JavaScript runtimes.

Changes

  • BREAKING: Remove all native bindings support
  • Remove useNative option and _rdfCanonizeNative API
  • Remove native package loading and initialization code
  • Remove native test cases from test suite
  • Update documentation to remove native references
  • Clean up package.json browser/react-native configurations
  • Add changelog entry documenting the breaking change

Testing

  • ✅ All 281 tests pass (1 pending)
  • ✅ ESLint checks pass
  • ✅ Both async/sync and webcrypto variants work correctly
  • ✅ All W3C RDF Dataset Canonicalization test cases pass

The JavaScript-only implementation maintains full compatibility with the RDF canonicalization specification while simplifying the codebase.

Breaking Changes

This is a breaking change for users who were explicitly using the useNative: true option. However, given that:

  1. The maintainer indicated native support is no longer actively maintained
  2. Modern JavaScript performance is sufficient for most use cases
  3. The native bindings required additional installation steps

This change aligns with the project's stated direction and reduces maintenance burden.

Remove all support for rdf-canonize-native bindings to simplify the
codebase and reduce maintenance overhead. The JavaScript implementation
provides sufficient performance for most use cases and eliminates the
complexity of native dependencies.

- Remove native package loading and initialization
- Remove useNative option and _rdfCanonizeNative API
- Remove native test cases from test suite
- Update documentation to remove native references
- Clean up package.json browser/react-native configurations

Co-Authored-By: Claude <[email protected]>
@dahlia dahlia marked this pull request as ready for review June 13, 2025 15:46
@BigBlueHat BigBlueHat requested review from dlongley and davidlehn July 23, 2025 12:56
Copy link

@tminard tminard left a comment

Choose a reason for hiding this comment

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

Thank you!

@davidlehn @dlongley can one of you take a look as well? It looks fine to me.

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.

2 participants