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

Newtypes for decryptor and streams #3

Closed
str4d opened this issue May 17, 2020 · 0 comments
Closed

Newtypes for decryptor and streams #3

str4d opened this issue May 17, 2020 · 0 comments

Comments

@str4d
Copy link
Owner

str4d commented May 17, 2020

In the stream today, I ran into the issue that types with lifetimes cannot be returned from Rust to JavaScript, so instead we boxed the values and returned the pointers as u32s (eww).

It literally just occurred to me that, once we have the pointer as an integer, we can just wrap that in a newtype and then #[wasm_bindgen] to have a JavaScript typed object 🤩

@str4d str4d closed this as completed in b3e9229 May 17, 2020
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

No branches or pull requests

1 participant