Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Reorganize: runtime / primitives #4

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Experiment: Monorepo for ReScript standard libraries

See https://github.com/rescript-lang/rescript-compiler/issues/6826.

This repo contains an npm workspace with the ReScript 12 standard libraries:

- runtime: runtime modules (where the .cm\* files + JS output files need to be shipped with the compiler)
- primitives: primitives (where only the JS output files need to be shipped with the compiler)
- core: the ReScript Core standard library
- belt: Belt library (immutable collections etc.)
- js: legacy Js modules
2 changes: 1 addition & 1 deletion belt/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dir": "src",
"subdirs": true
},
"bs-dependencies": ["stdlib-mini"],
"bs-dependencies": ["runtime"],
"bsc-flags": [
"-nostdlib",
"-nopervasives",
Expand Down
2 changes: 1 addition & 1 deletion core/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dir": "src",
"subdirs": true
},
"bs-dependencies": ["stdlib-mini", "runtime"],
"bs-dependencies": ["runtime"],
"bsc-flags": [
"-nostdlib",
"-nopervasives",
Expand Down
2 changes: 1 addition & 1 deletion js/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dir": "src",
"subdirs": true
},
"bs-dependencies": ["stdlib-mini"],
"bs-dependencies": ["runtime"],
"bsc-flags": [
"-nostdlib",
"-nopervasives",
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"packageManager": "[email protected]",
"workspaces": [
"stdlib-mini",
"core",
"belt",
"primitives",
"runtime",
"js"
],
Expand Down
2 changes: 1 addition & 1 deletion stdlib-mini/package.json → primitives/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "stdlib-mini",
"name": "primitives",
"version": "0.0.0"
}
14 changes: 14 additions & 0 deletions primitives/rescript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "primitives",
"sources": {
"dir": "src",
"subdirs": true
},
"bs-dependencies": ["runtime"],
"bsc-flags": [
"-nostdlib",
"-nopervasives",
"-bs-no-version-header",
"-open Stdlib_mini"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"in-source": true
},
"suffix": ".js",
"bs-dependencies": ["stdlib-mini", "core", "belt", "runtime", "js"],
"bs-dependencies": ["core", "belt", "primitives", "runtime", "js"],
"bsc-flags": ["-nostdlib", "-nopervasives", "-bs-no-version-header"]
}
8 changes: 1 addition & 7 deletions runtime/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,5 @@
"dir": "src",
"subdirs": true
},
"bs-dependencies": ["stdlib-mini"],
"bsc-flags": [
"-nostdlib",
"-nopervasives",
"-bs-no-version-header",
"-open Stdlib_mini"
]
"bsc-flags": ["-nostdlib", "-nopervasives", "-bs-no-version-header"]
}
2 changes: 2 additions & 0 deletions runtime/src/runtime_deriving.res
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

open Stdlib_mini

let raiseWhenNotFound = x =>
if Js.testAny(x) {
raise(Not_found)
Expand Down
8 changes: 0 additions & 8 deletions stdlib-mini/rescript.json

This file was deleted.