Skip to content

@rescript/runtime package #7796

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

@rescript/runtime package #7796

wants to merge 25 commits into from

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Aug 24, 2025

This builds on @cometkim's work in #7483 to extract the runtime files from the main rescript package into a new package @rescript/runtime, resolving a part of #6183.

Removal of @rescript/std shall be done in a separate PR.

@cknitt cknitt force-pushed the runtime-package branch 2 times, most recently from 9a5d72b to 4d7b90d Compare August 24, 2025 10:17
Copy link

pkg-pr-new bot commented Aug 24, 2025

Open in StackBlitz

rescript

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 5165128

@cknitt cknitt marked this pull request as ready for review August 24, 2025 12:08
@cknitt cknitt requested a review from cristianoc August 24, 2025 12:09
@cknitt cknitt requested a review from zth August 24, 2025 12:09
@nojaf
Copy link
Member

nojaf commented Aug 25, 2025

So, how would this work? I install rescript, and @rescript/runtime is installed as well?
Initial compile will do the one time compilation of the runtime?
A rescript clean never cleans the runtime?

I was expecting a package.json in packages/@rescript/runtime, don't we need that?

@cknitt
Copy link
Member Author

cknitt commented Aug 25, 2025

So, how would this work? I install rescript, and @rescript/runtime is installed as well?

Yes, it's installed automatically as a dependency of the rescript package, like the bin package for the platform.

Initial compile will do the one time compilation of the runtime? A rescript clean never cleans the runtime?

No, it is precompiled like it was before, nothing changed there. Only the artifacts (lib/ocaml, lib/es6, lib/js) are moved from the rescript package to the new @rescript/runtime package.

I was expecting a package.json in packages/@rescript/runtime, don't we need that?

It's there: https://github.com/rescript-lang/rescript/blob/runtime-package/packages/%40rescript/runtime/package.json

@nojaf
Copy link
Member

nojaf commented Aug 25, 2025

I see, this is more of a first step in a larger plan.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants