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

Fails on Cloudflare Workers build #6

Open
derekperkins opened this issue Dec 3, 2021 · 2 comments
Open

Fails on Cloudflare Workers build #6

derekperkins opened this issue Dec 3, 2021 · 2 comments

Comments

@derekperkins
Copy link

derekperkins commented Dec 3, 2021

The browser version relies on document (not available)
The node version relies on the core util module (not available)

cc @tannerlinsley

@pimterry
Copy link
Member

pimterry commented Dec 7, 2021

Interesting! I wasn't aware of this, I haven't used Cloudflare Workers at all.

I'd happily support Cloudflare Workers if possible, but I'm not sure exactly what environment checks would work for that case. Could you look into it, and open a PR?

@nickbabcock
Copy link

nickbabcock commented May 17, 2022

The good news is that it's not too difficult. Library authors just need to expose an API entry point where one can pass in a WebAssembly.Module. You can see a cloudflare worker that brotli compresses in a sample project of mine: https://github.com/nickbabcock/cloud-functions/tree/a44260fdbdeab4edda3ca8c84227217bd9dbfb3d/src/brotli

(I'm not a user of this library, but I just happened to see this issue and know of a solution).

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

3 participants