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

Add WASM/ WebAssembly support #36

Open
achmadk opened this issue Nov 10, 2021 · 5 comments · Fixed by #37
Open

Add WASM/ WebAssembly support #36

achmadk opened this issue Nov 10, 2021 · 5 comments · Fixed by #37

Comments

@achmadk
Copy link

achmadk commented Nov 10, 2021

Hello, @brycx . Your library is awesome. I hope I can use pasetors in my web app.

Although there are libraries which already implement PASETO using javascript programming language, unfortunately those aren't running well in browser environment. Those libraries can be used in node.js environment (run javascript inside server). Converting existing library which can be used in browser is not an easy task.

Nowadays, rust can be compiled into WebAssembly (or WASM for short), and then can be used in browser. If you don't mind, could you add WASM support for this library?

@brycx
Copy link
Owner

brycx commented Nov 10, 2021

Hi Achmad,

Thank you very much for the kind words. Adding WASM support would makes sense, but you should know that this library can't support WASM with std enabled at the same time. This then leaves out the high-level APIs like local/public/claims, etc. meaning you'd have to use version4 module instead.

I still think adding WASM support in terms of checking that it compiles in CI would make sense regardless though. AFAICT, this should be a relatively simple change.

@brycx
Copy link
Owner

brycx commented Nov 11, 2021

Re-opening due to possible investigation of using wasm-bindgen.

@brycx brycx reopened this Nov 11, 2021
@DotRed108
Copy link

was support coming?

@DotRed108
Copy link

wasm support coming?

@brycx
Copy link
Owner

brycx commented Apr 4, 2024

Hi @DotRed108

It's been some time since I last looked at WASM compilation for this. Are you having a specific issue regarding compiling to a web-assembly target, or something else?

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 a pull request may close this issue.

3 participants