Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ffi #22

Merged
merged 26 commits into from
Jul 29, 2024
Merged

Feat/ffi #22

merged 26 commits into from
Jul 29, 2024

Conversation

Nuhvi
Copy link
Collaborator

@Nuhvi Nuhvi commented Jul 25, 2024

This PR packages PubkyClient and other useful structs for npm both nodejs and web using wasm_bindgen.

Features available now in both Rust and JS:

  1. Generate a Keypair
  2. Signup to a local testnet homeserver
  3. Signout
  4. Signin
  5. Examine session for a public key (confirm if user is signed in).
  6. Put a file
  7. Get a file

Downsides of Wasm:

  1. Large module approaching ~1mb, hopefully that can be optimized later, but either way it is only relevant for the first time you open a web app, where the user is busy onboarding, frontend developers should be able to draw content without being blocked by that initial download.
  2. Outside of the happy path, stack traces will probably be unhelpful.

Upside of Wasm:
Surprisingly great code sharing, especially when accepting the async paradigm.

@Nuhvi Nuhvi marked this pull request as ready for review July 29, 2024 11:56
@Nuhvi Nuhvi merged commit ccf4c00 into main Jul 29, 2024
1 check failed
@Nuhvi Nuhvi deleted the feat/ffi branch August 19, 2024 13:23
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.

1 participant