Skip to content

Conversation

@timfish
Copy link
Member

@timfish timfish commented Jun 1, 2025

This PR:

  • Adds serde and wasm features so that consumers of the Rust library don't need to bring in all those dependencies if they don't need them
  • Adds a transform function to InstrumentationVisitor - this was moved from the test utils with unwrap() removed
  • Adds annotations to the config types which creates conversion code between rust<->javascript and typescript types
  • Adds a wasm module in the library that is only enabled with the wasm feature
  • In the wasm module, add functions and types that are exposed from wasm via #[wasm_bindgen]
  • InstrumentationVisitor lifetimes had to be removed because they're not supported across rust<->js boundary
  • Adds a package.json

You can npm install && npm run build to build the module.
You can run npm test to run a single JavaScript test of the wasm and asserts the output matches what's expected.

@timfish timfish closed this Jun 1, 2025
@timfish timfish reopened this Jun 1, 2025
@timfish timfish requested review from AbhiPrasad and bizob2828 June 1, 2025 17:09
@timfish timfish requested a review from jsumners-nr June 2, 2025 13:23
Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@timfish timfish merged commit 55ca2e9 into apm-js-collab:main Jun 2, 2025
1 check passed
@timfish timfish deleted the feat/wasm branch July 2, 2025 13:12
@timfish timfish restored the feat/wasm branch July 15, 2025 10:14
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