Skip to content

Upload playground bundle to Cloudflare R2 #7472

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

cometkim
Copy link
Member

No description provided.

@cometkim cometkim force-pushed the playground-to-r2 branch 2 times, most recently from 2e8bc51 to 585b9ec Compare May 15, 2025 16:24
@cometkim cometkim force-pushed the playground-to-r2 branch from 585b9ec to f255c9d Compare May 15, 2025 16:39
@cometkim cometkim requested review from cknitt and ryyppy May 15, 2025 19:43
Copy link

pkg-pr-new bot commented May 15, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7472

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7472

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7472

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7472

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7472

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7472

commit: c81c7b2

@cometkim
Copy link
Member Author

cometkim commented May 15, 2025

We can switch cdn.rescript-lang.org DNS to the R2 bucket right now.
Done. We can remove KeyCDN resources.

It should work, but unlike other static content, it has request limits (based on R2 class B operation pricing, 10M/mo included in the free plan, $0.36/mo per additional 1M operations)

https://developers.cloudflare.com/r2/pricing/#asset-hosting

If we sync the bundles when building the website and use them as same-origin content, we can get free transfers and additional UX benefits.

With R2 event notification, we can automate webpage build triggers without an additional API token, but we need a $5/mo paid plan for it.

@cometkim cometkim force-pushed the playground-to-r2 branch from e640308 to c81c7b2 Compare May 15, 2025 21:16
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