.github
flake
packages
site
···
1
1
{
2
2
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
3
-
"extends": [
4
4
-
"config:recommended"
5
5
-
],
3
3
+
"extends": ["config:recommended"],
6
4
"nix": {
7
5
"enabled": true
8
6
},
9
7
"lockFileMaintenance": {
10
8
"enabled": true
11
9
},
12
12
-
"customManagers": [{
13
13
-
"customType": "regex",
14
14
-
"description": "Update package definitions",
15
15
-
"fileMatch": "\\.nix$",
16
16
-
"matchStrings": [
17
17
-
"# renovate: datasource=(?<datasource>[a-z-]+?) name=(?<depName>.+?)\\s+\\w+\\s*=\\s*\"(?<currentValue>.+?)\"\\s*;"
18
18
-
]
19
19
-
}]
10
10
+
"customManagers": [
11
11
+
{
12
12
+
"customType": "regex",
13
13
+
"description": "Update package definitions",
14
14
+
"fileMatch": "\\.nix$",
15
15
+
"matchStrings": [
16
16
+
"# renovate: datasource=(?<datasource>[a-z-]+?) name=(?<depName>.+?)\\s+\\w+\\s*=\\s*\"(?<currentValue>.+?)\"\\s*;"
17
17
+
]
18
18
+
}
19
19
+
]
20
20
}
···
17
17
just.enable = true;
18
18
keep-sorted.enable = true;
19
19
nixfmt.enable = true;
20
20
+
prettier.enable = true;
20
21
shellcheck.enable = true;
21
22
shfmt.enable = true;
22
23
statix.enable = true;
···
16
16
llvm,
17
17
perl,
18
18
rsync,
19
19
+
typescript ? null,
19
20
wabt,
20
21
}:
21
22
···
54
55
ln -sf $out $site/dist
55
56
56
57
make() {
57
57
-
command make -j$NIX_BUILD_CORES HOSTCC=${clang-host}/bin/clang TSC=true "$@"
58
58
+
command make -j$NIX_BUILD_CORES HOSTCC=${clang-host}/bin/clang TSC=${
59
59
+
if typescript == null then "true" else "${typescript}/bin/tsc"
60
60
+
} "$@"
58
61
}
59
62
60
63
test -f .config || make defconfig ${lib.optionalString config.debug "debug.config"}
···
1
1
# WebAssembly Linux distro
2
2
3
3
porting some software to https://github.com/tombl/linux
4
4
-
···
1
1
+
node_modules/
2
2
+
dist/
···
1
1
+
<!doctype html>
2
2
+
<html lang="en">
3
3
+
<head>
4
4
+
<meta charset="UTF-8" />
5
5
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
+
<title>Linux</title>
7
7
+
</head>
8
8
+
<body>
9
9
+
<details>
10
10
+
<summary>info & options</summary>
11
11
+
12
12
+
<p>Welcome to Linux 6.1 running natively in your browser!</p>
13
13
+
14
14
+
<p>
15
15
+
There's no x86_64/RISC-V emulation going on here, instead this is a port
16
16
+
of the kernel to WebAssembly.
17
17
+
</p>
18
18
+
19
19
+
<p>
20
20
+
We've got a patched version of the Linux kernel and Musl libc running,
21
21
+
complete with virtio devices, memory isolation, and multi-core support.
22
22
+
</p>
23
23
+
24
24
+
<p>
25
25
+
If this sounds interesting, you can check out the source at
26
26
+
<a href="https://github.com/tombl/linux">github.com/tombl/linux</a>
27
27
+
</p>
28
28
+
29
29
+
<form>
30
30
+
<label for="cmdline">
31
31
+
<a
32
32
+
href="https://www.kernel.org/doc/html/v6.1/admin-guide/kernel-parameters.html"
33
33
+
>
34
34
+
Kernel parameters
35
35
+
</a>
36
36
+
</label>
37
37
+
<input type="text" name="cmdline" id="cmdline" />
38
38
+
<label for="memory">Memory (in MiB)</label>
39
39
+
<input type="number" name="memory" id="memory" />
40
40
+
<label for="initcpio">URL to an initramfs</label>
41
41
+
<input type="text" name="initcpio" id="initcpio" />
42
42
+
<button type="submit">Reboot</button>
43
43
+
</form>
44
44
+
</details>
45
45
+
<script type="module" src="/src/main.ts"></script>
46
46
+
</body>
47
47
+
</html>
···
1
1
+
{
2
2
+
"name": "site",
3
3
+
"private": true,
4
4
+
"type": "module",
5
5
+
"packageManager": "pnpm@10.8.1+sha512.c50088ba998c67b8ca8c99df8a5e02fd2ae2e2b29aaf238feaa9e124248d3f48f9fb6db2424949ff901cffbb5e0f0cc1ad6aedb602cd29450751d11c35023677",
6
6
+
"scripts": {
7
7
+
"dev": "vite",
8
8
+
"build": "vite build",
9
9
+
"preview": "vite preview",
10
10
+
"format": "prettier --write .",
11
11
+
"check": "tsc"
12
12
+
},
13
13
+
"devDependencies": {
14
14
+
"typescript": "^5.8.3",
15
15
+
"vite": "^6.3.1"
16
16
+
},
17
17
+
"dependencies": {
18
18
+
"@xterm/addon-fit": "^0.10.0",
19
19
+
"@xterm/addon-webgl": "^0.18.0",
20
20
+
"@xterm/xterm": "^5.5.0"
21
21
+
}
22
22
+
}
···
1
1
+
lockfileVersion: '9.0'
2
2
+
3
3
+
settings:
4
4
+
autoInstallPeers: true
5
5
+
excludeLinksFromLockfile: false
6
6
+
7
7
+
importers:
8
8
+
9
9
+
.:
10
10
+
dependencies:
11
11
+
'@xterm/addon-fit':
12
12
+
specifier: ^0.10.0
13
13
+
version: 0.10.0(@xterm/xterm@5.5.0)
14
14
+
'@xterm/addon-webgl':
15
15
+
specifier: ^0.18.0
16
16
+
version: 0.18.0(@xterm/xterm@5.5.0)
17
17
+
'@xterm/xterm':
18
18
+
specifier: ^5.5.0
19
19
+
version: 5.5.0
20
20
+
devDependencies:
21
21
+
typescript:
22
22
+
specifier: ^5.8.3
23
23
+
version: 5.8.3
24
24
+
vite:
25
25
+
specifier: ^6.3.1
26
26
+
version: 6.3.1
27
27
+
28
28
+
packages:
29
29
+
30
30
+
'@esbuild/aix-ppc64@0.25.2':
31
31
+
resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==}
32
32
+
engines: {node: '>=18'}
33
33
+
cpu: [ppc64]
34
34
+
os: [aix]
35
35
+
36
36
+
'@esbuild/android-arm64@0.25.2':
37
37
+
resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==}
38
38
+
engines: {node: '>=18'}
39
39
+
cpu: [arm64]
40
40
+
os: [android]
41
41
+
42
42
+
'@esbuild/android-arm@0.25.2':
43
43
+
resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==}
44
44
+
engines: {node: '>=18'}
45
45
+
cpu: [arm]
46
46
+
os: [android]
47
47
+
48
48
+
'@esbuild/android-x64@0.25.2':
49
49
+
resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==}
50
50
+
engines: {node: '>=18'}
51
51
+
cpu: [x64]
52
52
+
os: [android]
53
53
+
54
54
+
'@esbuild/darwin-arm64@0.25.2':
55
55
+
resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==}
56
56
+
engines: {node: '>=18'}
57
57
+
cpu: [arm64]
58
58
+
os: [darwin]
59
59
+
60
60
+
'@esbuild/darwin-x64@0.25.2':
61
61
+
resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==}
62
62
+
engines: {node: '>=18'}
63
63
+
cpu: [x64]
64
64
+
os: [darwin]
65
65
+
66
66
+
'@esbuild/freebsd-arm64@0.25.2':
67
67
+
resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==}
68
68
+
engines: {node: '>=18'}
69
69
+
cpu: [arm64]
70
70
+
os: [freebsd]
71
71
+
72
72
+
'@esbuild/freebsd-x64@0.25.2':
73
73
+
resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==}
74
74
+
engines: {node: '>=18'}
75
75
+
cpu: [x64]
76
76
+
os: [freebsd]
77
77
+
78
78
+
'@esbuild/linux-arm64@0.25.2':
79
79
+
resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==}
80
80
+
engines: {node: '>=18'}
81
81
+
cpu: [arm64]
82
82
+
os: [linux]
83
83
+
84
84
+
'@esbuild/linux-arm@0.25.2':
85
85
+
resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==}
86
86
+
engines: {node: '>=18'}
87
87
+
cpu: [arm]
88
88
+
os: [linux]
89
89
+
90
90
+
'@esbuild/linux-ia32@0.25.2':
91
91
+
resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==}
92
92
+
engines: {node: '>=18'}
93
93
+
cpu: [ia32]
94
94
+
os: [linux]
95
95
+
96
96
+
'@esbuild/linux-loong64@0.25.2':
97
97
+
resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==}
98
98
+
engines: {node: '>=18'}
99
99
+
cpu: [loong64]
100
100
+
os: [linux]
101
101
+
102
102
+
'@esbuild/linux-mips64el@0.25.2':
103
103
+
resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==}
104
104
+
engines: {node: '>=18'}
105
105
+
cpu: [mips64el]
106
106
+
os: [linux]
107
107
+
108
108
+
'@esbuild/linux-ppc64@0.25.2':
109
109
+
resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==}
110
110
+
engines: {node: '>=18'}
111
111
+
cpu: [ppc64]
112
112
+
os: [linux]
113
113
+
114
114
+
'@esbuild/linux-riscv64@0.25.2':
115
115
+
resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==}
116
116
+
engines: {node: '>=18'}
117
117
+
cpu: [riscv64]
118
118
+
os: [linux]
119
119
+
120
120
+
'@esbuild/linux-s390x@0.25.2':
121
121
+
resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==}
122
122
+
engines: {node: '>=18'}
123
123
+
cpu: [s390x]
124
124
+
os: [linux]
125
125
+
126
126
+
'@esbuild/linux-x64@0.25.2':
127
127
+
resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==}
128
128
+
engines: {node: '>=18'}
129
129
+
cpu: [x64]
130
130
+
os: [linux]
131
131
+
132
132
+
'@esbuild/netbsd-arm64@0.25.2':
133
133
+
resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==}
134
134
+
engines: {node: '>=18'}
135
135
+
cpu: [arm64]
136
136
+
os: [netbsd]
137
137
+
138
138
+
'@esbuild/netbsd-x64@0.25.2':
139
139
+
resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==}
140
140
+
engines: {node: '>=18'}
141
141
+
cpu: [x64]
142
142
+
os: [netbsd]
143
143
+
144
144
+
'@esbuild/openbsd-arm64@0.25.2':
145
145
+
resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==}
146
146
+
engines: {node: '>=18'}
147
147
+
cpu: [arm64]
148
148
+
os: [openbsd]
149
149
+
150
150
+
'@esbuild/openbsd-x64@0.25.2':
151
151
+
resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==}
152
152
+
engines: {node: '>=18'}
153
153
+
cpu: [x64]
154
154
+
os: [openbsd]
155
155
+
156
156
+
'@esbuild/sunos-x64@0.25.2':
157
157
+
resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==}
158
158
+
engines: {node: '>=18'}
159
159
+
cpu: [x64]
160
160
+
os: [sunos]
161
161
+
162
162
+
'@esbuild/win32-arm64@0.25.2':
163
163
+
resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==}
164
164
+
engines: {node: '>=18'}
165
165
+
cpu: [arm64]
166
166
+
os: [win32]
167
167
+
168
168
+
'@esbuild/win32-ia32@0.25.2':
169
169
+
resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==}
170
170
+
engines: {node: '>=18'}
171
171
+
cpu: [ia32]
172
172
+
os: [win32]
173
173
+
174
174
+
'@esbuild/win32-x64@0.25.2':
175
175
+
resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==}
176
176
+
engines: {node: '>=18'}
177
177
+
cpu: [x64]
178
178
+
os: [win32]
179
179
+
180
180
+
'@rollup/rollup-android-arm-eabi@4.40.0':
181
181
+
resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==}
182
182
+
cpu: [arm]
183
183
+
os: [android]
184
184
+
185
185
+
'@rollup/rollup-android-arm64@4.40.0':
186
186
+
resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==}
187
187
+
cpu: [arm64]
188
188
+
os: [android]
189
189
+
190
190
+
'@rollup/rollup-darwin-arm64@4.40.0':
191
191
+
resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==}
192
192
+
cpu: [arm64]
193
193
+
os: [darwin]
194
194
+
195
195
+
'@rollup/rollup-darwin-x64@4.40.0':
196
196
+
resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==}
197
197
+
cpu: [x64]
198
198
+
os: [darwin]
199
199
+
200
200
+
'@rollup/rollup-freebsd-arm64@4.40.0':
201
201
+
resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==}
202
202
+
cpu: [arm64]
203
203
+
os: [freebsd]
204
204
+
205
205
+
'@rollup/rollup-freebsd-x64@4.40.0':
206
206
+
resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==}
207
207
+
cpu: [x64]
208
208
+
os: [freebsd]
209
209
+
210
210
+
'@rollup/rollup-linux-arm-gnueabihf@4.40.0':
211
211
+
resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==}
212
212
+
cpu: [arm]
213
213
+
os: [linux]
214
214
+
215
215
+
'@rollup/rollup-linux-arm-musleabihf@4.40.0':
216
216
+
resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==}
217
217
+
cpu: [arm]
218
218
+
os: [linux]
219
219
+
220
220
+
'@rollup/rollup-linux-arm64-gnu@4.40.0':
221
221
+
resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==}
222
222
+
cpu: [arm64]
223
223
+
os: [linux]
224
224
+
225
225
+
'@rollup/rollup-linux-arm64-musl@4.40.0':
226
226
+
resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==}
227
227
+
cpu: [arm64]
228
228
+
os: [linux]
229
229
+
230
230
+
'@rollup/rollup-linux-loongarch64-gnu@4.40.0':
231
231
+
resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==}
232
232
+
cpu: [loong64]
233
233
+
os: [linux]
234
234
+
235
235
+
'@rollup/rollup-linux-powerpc64le-gnu@4.40.0':
236
236
+
resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==}
237
237
+
cpu: [ppc64]
238
238
+
os: [linux]
239
239
+
240
240
+
'@rollup/rollup-linux-riscv64-gnu@4.40.0':
241
241
+
resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==}
242
242
+
cpu: [riscv64]
243
243
+
os: [linux]
244
244
+
245
245
+
'@rollup/rollup-linux-riscv64-musl@4.40.0':
246
246
+
resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==}
247
247
+
cpu: [riscv64]
248
248
+
os: [linux]
249
249
+
250
250
+
'@rollup/rollup-linux-s390x-gnu@4.40.0':
251
251
+
resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==}
252
252
+
cpu: [s390x]
253
253
+
os: [linux]
254
254
+
255
255
+
'@rollup/rollup-linux-x64-gnu@4.40.0':
256
256
+
resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==}
257
257
+
cpu: [x64]
258
258
+
os: [linux]
259
259
+
260
260
+
'@rollup/rollup-linux-x64-musl@4.40.0':
261
261
+
resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==}
262
262
+
cpu: [x64]
263
263
+
os: [linux]
264
264
+
265
265
+
'@rollup/rollup-win32-arm64-msvc@4.40.0':
266
266
+
resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==}
267
267
+
cpu: [arm64]
268
268
+
os: [win32]
269
269
+
270
270
+
'@rollup/rollup-win32-ia32-msvc@4.40.0':
271
271
+
resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==}
272
272
+
cpu: [ia32]
273
273
+
os: [win32]
274
274
+
275
275
+
'@rollup/rollup-win32-x64-msvc@4.40.0':
276
276
+
resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==}
277
277
+
cpu: [x64]
278
278
+
os: [win32]
279
279
+
280
280
+
'@types/estree@1.0.7':
281
281
+
resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
282
282
+
283
283
+
'@xterm/addon-fit@0.10.0':
284
284
+
resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==}
285
285
+
peerDependencies:
286
286
+
'@xterm/xterm': ^5.0.0
287
287
+
288
288
+
'@xterm/addon-webgl@0.18.0':
289
289
+
resolution: {integrity: sha512-xCnfMBTI+/HKPdRnSOHaJDRqEpq2Ugy8LEj9GiY4J3zJObo3joylIFaMvzBwbYRg8zLtkO0KQaStCeSfoaI2/w==}
290
290
+
peerDependencies:
291
291
+
'@xterm/xterm': ^5.0.0
292
292
+
293
293
+
'@xterm/xterm@5.5.0':
294
294
+
resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==}
295
295
+
296
296
+
esbuild@0.25.2:
297
297
+
resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==}
298
298
+
engines: {node: '>=18'}
299
299
+
hasBin: true
300
300
+
301
301
+
fdir@6.4.3:
302
302
+
resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}
303
303
+
peerDependencies:
304
304
+
picomatch: ^3 || ^4
305
305
+
peerDependenciesMeta:
306
306
+
picomatch:
307
307
+
optional: true
308
308
+
309
309
+
fsevents@2.3.3:
310
310
+
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
311
311
+
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
312
312
+
os: [darwin]
313
313
+
314
314
+
nanoid@3.3.11:
315
315
+
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
316
316
+
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
317
317
+
hasBin: true
318
318
+
319
319
+
picocolors@1.1.1:
320
320
+
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
321
321
+
322
322
+
picomatch@4.0.2:
323
323
+
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
324
324
+
engines: {node: '>=12'}
325
325
+
326
326
+
postcss@8.5.3:
327
327
+
resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==}
328
328
+
engines: {node: ^10 || ^12 || >=14}
329
329
+
330
330
+
rollup@4.40.0:
331
331
+
resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==}
332
332
+
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
333
333
+
hasBin: true
334
334
+
335
335
+
source-map-js@1.2.1:
336
336
+
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
337
337
+
engines: {node: '>=0.10.0'}
338
338
+
339
339
+
tinyglobby@0.2.12:
340
340
+
resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==}
341
341
+
engines: {node: '>=12.0.0'}
342
342
+
343
343
+
typescript@5.8.3:
344
344
+
resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
345
345
+
engines: {node: '>=14.17'}
346
346
+
hasBin: true
347
347
+
348
348
+
vite@6.3.1:
349
349
+
resolution: {integrity: sha512-kkzzkqtMESYklo96HKKPE5KKLkC1amlsqt+RjFMlX2AvbRB/0wghap19NdBxxwGZ+h/C6DLCrcEphPIItlGrRQ==}
350
350
+
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
351
351
+
hasBin: true
352
352
+
peerDependencies:
353
353
+
'@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0
354
354
+
jiti: '>=1.21.0'
355
355
+
less: '*'
356
356
+
lightningcss: ^1.21.0
357
357
+
sass: '*'
358
358
+
sass-embedded: '*'
359
359
+
stylus: '*'
360
360
+
sugarss: '*'
361
361
+
terser: ^5.16.0
362
362
+
tsx: ^4.8.1
363
363
+
yaml: ^2.4.2
364
364
+
peerDependenciesMeta:
365
365
+
'@types/node':
366
366
+
optional: true
367
367
+
jiti:
368
368
+
optional: true
369
369
+
less:
370
370
+
optional: true
371
371
+
lightningcss:
372
372
+
optional: true
373
373
+
sass:
374
374
+
optional: true
375
375
+
sass-embedded:
376
376
+
optional: true
377
377
+
stylus:
378
378
+
optional: true
379
379
+
sugarss:
380
380
+
optional: true
381
381
+
terser:
382
382
+
optional: true
383
383
+
tsx:
384
384
+
optional: true
385
385
+
yaml:
386
386
+
optional: true
387
387
+
388
388
+
snapshots:
389
389
+
390
390
+
'@esbuild/aix-ppc64@0.25.2':
391
391
+
optional: true
392
392
+
393
393
+
'@esbuild/android-arm64@0.25.2':
394
394
+
optional: true
395
395
+
396
396
+
'@esbuild/android-arm@0.25.2':
397
397
+
optional: true
398
398
+
399
399
+
'@esbuild/android-x64@0.25.2':
400
400
+
optional: true
401
401
+
402
402
+
'@esbuild/darwin-arm64@0.25.2':
403
403
+
optional: true
404
404
+
405
405
+
'@esbuild/darwin-x64@0.25.2':
406
406
+
optional: true
407
407
+
408
408
+
'@esbuild/freebsd-arm64@0.25.2':
409
409
+
optional: true
410
410
+
411
411
+
'@esbuild/freebsd-x64@0.25.2':
412
412
+
optional: true
413
413
+
414
414
+
'@esbuild/linux-arm64@0.25.2':
415
415
+
optional: true
416
416
+
417
417
+
'@esbuild/linux-arm@0.25.2':
418
418
+
optional: true
419
419
+
420
420
+
'@esbuild/linux-ia32@0.25.2':
421
421
+
optional: true
422
422
+
423
423
+
'@esbuild/linux-loong64@0.25.2':
424
424
+
optional: true
425
425
+
426
426
+
'@esbuild/linux-mips64el@0.25.2':
427
427
+
optional: true
428
428
+
429
429
+
'@esbuild/linux-ppc64@0.25.2':
430
430
+
optional: true
431
431
+
432
432
+
'@esbuild/linux-riscv64@0.25.2':
433
433
+
optional: true
434
434
+
435
435
+
'@esbuild/linux-s390x@0.25.2':
436
436
+
optional: true
437
437
+
438
438
+
'@esbuild/linux-x64@0.25.2':
439
439
+
optional: true
440
440
+
441
441
+
'@esbuild/netbsd-arm64@0.25.2':
442
442
+
optional: true
443
443
+
444
444
+
'@esbuild/netbsd-x64@0.25.2':
445
445
+
optional: true
446
446
+
447
447
+
'@esbuild/openbsd-arm64@0.25.2':
448
448
+
optional: true
449
449
+
450
450
+
'@esbuild/openbsd-x64@0.25.2':
451
451
+
optional: true
452
452
+
453
453
+
'@esbuild/sunos-x64@0.25.2':
454
454
+
optional: true
455
455
+
456
456
+
'@esbuild/win32-arm64@0.25.2':
457
457
+
optional: true
458
458
+
459
459
+
'@esbuild/win32-ia32@0.25.2':
460
460
+
optional: true
461
461
+
462
462
+
'@esbuild/win32-x64@0.25.2':
463
463
+
optional: true
464
464
+
465
465
+
'@rollup/rollup-android-arm-eabi@4.40.0':
466
466
+
optional: true
467
467
+
468
468
+
'@rollup/rollup-android-arm64@4.40.0':
469
469
+
optional: true
470
470
+
471
471
+
'@rollup/rollup-darwin-arm64@4.40.0':
472
472
+
optional: true
473
473
+
474
474
+
'@rollup/rollup-darwin-x64@4.40.0':
475
475
+
optional: true
476
476
+
477
477
+
'@rollup/rollup-freebsd-arm64@4.40.0':
478
478
+
optional: true
479
479
+
480
480
+
'@rollup/rollup-freebsd-x64@4.40.0':
481
481
+
optional: true
482
482
+
483
483
+
'@rollup/rollup-linux-arm-gnueabihf@4.40.0':
484
484
+
optional: true
485
485
+
486
486
+
'@rollup/rollup-linux-arm-musleabihf@4.40.0':
487
487
+
optional: true
488
488
+
489
489
+
'@rollup/rollup-linux-arm64-gnu@4.40.0':
490
490
+
optional: true
491
491
+
492
492
+
'@rollup/rollup-linux-arm64-musl@4.40.0':
493
493
+
optional: true
494
494
+
495
495
+
'@rollup/rollup-linux-loongarch64-gnu@4.40.0':
496
496
+
optional: true
497
497
+
498
498
+
'@rollup/rollup-linux-powerpc64le-gnu@4.40.0':
499
499
+
optional: true
500
500
+
501
501
+
'@rollup/rollup-linux-riscv64-gnu@4.40.0':
502
502
+
optional: true
503
503
+
504
504
+
'@rollup/rollup-linux-riscv64-musl@4.40.0':
505
505
+
optional: true
506
506
+
507
507
+
'@rollup/rollup-linux-s390x-gnu@4.40.0':
508
508
+
optional: true
509
509
+
510
510
+
'@rollup/rollup-linux-x64-gnu@4.40.0':
511
511
+
optional: true
512
512
+
513
513
+
'@rollup/rollup-linux-x64-musl@4.40.0':
514
514
+
optional: true
515
515
+
516
516
+
'@rollup/rollup-win32-arm64-msvc@4.40.0':
517
517
+
optional: true
518
518
+
519
519
+
'@rollup/rollup-win32-ia32-msvc@4.40.0':
520
520
+
optional: true
521
521
+
522
522
+
'@rollup/rollup-win32-x64-msvc@4.40.0':
523
523
+
optional: true
524
524
+
525
525
+
'@types/estree@1.0.7': {}
526
526
+
527
527
+
'@xterm/addon-fit@0.10.0(@xterm/xterm@5.5.0)':
528
528
+
dependencies:
529
529
+
'@xterm/xterm': 5.5.0
530
530
+
531
531
+
'@xterm/addon-webgl@0.18.0(@xterm/xterm@5.5.0)':
532
532
+
dependencies:
533
533
+
'@xterm/xterm': 5.5.0
534
534
+
535
535
+
'@xterm/xterm@5.5.0': {}
536
536
+
537
537
+
esbuild@0.25.2:
538
538
+
optionalDependencies:
539
539
+
'@esbuild/aix-ppc64': 0.25.2
540
540
+
'@esbuild/android-arm': 0.25.2
541
541
+
'@esbuild/android-arm64': 0.25.2
542
542
+
'@esbuild/android-x64': 0.25.2
543
543
+
'@esbuild/darwin-arm64': 0.25.2
544
544
+
'@esbuild/darwin-x64': 0.25.2
545
545
+
'@esbuild/freebsd-arm64': 0.25.2
546
546
+
'@esbuild/freebsd-x64': 0.25.2
547
547
+
'@esbuild/linux-arm': 0.25.2
548
548
+
'@esbuild/linux-arm64': 0.25.2
549
549
+
'@esbuild/linux-ia32': 0.25.2
550
550
+
'@esbuild/linux-loong64': 0.25.2
551
551
+
'@esbuild/linux-mips64el': 0.25.2
552
552
+
'@esbuild/linux-ppc64': 0.25.2
553
553
+
'@esbuild/linux-riscv64': 0.25.2
554
554
+
'@esbuild/linux-s390x': 0.25.2
555
555
+
'@esbuild/linux-x64': 0.25.2
556
556
+
'@esbuild/netbsd-arm64': 0.25.2
557
557
+
'@esbuild/netbsd-x64': 0.25.2
558
558
+
'@esbuild/openbsd-arm64': 0.25.2
559
559
+
'@esbuild/openbsd-x64': 0.25.2
560
560
+
'@esbuild/sunos-x64': 0.25.2
561
561
+
'@esbuild/win32-arm64': 0.25.2
562
562
+
'@esbuild/win32-ia32': 0.25.2
563
563
+
'@esbuild/win32-x64': 0.25.2
564
564
+
565
565
+
fdir@6.4.3(picomatch@4.0.2):
566
566
+
optionalDependencies:
567
567
+
picomatch: 4.0.2
568
568
+
569
569
+
fsevents@2.3.3:
570
570
+
optional: true
571
571
+
572
572
+
nanoid@3.3.11: {}
573
573
+
574
574
+
picocolors@1.1.1: {}
575
575
+
576
576
+
picomatch@4.0.2: {}
577
577
+
578
578
+
postcss@8.5.3:
579
579
+
dependencies:
580
580
+
nanoid: 3.3.11
581
581
+
picocolors: 1.1.1
582
582
+
source-map-js: 1.2.1
583
583
+
584
584
+
rollup@4.40.0:
585
585
+
dependencies:
586
586
+
'@types/estree': 1.0.7
587
587
+
optionalDependencies:
588
588
+
'@rollup/rollup-android-arm-eabi': 4.40.0
589
589
+
'@rollup/rollup-android-arm64': 4.40.0
590
590
+
'@rollup/rollup-darwin-arm64': 4.40.0
591
591
+
'@rollup/rollup-darwin-x64': 4.40.0
592
592
+
'@rollup/rollup-freebsd-arm64': 4.40.0
593
593
+
'@rollup/rollup-freebsd-x64': 4.40.0
594
594
+
'@rollup/rollup-linux-arm-gnueabihf': 4.40.0
595
595
+
'@rollup/rollup-linux-arm-musleabihf': 4.40.0
596
596
+
'@rollup/rollup-linux-arm64-gnu': 4.40.0
597
597
+
'@rollup/rollup-linux-arm64-musl': 4.40.0
598
598
+
'@rollup/rollup-linux-loongarch64-gnu': 4.40.0
599
599
+
'@rollup/rollup-linux-powerpc64le-gnu': 4.40.0
600
600
+
'@rollup/rollup-linux-riscv64-gnu': 4.40.0
601
601
+
'@rollup/rollup-linux-riscv64-musl': 4.40.0
602
602
+
'@rollup/rollup-linux-s390x-gnu': 4.40.0
603
603
+
'@rollup/rollup-linux-x64-gnu': 4.40.0
604
604
+
'@rollup/rollup-linux-x64-musl': 4.40.0
605
605
+
'@rollup/rollup-win32-arm64-msvc': 4.40.0
606
606
+
'@rollup/rollup-win32-ia32-msvc': 4.40.0
607
607
+
'@rollup/rollup-win32-x64-msvc': 4.40.0
608
608
+
fsevents: 2.3.3
609
609
+
610
610
+
source-map-js@1.2.1: {}
611
611
+
612
612
+
tinyglobby@0.2.12:
613
613
+
dependencies:
614
614
+
fdir: 6.4.3(picomatch@4.0.2)
615
615
+
picomatch: 4.0.2
616
616
+
617
617
+
typescript@5.8.3: {}
618
618
+
619
619
+
vite@6.3.1:
620
620
+
dependencies:
621
621
+
esbuild: 0.25.2
622
622
+
fdir: 6.4.3(picomatch@4.0.2)
623
623
+
picomatch: 4.0.2
624
624
+
postcss: 8.5.3
625
625
+
rollup: 4.40.0
626
626
+
tinyglobby: 0.2.12
627
627
+
optionalDependencies:
628
628
+
fsevents: 2.3.3
···
1
1
+
/nix/store/fasnn16a24nrc82k3z3vywpcaf2z7rml-initramfs.cpio
···
1
1
+
/nix/store/i4zyazi838pynpgdwzijwnz92gg7a2yh-linux
···
1
1
+
import { FitAddon } from "@xterm/addon-fit";
2
2
+
import { WebglAddon } from "@xterm/addon-webgl";
3
3
+
import { Terminal } from "@xterm/xterm";
4
4
+
import "@xterm/xterm/css/xterm.css";
5
5
+
import {
6
6
+
BlockDevice,
7
7
+
ConsoleDevice,
8
8
+
EntropyDevice,
9
9
+
Machine,
10
10
+
} from "./build/linux";
11
11
+
import "./style.css";
12
12
+
13
13
+
const terminal = new Terminal({
14
14
+
convertEol: true,
15
15
+
fontFamily: "monospace",
16
16
+
});
17
17
+
18
18
+
{
19
19
+
const terminal_fit = new FitAddon();
20
20
+
terminal.loadAddon(terminal_fit);
21
21
+
terminal.open(document.body);
22
22
+
terminal_fit.fit();
23
23
+
window.onresize = () => terminal_fit.fit();
24
24
+
}
25
25
+
26
26
+
try {
27
27
+
terminal.loadAddon(new WebglAddon());
28
28
+
} catch (err) {
29
29
+
console.warn(err);
30
30
+
}
31
31
+
32
32
+
if (!window.crossOriginIsolated) {
33
33
+
terminal.write("Error: not cross origin isolated\n");
34
34
+
}
35
35
+
36
36
+
const {
37
37
+
cmdline = "",
38
38
+
memory = navigator.hardwareConcurrency > 16 ? 256 : 128,
39
39
+
initcpio: initcpio_path = new URL("./build/initcpio", import.meta.url).href,
40
40
+
} = Object.fromEntries(new URLSearchParams(location.search));
41
41
+
42
42
+
(document.querySelector("input[name=cmdline]") as HTMLInputElement).value =
43
43
+
cmdline;
44
44
+
(document.querySelector("input[name=memory]") as HTMLInputElement).value =
45
45
+
String(memory);
46
46
+
(document.querySelector("input[name=initcpio]") as HTMLInputElement).value =
47
47
+
initcpio_path;
48
48
+
49
49
+
const initcpio = await fetch(initcpio_path).then((res) =>
50
50
+
res.ok ? res.arrayBuffer() : null,
51
51
+
);
52
52
+
if (!initcpio) {
53
53
+
terminal.write(`Failed to fetch initramfs.\n`);
54
54
+
}
55
55
+
56
56
+
const stdin = new ReadableStream<string>({
57
57
+
start(controller) {
58
58
+
terminal.onData((data) => {
59
59
+
controller.enqueue(data);
60
60
+
});
61
61
+
},
62
62
+
}).pipeThrough(new TextEncoderStream());
63
63
+
64
64
+
const stdout = new WritableStream<Uint8Array>({
65
65
+
write(chunk) {
66
66
+
terminal.write(chunk);
67
67
+
},
68
68
+
});
69
69
+
const stdout2 = new WritableStream<Uint8Array>({
70
70
+
write(chunk) {
71
71
+
terminal.write(chunk);
72
72
+
},
73
73
+
});
74
74
+
75
75
+
const machine = new Machine({
76
76
+
cmdline: cmdline.replace(/\+/g, " "),
77
77
+
memoryMib: Number(memory),
78
78
+
devices: [
79
79
+
new ConsoleDevice(stdin, stdout),
80
80
+
new EntropyDevice(),
81
81
+
new BlockDevice(new Uint8Array(8 * 1024 * 1024)),
82
82
+
],
83
83
+
initcpio: initcpio ? new Uint8Array(initcpio) : undefined,
84
84
+
});
85
85
+
86
86
+
// machine.bootConsole.pipeTo(stdout2);
87
87
+
88
88
+
machine.on("halt", () => {
89
89
+
terminal.write("halting...");
90
90
+
});
91
91
+
92
92
+
machine.on("restart", () => {
93
93
+
location.reload();
94
94
+
});
95
95
+
96
96
+
machine.on("error", ({ error, threadName }) => {
97
97
+
terminal.write(`${error.name} in ${threadName}: ${error.message}\n`);
98
98
+
});
99
99
+
100
100
+
machine.boot();
···
1
1
+
:root {
2
2
+
color-scheme: light dark;
3
3
+
font-family: system-ui, sans-serif;
4
4
+
}
5
5
+
6
6
+
html {
7
7
+
height: 100%;
8
8
+
body {
9
9
+
margin: 0;
10
10
+
height: 100%;
11
11
+
display: flex;
12
12
+
flex-direction: column;
13
13
+
.terminal {
14
14
+
flex: 1;
15
15
+
}
16
16
+
}
17
17
+
}
18
18
+
19
19
+
details {
20
20
+
font-size: 1.2rem;
21
21
+
margin: 1rem;
22
22
+
summary {
23
23
+
user-select: none;
24
24
+
}
25
25
+
form {
26
26
+
display: grid;
27
27
+
grid-template-columns: 15ch 1fr;
28
28
+
grid-column: 2;
29
29
+
input {
30
30
+
font-family: monospace;
31
31
+
}
32
32
+
button {
33
33
+
grid-column: span 2;
34
34
+
}
35
35
+
}
36
36
+
}
···
1
1
+
{
2
2
+
"compilerOptions": {
3
3
+
"target": "ES2020",
4
4
+
"useDefineForClassFields": true,
5
5
+
"module": "ESNext",
6
6
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7
7
+
"skipLibCheck": true,
8
8
+
"types": ["vite/client"],
9
9
+
10
10
+
/* Bundler mode */
11
11
+
"moduleResolution": "bundler",
12
12
+
"allowImportingTsExtensions": true,
13
13
+
"isolatedModules": true,
14
14
+
"moduleDetection": "force",
15
15
+
"noEmit": true,
16
16
+
17
17
+
/* Linting */
18
18
+
"strict": true,
19
19
+
"noUnusedLocals": true,
20
20
+
"noUnusedParameters": true,
21
21
+
"noFallthroughCasesInSwitch": true,
22
22
+
"noUncheckedSideEffectImports": true
23
23
+
},
24
24
+
"include": ["src"]
25
25
+
}
···
1
1
+
import { defineConfig } from "vite";
2
2
+
3
3
+
export default defineConfig({
4
4
+
server: {
5
5
+
fs: {
6
6
+
allow: ["..", "/nix/store"],
7
7
+
},
8
8
+
headers: {
9
9
+
"Cross-Origin-Opener-Policy": "same-origin",
10
10
+
"Cross-Origin-Embedder-Policy": "require-corp",
11
11
+
"Cross-Origin-Resource-Policy": "cross-origin",
12
12
+
},
13
13
+
},
14
14
+
});