1Password / onepassword-sdk-js

The official JavaScript SDK for 1Password
https://developer.1password.com/docs/sdks/
MIT License
41 stars 2 forks source link

Add WASM interaction layer #3

Closed AndyTitu closed 7 months ago

AndyTitu commented 7 months ago

🦾 Reason to Be

Add logic for interacting with the WASM core. The core was built using wasm_bindgen.

🤔 Thought Process

The js-core folder was built from Rust using wasm_bindgen for generating an additional JS wrapper.

📋 How To Test

Run npm start from the root of this repo to run the provided example. This will run the examples/index.ts code (Make sure you're using the SA token and valid integration details).

Under the hood npm start will compile TS to JS using tsc and then will run the produced index.js file with node.

AndyTitu commented 7 months ago

Given the current approach of calling WASM functions from JS (using ES imports), there are a few limitations I ran into:

AndyTitu commented 7 months ago

Closing this in favour of a new approach for distributing wasm files.