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

fix(cloudflare): remove WASM and replace hash to version #594

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

aralroca
Copy link
Collaborator

@aralroca aralroca commented Nov 1, 2024

Related to #470

To support Cloudflare, I had to remove the WASM we had.

The WASM has been moved to this repo if anyone wants to use it: https://github.com/aralroca/wyhash

What I did was that if the runtime wasn't Bun (ex: Node.js), instead of using Bun.hash I pulled the same algorithm, where the Bun ZIG code had been moved to WASM. This works well in Node.js, the problem is that Cloudflare does not support WASM instances.

The only place that was used was to generate the VERSION_HASH, the VERSION_HASH was the version of Brisa with Hash, where the Brisa files were put as the RPC, etc, so that in new versions when renaming there are no cache problems. However, it was not necessary to have the hash, you can have the Brisa version directly and thus solve this problem with Cloudflare, and at the same time, we get rid of this WASM and clean the code.

Screenshot 2024-11-01 at 22 22 27

@aralroca aralroca requested review from amatiasq, AlbertSabate, danielart and enzonotario and removed request for enzonotario November 1, 2024 21:30
Copy link

pkg-pr-new bot commented Nov 1, 2024

Open in Stackblitz

brisa-adapter-vercel

bun add https://pkg.pr.new/brisa-build/brisa/brisa-adapter-vercel@594

brisa

bun add https://pkg.pr.new/brisa-build/brisa@594

brisa-tailwindcss

bun add https://pkg.pr.new/brisa-build/brisa/brisa-tailwindcss@594

brisa-pandacss

bun add https://pkg.pr.new/brisa-build/brisa/brisa-pandacss@594

create-brisa

bun add https://pkg.pr.new/brisa-build/brisa/create-brisa@594

www

bun add https://pkg.pr.new/brisa-build/brisa/www@594

commit: 479968b

@aralroca aralroca merged commit f3d2ed8 into canary Nov 1, 2024
5 of 8 checks passed
@aralroca aralroca deleted the aralroca/replace-hash-to-version branch November 1, 2024 21:32
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