@brrock/oj 0.0.0 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/package.json +14 -5
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @brrock/oj
|
|
2
|
+
|
|
3
|
+
Prebuilt Linux binaries of [oj](https://github.com/lovablelabs/oj) (lovablelabs' Rust frontend tooling), packaged for npm so it can run where you can't `cargo install`, like Vercel builds.
|
|
4
|
+
|
|
5
|
+
Upstream oj only ships to crates.io. This repo builds it from source for each oj release and publishes:
|
|
6
|
+
|
|
7
|
+
| package | contents |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `@brrock/oj` | the `oj` command (a small Node launcher) |
|
|
10
|
+
| `@brrock/oj-linux-x64-gnu` | oj for Linux x64, glibc ≥ 2.34 |
|
|
11
|
+
| `@brrock/oj-linux-arm64-gnu` | oj for Linux arm64, glibc ≥ 2.34 |
|
|
12
|
+
|
|
13
|
+
npm installs only the platform package that matches the machine. Binaries are built inside `amazonlinux:2023`, which is Vercel's build image.
|
|
14
|
+
|
|
15
|
+
## Use on Vercel
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm i -D @brrock/oj
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "oj build"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Set the Vercel project's output directory to `dist`. Versions match upstream oj versions.
|
|
30
|
+
|
|
31
|
+
Only Linux is supported. On macOS/Windows install oj with `cargo install oj --locked`; you can point the launcher at any binary with `OJ_BINARY_PATH=/path/to/oj`.
|
|
32
|
+
|
|
33
|
+
`@brrock/oj` depends on `rolldown@1.2.1` and sets `OJ_VENDORED_ROLLDOWN` to it, the same rolldown the upstream nix build vendors for oj's TanStack Start bundles. Set `OJ_VENDORED_ROLLDOWN=` (empty) to use the app's own rolldown instead.
|
|
34
|
+
|
|
35
|
+
## How releases work
|
|
36
|
+
|
|
37
|
+
`.github/workflows/release.yml` runs every 6 hours. When the latest `lovablelabs/oj` release isn't on npm yet, it:
|
|
38
|
+
|
|
39
|
+
1. builds `oj` for x64 and arm64 in `amazonlinux:2023` (fat-LTO release build, so expect 1–2 hours),
|
|
40
|
+
2. publishes the platform packages, then `@brrock/oj`, through npm trusted publishing (OIDC). Provenance is attached automatically and no npm token is stored.
|
|
41
|
+
|
|
42
|
+
To build a specific version by hand: `make release VERSION=0.2.16`.
|
|
43
|
+
|
|
44
|
+
## One-time setup
|
|
45
|
+
|
|
46
|
+
You need npm ≥ 11.10 (for `npm trust`) and 2FA enabled on your npm account.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
make login # npm login
|
|
50
|
+
make setup # publishes empty 0.0.0 placeholders, then trusts release.yml for each package
|
|
51
|
+
make release # build + publish the latest oj
|
|
52
|
+
make watch # follow the run
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Trusted publishing can only be configured on packages that already exist, which is why `setup` publishes placeholders first. Optionally run `make lockdown` afterwards to block token-based publishes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brrock/oj",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "Prebuilt Linux binaries of oj (lovablelabs/oj), e.g. for running oj on Vercel",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -8,12 +8,21 @@
|
|
|
8
8
|
"url": "git+https://github.com/brrock/oj-builds.git"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://github.com/lovablelabs/oj",
|
|
11
|
-
"keywords": [
|
|
11
|
+
"keywords": [
|
|
12
|
+
"oj",
|
|
13
|
+
"vite",
|
|
14
|
+
"bundler",
|
|
15
|
+
"vercel"
|
|
16
|
+
],
|
|
12
17
|
"bin": {
|
|
13
18
|
"oj": "bin/oj.js"
|
|
14
19
|
},
|
|
15
20
|
"main": "index.js",
|
|
16
|
-
"files": [
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"index.js",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
17
26
|
"engines": {
|
|
18
27
|
"node": ">=18"
|
|
19
28
|
},
|
|
@@ -21,7 +30,7 @@
|
|
|
21
30
|
"rolldown": "1.2.1"
|
|
22
31
|
},
|
|
23
32
|
"optionalDependencies": {
|
|
24
|
-
"@brrock/oj-linux-x64-gnu": "0.
|
|
25
|
-
"@brrock/oj-linux-arm64-gnu": "0.
|
|
33
|
+
"@brrock/oj-linux-x64-gnu": "0.2.16",
|
|
34
|
+
"@brrock/oj-linux-arm64-gnu": "0.2.16"
|
|
26
35
|
}
|
|
27
36
|
}
|