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

Run-time compatibility #245

Open
dcbr opened this issue Apr 1, 2024 · 6 comments
Open

Run-time compatibility #245

dcbr opened this issue Apr 1, 2024 · 6 comments
Labels

Comments

@dcbr
Copy link
Collaborator

dcbr commented Apr 1, 2024

@vbuch Let me bother you on run-time compatible of this signpdf:
can this tool-kit run on edge run-time? Vercel or CloudFlare.
Skimming on some example, this is nodejs run-time.
Thanks much indeed.

Originally posted by @TimKieu in #230 (comment)

@dcbr
Copy link
Collaborator Author

dcbr commented Apr 1, 2024

@TimKieu Please continue this discussion here, as #230 is not relevant to it.

@TimKieu
Copy link

TimKieu commented Apr 4, 2024

@dcbr Okay, I will try and reply here.

@vbuch
Copy link
Owner

vbuch commented Apr 4, 2024

@TimKieu never tried it. Not sure. In examples we use fs but you don't need that for signing. node-forge is advertised as plain JS so should be runnable anywhere. It will depend on what you want to use from our packages and what we depend on. There are many places where we reference Buffer because this was initially written for Node. So... the only way to figur this out would be to try. If you fail, you may identify what the problems are and report back here. Then it would be lovely if you created a PR. But even info would be helpful for someone else asking the same.

@TimKieu
Copy link

TimKieu commented Apr 12, 2024

@vbuch Buffer is not compatible to edge-runtime,
Please port to Uint8Array.

@vbuch
Copy link
Owner

vbuch commented Apr 12, 2024

@TimKieu we are absolutely welcoming PRs.

@TimKieu
Copy link

TimKieu commented Apr 20, 2024

@vbuch I found a good solution from Winamp Webamp using https://github.com/feross/buffer AKA Buffer for Browser similar to Nodejs.
Now you can replace your Nodejs Buffer by this, it should work well first, before we port other run-time libs for edge/browser.

@vbuch vbuch added the browser label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants