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

Merged
merged 11 commits into from
May 18, 2025

Conversation

cometkim
Copy link
Member

No description provided.

@cometkim cometkim force-pushed the playground-to-r2 branch 3 times, most recently 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-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@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/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: 19fc73d

@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 d5c398c to 19fc73d Compare May 18, 2025 10:10
@cometkim cometkim merged commit db17cc8 into rescript-lang:master May 18, 2025
16 checks passed
@cometkim cometkim deleted the playground-to-r2 branch May 18, 2025 12:11
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.

2 participants