mirror of
https://github.com/oven-sh/bun
synced 2026-02-19 23:31:45 +00:00
Compare commits
1087 Commits
jarred/jsc
...
jarred/liv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62fb5ea9e3 | ||
|
|
a6ec858750 | ||
|
|
ba100fa9dc | ||
|
|
2c53ff2980 | ||
|
|
b2fcc027a9 | ||
|
|
1dc78ba4b7 | ||
|
|
04e0910dea | ||
|
|
d19a6199ea | ||
|
|
e8925e47b0 | ||
|
|
cc712668f0 | ||
|
|
f7dbf5ac38 | ||
|
|
283a01493c | ||
|
|
f82aa92c38 | ||
|
|
7660f72745 | ||
|
|
4e4f2058c2 | ||
|
|
ca25e32c0f | ||
|
|
5a1f60c729 | ||
|
|
ac242f94ca | ||
|
|
9ab9b01a64 | ||
|
|
cdeb39bd7f | ||
|
|
1d01ffeb9e | ||
|
|
25a49005cc | ||
|
|
875b60dfe5 | ||
|
|
c071037485 | ||
|
|
4edfa171f0 | ||
|
|
0eb3cdc43c | ||
|
|
f747fd9dfa | ||
|
|
c06e34c687 | ||
|
|
7f62169b5e | ||
|
|
5b2c7ad1f3 | ||
|
|
c535cd7613 | ||
|
|
6e21c9927c | ||
|
|
c3d9804e85 | ||
|
|
30c79875a3 | ||
|
|
a79153f6e0 | ||
|
|
87319ba73d | ||
|
|
cb18bf7e5d | ||
|
|
304a36b814 | ||
|
|
6ee673095c | ||
|
|
cf4964c8f4 | ||
|
|
a1b88e85fd | ||
|
|
46a8215092 | ||
|
|
62694f0ee9 | ||
|
|
e8bdf1c7db | ||
|
|
2af4192756 | ||
|
|
fd80d0a22d | ||
|
|
86743ab361 | ||
|
|
cca8081f2e | ||
|
|
5c5b246cc3 | ||
|
|
469a36e3b6 | ||
|
|
f9d333bec2 | ||
|
|
38879cd3d9 | ||
|
|
eb3123adb8 | ||
|
|
2b4f20b94c | ||
|
|
19949c0743 | ||
|
|
8d03e0cf02 | ||
|
|
265b1035f4 | ||
|
|
8e0230b756 | ||
|
|
478273e044 | ||
|
|
d0c2f5495c | ||
|
|
4a09ad51f0 | ||
|
|
5bef1b46d3 | ||
|
|
3bec430192 | ||
|
|
18f0093b18 | ||
|
|
adfaa21d03 | ||
|
|
01d1f1d258 | ||
|
|
4e775d275c | ||
|
|
035f6fe5e1 | ||
|
|
bba74499e5 | ||
|
|
b61cbb1df8 | ||
|
|
1a60d7df98 | ||
|
|
89a7e3bf2f | ||
|
|
fe1a6cee10 | ||
|
|
6a66d9f7fb | ||
|
|
fadbcca99c | ||
|
|
0b48e7272d | ||
|
|
23bdc6f792 | ||
|
|
de7274fcff | ||
|
|
b126392a8e | ||
|
|
d2a9e31fd3 | ||
|
|
6d61bcc4e1 | ||
|
|
d8e3ca4a88 | ||
|
|
351184991a | ||
|
|
14b51ef57c | ||
|
|
7a836382b3 | ||
|
|
360dec4fb9 | ||
|
|
83cf1be2b9 | ||
|
|
241525947c | ||
|
|
76a99eaa18 | ||
|
|
4bceb57ad1 | ||
|
|
c7705a6325 | ||
|
|
4f78e2c47c | ||
|
|
6789aed119 | ||
|
|
291f26cba0 | ||
|
|
a3458ce6e3 | ||
|
|
a7eb5397a4 | ||
|
|
fc03ed2969 | ||
|
|
12f1991771 | ||
|
|
57946e114c | ||
|
|
8b3463e73f | ||
|
|
3cb7dbe921 | ||
|
|
d11102d858 | ||
|
|
183911514a | ||
|
|
bc3c17ffc8 | ||
|
|
3379289024 | ||
|
|
562a8df46b | ||
|
|
68e2869d64 | ||
|
|
c6818cc55c | ||
|
|
08b3bab2ec | ||
|
|
34771aad22 | ||
|
|
109d53d461 | ||
|
|
958520f557 | ||
|
|
12c311da3f | ||
|
|
d7d9df726b | ||
|
|
a368182769 | ||
|
|
2a9fd30d36 | ||
|
|
082a944e0b | ||
|
|
e1b68665db | ||
|
|
c64ef1e2f4 | ||
|
|
3063c2e64d | ||
|
|
38f46169d9 | ||
|
|
c1aa0323dc | ||
|
|
673b755987 | ||
|
|
3d6fab6e49 | ||
|
|
d0823beef5 | ||
|
|
b0e98892e5 | ||
|
|
0006d28cbb | ||
|
|
42dcc4e217 | ||
|
|
13582981e4 | ||
|
|
d4c1bf6c67 | ||
|
|
3ef55d10ae | ||
|
|
5ce171d92c | ||
|
|
e409148941 | ||
|
|
d44abd8e4d | ||
|
|
5c38b6c355 | ||
|
|
04ecfdd794 | ||
|
|
fc59a32b63 | ||
|
|
fd57e2d9a6 | ||
|
|
303a5ea898 | ||
|
|
d502d0bcd6 | ||
|
|
2018f5020a | ||
|
|
92a7849e98 | ||
|
|
59bdb62966 | ||
|
|
eab1938012 | ||
|
|
d97bd79c86 | ||
|
|
35c05f61e5 | ||
|
|
a5181c8ed1 | ||
|
|
aa545ac0dc | ||
|
|
ac9bd094f3 | ||
|
|
becf55febc | ||
|
|
c41cc80700 | ||
|
|
20b1a27d05 | ||
|
|
a027e9b6bc | ||
|
|
3fe676e9c9 | ||
|
|
bffe8e918b | ||
|
|
92e5fe9fd5 | ||
|
|
b107ac1659 | ||
|
|
5537c03569 | ||
|
|
4ab7c82405 | ||
|
|
6e8cd2e3e5 | ||
|
|
c0c7527497 | ||
|
|
e71cb5c8c9 | ||
|
|
cdbb4cf68a | ||
|
|
204d468ad2 | ||
|
|
1844212f34 | ||
|
|
fbb0342511 | ||
|
|
92b174b315 | ||
|
|
0ba9784be2 | ||
|
|
2c50cf7284 | ||
|
|
bea0dca55d | ||
|
|
1676af9de9 | ||
|
|
3d48bdaad1 | ||
|
|
1b474d4f97 | ||
|
|
4467167f99 | ||
|
|
36ec8bb99b | ||
|
|
bc5f99dc43 | ||
|
|
4d4966592e | ||
|
|
f1fff3af7e | ||
|
|
83e553d6a9 | ||
|
|
173724b402 | ||
|
|
64d3927879 | ||
|
|
49ad70b11c | ||
|
|
0d0b769bcc | ||
|
|
fb2aa186b7 | ||
|
|
ef94826f95 | ||
|
|
d79f34e960 | ||
|
|
4ce6e4a9cb | ||
|
|
9cf2771549 | ||
|
|
daf583e4cb | ||
|
|
51e55f4b6e | ||
|
|
f30527b6d9 | ||
|
|
17b186933d | ||
|
|
fd57edceff | ||
|
|
1876c0e11a | ||
|
|
cd5c740368 | ||
|
|
e2eef2bb25 | ||
|
|
ad3c19a160 | ||
|
|
07bb25f7b1 | ||
|
|
edd0223377 | ||
|
|
34a8a623f4 | ||
|
|
f854539ea9 | ||
|
|
cd1b8ccde7 | ||
|
|
cf3f8d2bb0 | ||
|
|
f1a0e718b3 | ||
|
|
08e0a51036 | ||
|
|
8e0f21cc91 | ||
|
|
ae7843f244 | ||
|
|
b5b47e6525 | ||
|
|
e7a4f9f507 | ||
|
|
658926189f | ||
|
|
154c8372e3 | ||
|
|
a68b5eef86 | ||
|
|
65ea1e4647 | ||
|
|
f8f85430c0 | ||
|
|
d8a2eb81e3 | ||
|
|
9a9c0df6b0 | ||
|
|
0a86beccc7 | ||
|
|
2fe9791127 | ||
|
|
b856d50c3f | ||
|
|
dde2b80e1d | ||
|
|
49b954462d | ||
|
|
c51dac1282 | ||
|
|
0d002c7057 | ||
|
|
1d03e90b5c | ||
|
|
25ac773cf3 | ||
|
|
ecb069ac85 | ||
|
|
a6cf6c4069 | ||
|
|
6854d83842 | ||
|
|
4aab78f619 | ||
|
|
95d2860930 | ||
|
|
70db76a798 | ||
|
|
07bf3eb1e9 | ||
|
|
237e672e70 | ||
|
|
61d436c29d | ||
|
|
22ea3e76f9 | ||
|
|
0089d04459 | ||
|
|
26ee46ad5b | ||
|
|
417c4e0faa | ||
|
|
b6675dd0ab | ||
|
|
dff40c5220 | ||
|
|
1fd426432e | ||
|
|
97c43ef787 | ||
|
|
a546e56669 | ||
|
|
4b52192974 | ||
|
|
fb10e0c4cb | ||
|
|
a44cb9708f | ||
|
|
c7fc08056a | ||
|
|
12ba37e43a | ||
|
|
928346b842 | ||
|
|
b81c895e1d | ||
|
|
d434e5aeac | ||
|
|
2250db41b4 | ||
|
|
826db9021e | ||
|
|
ad61279621 | ||
|
|
5ce1b36130 | ||
|
|
a1f17f70eb | ||
|
|
a0f086ba85 | ||
|
|
8d095a235f | ||
|
|
ff1417421b | ||
|
|
00fb04f309 | ||
|
|
a3cc17fbe6 | ||
|
|
fd27d403d7 | ||
|
|
6d29e314a0 | ||
|
|
902e438e6c | ||
|
|
096d668d83 | ||
|
|
49c5c32714 | ||
|
|
9a70d8daa2 | ||
|
|
79eb8d9d78 | ||
|
|
221b280856 | ||
|
|
933378ab80 | ||
|
|
bd51d194cf | ||
|
|
1e27c7d8ce | ||
|
|
7d554ed175 | ||
|
|
e72d765961 | ||
|
|
9ce38b86ab | ||
|
|
05bdda7b07 | ||
|
|
d68f18c77a | ||
|
|
ae6349e573 | ||
|
|
0541cff2ad | ||
|
|
e69f8c36d2 | ||
|
|
e7f191c08b | ||
|
|
6a2372b0b2 | ||
|
|
0592515639 | ||
|
|
a6c4bba6c2 | ||
|
|
5691bf385b | ||
|
|
a149f0abb9 | ||
|
|
eae7051111 | ||
|
|
adb6be05d1 | ||
|
|
4e889c7b47 | ||
|
|
2ed6605cc3 | ||
|
|
42c264bf7b | ||
|
|
fe6564b533 | ||
|
|
f6923f21b1 | ||
|
|
edfc61889c | ||
|
|
08c8ca18a7 | ||
|
|
9e4f16ac8b | ||
|
|
03ece0568d | ||
|
|
2dcb465d50 | ||
|
|
c93655c717 | ||
|
|
6f6510169e | ||
|
|
cfe159f636 | ||
|
|
213f361551 | ||
|
|
3582941791 | ||
|
|
a3cd9347e6 | ||
|
|
449c8b5f36 | ||
|
|
1f7af3754d | ||
|
|
72df6b9be2 | ||
|
|
044c0cfdc3 | ||
|
|
3c43f65234 | ||
|
|
bd2d284c53 | ||
|
|
ffea9c010b | ||
|
|
44351b57f7 | ||
|
|
4bbb938de8 | ||
|
|
437270e0af | ||
|
|
09b7f4c95d | ||
|
|
38f83c50c4 | ||
|
|
2f06dc5755 | ||
|
|
d6b66e2155 | ||
|
|
309298fa42 | ||
|
|
a0a2fa964b | ||
|
|
0c769d0f61 | ||
|
|
1b90619890 | ||
|
|
0ea34216de | ||
|
|
53374ac54a | ||
|
|
6355ac219e | ||
|
|
384ad96637 | ||
|
|
0361b0df70 | ||
|
|
a1b8c20c3f | ||
|
|
de01d581c1 | ||
|
|
f1bda194e0 | ||
|
|
a84b62452c | ||
|
|
e039ba5130 | ||
|
|
e67dd8947b | ||
|
|
2d6a4a4956 | ||
|
|
f394581ed8 | ||
|
|
33b0c89e7c | ||
|
|
4e3aa3c289 | ||
|
|
58b196c583 | ||
|
|
3dc53c3d13 | ||
|
|
4f2c1cfe85 | ||
|
|
6e16b3cf84 | ||
|
|
9f0ab479b0 | ||
|
|
884b5e13ee | ||
|
|
7d4aab4cf1 | ||
|
|
6bb0c03d8d | ||
|
|
797c94b0e9 | ||
|
|
e63fbcefe9 | ||
|
|
dcc29d3db6 | ||
|
|
be66c01829 | ||
|
|
21b9884606 | ||
|
|
fd6d93292c | ||
|
|
9000165718 | ||
|
|
54b313cc5a | ||
|
|
2461c11536 | ||
|
|
f17345ffe4 | ||
|
|
4908a63f61 | ||
|
|
da7de899e1 | ||
|
|
44108d6a26 | ||
|
|
c7fb978b7b | ||
|
|
0db94d94d6 | ||
|
|
92e489760d | ||
|
|
decee7616f | ||
|
|
deafd3d0d4 | ||
|
|
b9bbd819be | ||
|
|
b956ea5a5e | ||
|
|
cf2e81b036 | ||
|
|
bf2732599c | ||
|
|
10696680ff | ||
|
|
7e159cb5cd | ||
|
|
74cda61c88 | ||
|
|
9dfe57a3f7 | ||
|
|
f10dcd780c | ||
|
|
bee7efb5d9 | ||
|
|
0039b53d21 | ||
|
|
9f86acbe58 | ||
|
|
bbc1bcbed1 | ||
|
|
3ed824fe0f | ||
|
|
fe24b96d61 | ||
|
|
4b6d8a152f | ||
|
|
e21b9afdf2 | ||
|
|
901d7d8759 | ||
|
|
4b618f9ad1 | ||
|
|
0f7bc76f39 | ||
|
|
6d997ab201 | ||
|
|
8f7f4ae72f | ||
|
|
c85b5f6a87 | ||
|
|
ba5f9887fb | ||
|
|
9e3e9a2d6d | ||
|
|
88a5e2d34d | ||
|
|
afc346d6f1 | ||
|
|
4dd398ca7a | ||
|
|
756bfc9077 | ||
|
|
f646250a91 | ||
|
|
24c567086f | ||
|
|
05b1696df7 | ||
|
|
0baa3b511e | ||
|
|
d793088575 | ||
|
|
9aa7f9ed18 | ||
|
|
e7f6cf12a5 | ||
|
|
e2ba468924 | ||
|
|
85760c0a4c | ||
|
|
0db7af6166 | ||
|
|
5e3d1dd4b5 | ||
|
|
6eb9a36a22 | ||
|
|
e88e9401f1 | ||
|
|
829b4287dd | ||
|
|
2bf7b5a7ab | ||
|
|
1c83f3091c | ||
|
|
dfd08e7c55 | ||
|
|
3b28af17db | ||
|
|
5a03dfb9a4 | ||
|
|
fa1aa301e8 | ||
|
|
ae7b91efe2 | ||
|
|
6d9ccd9b8e | ||
|
|
0d79435ce2 | ||
|
|
4ee2fdf1c6 | ||
|
|
cd273daa1b | ||
|
|
c2e9d49f69 | ||
|
|
38a9c92eec | ||
|
|
1d0f442718 | ||
|
|
1e8babe185 | ||
|
|
69d3b5ca60 | ||
|
|
a493c18193 | ||
|
|
5370ea71c0 | ||
|
|
0afec7739b | ||
|
|
a7173d54ce | ||
|
|
3b10cfae80 | ||
|
|
bd14ad9e6e | ||
|
|
9507cd8ed6 | ||
|
|
dfe74cb5c4 | ||
|
|
00e7b7c3d5 | ||
|
|
d2be50bf4d | ||
|
|
f0f3d6d4eb | ||
|
|
21d918921a | ||
|
|
55095edee6 | ||
|
|
6a7deab74d | ||
|
|
7db27f11d0 | ||
|
|
3ebb4feb98 | ||
|
|
e8dab9bfcf | ||
|
|
dc3eee44a9 | ||
|
|
9e8463af33 | ||
|
|
dd2bdd09db | ||
|
|
0eb3c1d393 | ||
|
|
cb6a1b7225 | ||
|
|
38c73788e1 | ||
|
|
2c89122ce9 | ||
|
|
2eae013ebf | ||
|
|
1247a9c93d | ||
|
|
5c6dd19826 | ||
|
|
9d0ee5c5cd | ||
|
|
3affc2a2d8 | ||
|
|
02bdaa6d10 | ||
|
|
aee263d050 | ||
|
|
7ac4abf8a0 | ||
|
|
139622e0b8 | ||
|
|
aaa4aaf53f | ||
|
|
73c27a9a25 | ||
|
|
82bf89a946 | ||
|
|
f4a4e793aa | ||
|
|
cdabcfd9d0 | ||
|
|
ac7a96b088 | ||
|
|
6932f3d543 | ||
|
|
222027991f | ||
|
|
5bb5091fe0 | ||
|
|
c8127d0ae6 | ||
|
|
8764fa6d4e | ||
|
|
86b7b5b8d8 | ||
|
|
127426f506 | ||
|
|
09cc970b9e | ||
|
|
03f7c5be1f | ||
|
|
4ecf513662 | ||
|
|
76b450386f | ||
|
|
38a54898a3 | ||
|
|
147d1f3951 | ||
|
|
d47419f471 | ||
|
|
367f9c9674 | ||
|
|
f9a906873e | ||
|
|
4be8aaeab8 | ||
|
|
5fdaad9a2f | ||
|
|
5855fb7cc6 | ||
|
|
f226f52200 | ||
|
|
db24a27e61 | ||
|
|
f8297aee4d | ||
|
|
b267aace71 | ||
|
|
b4bd8e4169 | ||
|
|
fdda1078f8 | ||
|
|
88e7e12a50 | ||
|
|
4cdc8939ab | ||
|
|
ec256209a8 | ||
|
|
74db7809eb | ||
|
|
5dac4e6108 | ||
|
|
e51155d8e6 | ||
|
|
2bb7f71b9c | ||
|
|
2f8be4f13f | ||
|
|
8e9d85f10f | ||
|
|
70bae801dc | ||
|
|
37ffe4501c | ||
|
|
13f6297312 | ||
|
|
f9dfa226a5 | ||
|
|
0da19a25cf | ||
|
|
3b92a867e2 | ||
|
|
1ada4a2c67 | ||
|
|
97ad21dc68 | ||
|
|
54dc9cfc8b | ||
|
|
1ed51e8866 | ||
|
|
9e0511995a | ||
|
|
62d51f7d2e | ||
|
|
4f9558dd71 | ||
|
|
86109dcfd0 | ||
|
|
adf22db8b6 | ||
|
|
eb3473125c | ||
|
|
b3894994c0 | ||
|
|
e1306be4be | ||
|
|
002d46d0c4 | ||
|
|
018ba2c83b | ||
|
|
66ed7c1f30 | ||
|
|
a113603f10 | ||
|
|
6f6d62d915 | ||
|
|
ff8393ce32 | ||
|
|
8b209aecf9 | ||
|
|
a515a2d039 | ||
|
|
d0fec462c9 | ||
|
|
20e2040e7e | ||
|
|
538f73b2fa | ||
|
|
a0fb04d6e5 | ||
|
|
44497ef384 | ||
|
|
5fb38b92d9 | ||
|
|
4737588aac | ||
|
|
a5d3ce4e96 | ||
|
|
66b29654c0 | ||
|
|
940570af59 | ||
|
|
bdfb5a91b1 | ||
|
|
29b986684d | ||
|
|
e48a0877ef | ||
|
|
22837d69b7 | ||
|
|
af306b523b | ||
|
|
ba20fd7566 | ||
|
|
6d1330d601 | ||
|
|
f3be0c79c2 | ||
|
|
10c01af692 | ||
|
|
a68a1983cf | ||
|
|
90a647fb72 | ||
|
|
3cbf209d5b | ||
|
|
bee45c4fdc | ||
|
|
61202cb464 | ||
|
|
0091944161 | ||
|
|
78cd857bf6 | ||
|
|
4fe1b4df1c | ||
|
|
2a1235c9db | ||
|
|
4bb41b95a8 | ||
|
|
f78f4854a4 | ||
|
|
ff01dfa03d | ||
|
|
638b204d1e | ||
|
|
58e88c4aed | ||
|
|
8433919342 | ||
|
|
8150b9aeba | ||
|
|
01601fc8a7 | ||
|
|
7b24042d5f | ||
|
|
2177dda242 | ||
|
|
0585c86390 | ||
|
|
528caab47c | ||
|
|
b150df34e0 | ||
|
|
da80c3b309 | ||
|
|
e8804bd80f | ||
|
|
2300886008 | ||
|
|
57ed3c89a2 | ||
|
|
1a284a1c94 | ||
|
|
f12dd51c00 | ||
|
|
e00c1e99d6 | ||
|
|
39323b46ba | ||
|
|
9dff80aeee | ||
|
|
9f7d05bab4 | ||
|
|
53c0a4b568 | ||
|
|
8f460a9be3 | ||
|
|
204b07f46b | ||
|
|
a48a02bade | ||
|
|
2326a1e105 | ||
|
|
c4dc6d9bff | ||
|
|
6213a73e6f | ||
|
|
9c109b744f | ||
|
|
42c1d54b3f | ||
|
|
5e634cd612 | ||
|
|
79c7fe0f7a | ||
|
|
8e86d2cf1d | ||
|
|
4e12a4c013 | ||
|
|
e869cdca9f | ||
|
|
ab565f1a3c | ||
|
|
90cd3bf4cb | ||
|
|
9752ee8819 | ||
|
|
9f1e0660dd | ||
|
|
7c05bb7d1d | ||
|
|
bb0faacf06 | ||
|
|
9ae35ec581 | ||
|
|
b1ca1eb228 | ||
|
|
832502555c | ||
|
|
1176a07c93 | ||
|
|
3770102843 | ||
|
|
cf7c80d42d | ||
|
|
84632571c7 | ||
|
|
af1061e47a | ||
|
|
e1ce0e8467 | ||
|
|
468c475359 | ||
|
|
8902a19bb4 | ||
|
|
f4e72be58f | ||
|
|
c20b5414c4 | ||
|
|
1a0438b3b1 | ||
|
|
da2f85ba4b | ||
|
|
bc65e40313 | ||
|
|
a188c7d791 | ||
|
|
f2cccdd1fb | ||
|
|
6621de709e | ||
|
|
98e9b93b7e | ||
|
|
3aef65597b | ||
|
|
c98e007ff7 | ||
|
|
3350e63004 | ||
|
|
d71b37e292 | ||
|
|
1c7485e58c | ||
|
|
872428de89 | ||
|
|
93441babd8 | ||
|
|
1328285bbc | ||
|
|
9912a4ce98 | ||
|
|
d5186ee663 | ||
|
|
9e2910365a | ||
|
|
3be2571a31 | ||
|
|
6352e95d0f | ||
|
|
b6a72f7d72 | ||
|
|
b923134023 | ||
|
|
6e82fa0dab | ||
|
|
9511bf94d5 | ||
|
|
03983ac24e | ||
|
|
347dbc6237 | ||
|
|
b2a6f3f81c | ||
|
|
5a89f30841 | ||
|
|
244585b82a | ||
|
|
bc727e8d79 | ||
|
|
472589aa14 | ||
|
|
ba9825eca9 | ||
|
|
f4d1a3c33d | ||
|
|
be05f65339 | ||
|
|
dcabe86ea8 | ||
|
|
2a98c323c1 | ||
|
|
be5ed44580 | ||
|
|
93010b71b4 | ||
|
|
62d9a18ec6 | ||
|
|
b0bb65f494 | ||
|
|
09ab634d32 | ||
|
|
bba102c076 | ||
|
|
9719ae096d | ||
|
|
0854188f3c | ||
|
|
0cfcb96e5c | ||
|
|
39bbb7b9cd | ||
|
|
e3d828648e | ||
|
|
ed8f381b5c | ||
|
|
516369d748 | ||
|
|
dff9fd8ae1 | ||
|
|
3f3dc56da5 | ||
|
|
5dbbad5cc4 | ||
|
|
24522f7d74 | ||
|
|
4173b03f54 | ||
|
|
bdd5502aef | ||
|
|
2f301e39d7 | ||
|
|
c75ae828bc | ||
|
|
b0598f64ea | ||
|
|
8721ba7474 | ||
|
|
d7a5b60405 | ||
|
|
4f0d4cee0b | ||
|
|
a0b6892c09 | ||
|
|
359df89fe3 | ||
|
|
dca47a565e | ||
|
|
19922287aa | ||
|
|
5944c91de4 | ||
|
|
350569655b | ||
|
|
092f9ac766 | ||
|
|
dfb65ef1ca | ||
|
|
57ca04444b | ||
|
|
125d88bd65 | ||
|
|
6f2554b13a | ||
|
|
b66ef23167 | ||
|
|
812f641ee3 | ||
|
|
4bd9cccbc9 | ||
|
|
2ebe9ad101 | ||
|
|
fc907e2f81 | ||
|
|
8a02ad48a5 | ||
|
|
c30ec608b1 | ||
|
|
d18e73aa57 | ||
|
|
292668ed43 | ||
|
|
2a6edf00cd | ||
|
|
cbd2c56a1f | ||
|
|
83c54db836 | ||
|
|
abf5f873b6 | ||
|
|
1d1a70c21f | ||
|
|
d59e7b27b0 | ||
|
|
0108695438 | ||
|
|
34b55c3350 | ||
|
|
2fc89a69e3 | ||
|
|
cb70d08573 | ||
|
|
cd69063660 | ||
|
|
0822e67594 | ||
|
|
7e79d9dae6 | ||
|
|
bb84a8cc6c | ||
|
|
2c429f7732 | ||
|
|
4f966f30a5 | ||
|
|
ac123f2371 | ||
|
|
48dadc17f6 | ||
|
|
fb4feea8c3 | ||
|
|
4749669e74 | ||
|
|
6f2749d13d | ||
|
|
e43d3e995f | ||
|
|
c20df72d73 | ||
|
|
b8941666b4 | ||
|
|
4f7ff6db2c | ||
|
|
0045fc36d6 | ||
|
|
44ae01dded | ||
|
|
e48b5945c3 | ||
|
|
194b60191d | ||
|
|
172aede346 | ||
|
|
b85cfa52d0 | ||
|
|
a90760b597 | ||
|
|
3fc0c899c9 | ||
|
|
2e58176ac7 | ||
|
|
54a7c4290a | ||
|
|
4debcdcbbb | ||
|
|
f23d7c5259 | ||
|
|
d009e02c1d | ||
|
|
1b894ad9f6 | ||
|
|
336aa0d9a5 | ||
|
|
c015c0c0cd | ||
|
|
2fa09f7c09 | ||
|
|
47c660f2e1 | ||
|
|
4b7917ba8f | ||
|
|
e2b9f23231 | ||
|
|
78e1144ca5 | ||
|
|
212182f745 | ||
|
|
00c5e07b56 | ||
|
|
6a5f34a6bc | ||
|
|
bd9f137b1b | ||
|
|
34792c15f1 | ||
|
|
69b101adcf | ||
|
|
bd0f74a6fd | ||
|
|
61ff6b8e49 | ||
|
|
65ea600b55 | ||
|
|
c8f2def7c4 | ||
|
|
eba7b8b51e | ||
|
|
f53c4a0716 | ||
|
|
4e3dd3aadc | ||
|
|
476bcfdae3 | ||
|
|
0510d63ee5 | ||
|
|
9a2ce8e1fa | ||
|
|
da540bc449 | ||
|
|
33f344288f | ||
|
|
a8da18cbc4 | ||
|
|
ec334111c9 | ||
|
|
92229ac0f6 | ||
|
|
3a34f2e952 | ||
|
|
3ae0accbe3 | ||
|
|
db740a4eb4 | ||
|
|
a6bf54668a | ||
|
|
029ba1ea44 | ||
|
|
4541606469 | ||
|
|
039bf6ecdb | ||
|
|
04467b82d3 | ||
|
|
a3cfd26125 | ||
|
|
945cd08931 | ||
|
|
afb6684782 | ||
|
|
8c67007926 | ||
|
|
e012efa124 | ||
|
|
468c22de0e | ||
|
|
fe71f70775 | ||
|
|
d90049be28 | ||
|
|
2d67691038 | ||
|
|
e6eba3e484 | ||
|
|
de657fe350 | ||
|
|
fb5b0ffedd | ||
|
|
9f43f92cfa | ||
|
|
5db15b6ec7 | ||
|
|
f1d3aade3b | ||
|
|
0826f77101 | ||
|
|
c92c7beece | ||
|
|
0ba399d8ed | ||
|
|
abdc26a5fc | ||
|
|
306c7dda61 | ||
|
|
a703afeddd | ||
|
|
6585226de7 | ||
|
|
28cc70cf50 | ||
|
|
bbe0a3d58c | ||
|
|
68b6e80b91 | ||
|
|
4b647fdbec | ||
|
|
4a3b03a063 | ||
|
|
06ef8cf9eb | ||
|
|
3b6259edf3 | ||
|
|
7a1ca0bc0c | ||
|
|
ae01e9b98d | ||
|
|
afcbcd231c | ||
|
|
d7151f07bf | ||
|
|
6997367242 | ||
|
|
1e81d4d2a9 | ||
|
|
71943a83e6 | ||
|
|
ca6514c77c | ||
|
|
d27a599ec2 | ||
|
|
e0c0dc7191 | ||
|
|
574be79253 | ||
|
|
209391d01c | ||
|
|
2600c4f4c4 | ||
|
|
2335780618 | ||
|
|
bd11b04c18 | ||
|
|
41260ecd18 | ||
|
|
db4caf0d42 | ||
|
|
197b3ee34d | ||
|
|
bfac22d951 | ||
|
|
d95ffe6302 | ||
|
|
76bb26de83 | ||
|
|
16c7674304 | ||
|
|
f59892f647 | ||
|
|
86642cbdd5 | ||
|
|
882c963398 | ||
|
|
4d61ce4dd7 | ||
|
|
3becf2d801 | ||
|
|
bae23210f4 | ||
|
|
6cda74994b | ||
|
|
160f83cf9e | ||
|
|
3e0a78bc0d | ||
|
|
d51d39ef32 | ||
|
|
70912ec46f | ||
|
|
3c6d687423 | ||
|
|
c3c14ff9ce | ||
|
|
3b0a19efe0 | ||
|
|
cfb549b7ce | ||
|
|
842bb9cba2 | ||
|
|
ca90126cc4 | ||
|
|
10b4b872a2 | ||
|
|
0daff24b16 | ||
|
|
f74771144e | ||
|
|
687b22908f | ||
|
|
0babc4037b | ||
|
|
33832aa887 | ||
|
|
063ac7dce5 | ||
|
|
e490577a7d | ||
|
|
dbad798c92 | ||
|
|
bdc3308271 | ||
|
|
de35ad995e | ||
|
|
8ce74beafa | ||
|
|
7b48e206db | ||
|
|
4b1f89114e | ||
|
|
6e4da63abe | ||
|
|
49929405df | ||
|
|
c0273a09f1 | ||
|
|
56c689d684 | ||
|
|
5ecf48a21d | ||
|
|
bb00c519c3 | ||
|
|
d2b15c0d75 | ||
|
|
5467f2fc1a | ||
|
|
bff37539b9 | ||
|
|
88b992abd6 | ||
|
|
340982e58a | ||
|
|
a23ce8245d | ||
|
|
96046fcaa2 | ||
|
|
d2d7e08145 | ||
|
|
1aa81cd90d | ||
|
|
1167bcef3d | ||
|
|
a9ab385183 | ||
|
|
58fd17867d | ||
|
|
3b684308c3 | ||
|
|
3ee7467d66 | ||
|
|
81f9e0b9e6 | ||
|
|
dbda84ff87 | ||
|
|
b6e19438ea | ||
|
|
85b6d448ce | ||
|
|
7245f90b2d | ||
|
|
ba743d776a | ||
|
|
4a8b254652 | ||
|
|
86296897e5 | ||
|
|
68fa7ec2d0 | ||
|
|
d18ff76912 | ||
|
|
a4a62d9874 | ||
|
|
d9cf78c267 | ||
|
|
84d7234f24 | ||
|
|
5354a44d6a | ||
|
|
610c75a492 | ||
|
|
e914c5f3d2 | ||
|
|
f1d6dd2c8b | ||
|
|
4f2077a4de | ||
|
|
79cd2fbfe0 | ||
|
|
e2b9d4c869 | ||
|
|
07b26525ca | ||
|
|
49ba78767c | ||
|
|
d92a3861c9 | ||
|
|
fea9faaf4c | ||
|
|
b1b459435f | ||
|
|
b7d7fac635 | ||
|
|
a1d3191b89 | ||
|
|
516f264138 | ||
|
|
07416311ce | ||
|
|
ece2a3ccfd | ||
|
|
70126c074f | ||
|
|
adbeb24979 | ||
|
|
b918e7e372 | ||
|
|
b55e64ffa3 | ||
|
|
d09194f05a | ||
|
|
6fbfd69699 | ||
|
|
7b549c6551 | ||
|
|
af0972d6f2 | ||
|
|
020ce32779 | ||
|
|
0b68ccd742 | ||
|
|
fc1a37cced | ||
|
|
7ed1b19d94 | ||
|
|
6dce0c1e03 | ||
|
|
9ca283bb43 | ||
|
|
e1677bb774 | ||
|
|
7eb887edd5 | ||
|
|
122ef023dd | ||
|
|
c51c65325f | ||
|
|
f43234bc30 | ||
|
|
223410eab3 | ||
|
|
dc3309d130 | ||
|
|
d2e1c7955b | ||
|
|
f280758fa7 | ||
|
|
a2d8026810 | ||
|
|
0e2fb5d132 | ||
|
|
df01d4de6f | ||
|
|
ecda693e38 | ||
|
|
6a4712f4c9 | ||
|
|
3b8cabcc81 | ||
|
|
395deef793 | ||
|
|
9f74fba395 | ||
|
|
f96f299377 | ||
|
|
079fe523d4 | ||
|
|
13653a93a2 | ||
|
|
19d472c847 | ||
|
|
d49e0a5fa1 | ||
|
|
e66466cc1a | ||
|
|
69627d8a47 | ||
|
|
f4245c90e8 | ||
|
|
913891905f | ||
|
|
9dc7f25825 | ||
|
|
faa3c867e2 | ||
|
|
756c41719c | ||
|
|
65f4ea1e18 | ||
|
|
3d827342a5 | ||
|
|
ea2a4aa181 | ||
|
|
7626746904 | ||
|
|
fa2f60cdd5 | ||
|
|
21a1134de3 | ||
|
|
3bd725d80b | ||
|
|
da0bb118dc | ||
|
|
ddd5ed1cc2 | ||
|
|
ee6643ce8b | ||
|
|
38f1eb0701 | ||
|
|
87d01c9f4a | ||
|
|
dd72bf5ab6 | ||
|
|
741d35f0b3 | ||
|
|
0e74b0081c | ||
|
|
d264d4e4ba | ||
|
|
534f9cf509 | ||
|
|
d1db1fdd79 | ||
|
|
2a54b9f138 | ||
|
|
b5612b303b | ||
|
|
3436ee9ded | ||
|
|
923e2c5c5d | ||
|
|
bbc95209f0 | ||
|
|
e73da759b9 | ||
|
|
6e8e16d916 | ||
|
|
05ec7232bf | ||
|
|
254a2b779b | ||
|
|
12dde03184 | ||
|
|
e01dde3fa2 | ||
|
|
983bc9bbdc | ||
|
|
dbbde8d858 | ||
|
|
a16a5c209c | ||
|
|
494177773f | ||
|
|
5e26ed1320 | ||
|
|
0f6a4854e3 | ||
|
|
089bce8828 | ||
|
|
da210d75e8 | ||
|
|
6e7c954161 | ||
|
|
248354d549 | ||
|
|
db5a78d5f6 | ||
|
|
b5173afc44 | ||
|
|
f51f303b35 | ||
|
|
c6d42bf0a9 | ||
|
|
7d1439d570 | ||
|
|
81f3a52e89 | ||
|
|
feb7adcd08 | ||
|
|
84be179f7c | ||
|
|
5b4c8449a8 | ||
|
|
8036244eb2 | ||
|
|
6e46883ca7 | ||
|
|
6a69c971d4 | ||
|
|
4a7067a0a2 | ||
|
|
3d5e021dea | ||
|
|
379566f052 | ||
|
|
112741dfde | ||
|
|
8c41ac8b23 | ||
|
|
4aee9094a7 | ||
|
|
1a24d77699 | ||
|
|
e4b054060e | ||
|
|
6510697627 | ||
|
|
0e5955287b | ||
|
|
2fc4a5c564 | ||
|
|
657903c03e | ||
|
|
a381233e40 | ||
|
|
5162ab0bbf | ||
|
|
2b66058a95 | ||
|
|
adbbe2963c | ||
|
|
f96528adde | ||
|
|
ea10dacc92 | ||
|
|
f234456bd0 | ||
|
|
fe88e7bcf4 | ||
|
|
35b249d23e | ||
|
|
db6ac5f51b | ||
|
|
6aa88ae931 | ||
|
|
8a0836c239 | ||
|
|
cbe78efb9c | ||
|
|
7cc2661aa6 | ||
|
|
c3d3d70ced | ||
|
|
8b75f56577 | ||
|
|
9541d268de | ||
|
|
a58adfcaa2 | ||
|
|
2884b759c3 | ||
|
|
70cc0f47bb | ||
|
|
2fac623977 | ||
|
|
7396fae4e2 | ||
|
|
904bf17a51 | ||
|
|
e0e32986c7 | ||
|
|
54730377e2 | ||
|
|
28ecf60267 | ||
|
|
154e049638 | ||
|
|
e80f865974 | ||
|
|
c88625436c | ||
|
|
68aa776217 | ||
|
|
0666f8151a | ||
|
|
1fba2dc20f | ||
|
|
ca4120afec | ||
|
|
2eb09c1fec | ||
|
|
f6f40b5b64 | ||
|
|
bed0227a8f | ||
|
|
9fd6f635cd | ||
|
|
f12ed9904b | ||
|
|
1010bae1a3 | ||
|
|
c09d7cf839 | ||
|
|
f8131f42bc | ||
|
|
175bbdd3c3 | ||
|
|
515172263b | ||
|
|
324784cd6e | ||
|
|
0c951bd012 | ||
|
|
62dab0703d | ||
|
|
fc75a0dea6 | ||
|
|
166c353ddb | ||
|
|
ae90b3deea | ||
|
|
7257094662 | ||
|
|
ecabda3ced | ||
|
|
18794b18b3 | ||
|
|
e70ac2ce82 | ||
|
|
1261560214 | ||
|
|
caa747ba71 | ||
|
|
fad34bb4ab | ||
|
|
dd9e7de689 | ||
|
|
d975ab19db | ||
|
|
41c9896e11 | ||
|
|
7a4084a23f | ||
|
|
6be0a4653f | ||
|
|
08961dc3ce | ||
|
|
274b139aa8 | ||
|
|
5a51ea3957 | ||
|
|
ed9981c9c6 | ||
|
|
3ce9f07171 | ||
|
|
adc4e9b23c | ||
|
|
a9ca6c8a07 | ||
|
|
a432247053 | ||
|
|
d19f939e7d | ||
|
|
ea84c6dc3c | ||
|
|
ca2a3f69ff | ||
|
|
1b3d46d92c | ||
|
|
0b1fc17636 | ||
|
|
26f53dbcd8 | ||
|
|
320e0460e0 | ||
|
|
97cb54de2e | ||
|
|
3050d5a1a4 | ||
|
|
7005f4c43c | ||
|
|
2961b7c8ca | ||
|
|
cb639afb57 | ||
|
|
64d35e1dbf | ||
|
|
c895f10bbf | ||
|
|
24d1479ea8 | ||
|
|
3731376943 | ||
|
|
75d2ee53b0 | ||
|
|
1e9e42618b | ||
|
|
cabe773a4f |
14
.dockerignore
Normal file
14
.dockerignore
Normal file
@@ -0,0 +1,14 @@
|
||||
node_modules
|
||||
**/node_modules
|
||||
src/javascript/jsc/WebKit/LayoutTests
|
||||
zig-out
|
||||
zig-build
|
||||
**/*.o
|
||||
**/*.a
|
||||
|
||||
examples
|
||||
|
||||
**/.next
|
||||
.git
|
||||
src/javascript/jsc/WebKit/WebKitBuild
|
||||
**/CMakeCache.txt
|
||||
37
.github/workflows/bun-framework-next.yml
vendored
Normal file
37
.github/workflows/bun-framework-next.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI workflow for bun-framework-next
|
||||
on:
|
||||
push:
|
||||
branches: [main, bun-framework-next-actions]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: lint, test and build on Node ${{ matrix.node }} and ${{ matrix.os }}
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node: ["14.x"]
|
||||
os: [macOS-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node ${{ matrix.node }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Install PNPM
|
||||
uses: pnpm/action-setup@v2.0.1
|
||||
with:
|
||||
version: 6.21.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd packages/bun-framework-next && pnpm install
|
||||
|
||||
- name: Type check bun-framework-next
|
||||
run: cd packages/bun-framework-next && pnpm check
|
||||
42
.gitignore
vendored
42
.gitignore
vendored
@@ -6,7 +6,6 @@ zig-cache
|
||||
*.a
|
||||
profile.json
|
||||
|
||||
/package.json
|
||||
node_modules
|
||||
.swcrc
|
||||
yarn.lock
|
||||
@@ -31,16 +30,51 @@ cover
|
||||
coverage
|
||||
coverv
|
||||
*.trace
|
||||
bench
|
||||
github
|
||||
out.*
|
||||
out
|
||||
.parcel-cache
|
||||
esbuilddir
|
||||
*.jsb
|
||||
*.bun
|
||||
parceldist
|
||||
esbuilddir
|
||||
outdir/
|
||||
outcss
|
||||
.next
|
||||
txt.js
|
||||
txt.js
|
||||
.idea
|
||||
.vscode/cpp*
|
||||
|
||||
node_modules_*
|
||||
*.jsb
|
||||
*.zip
|
||||
bun-zigld
|
||||
bun-singlehtreaded
|
||||
bun-nomimalloc
|
||||
bun-mimalloc
|
||||
examples/lotta-modules/bun-yday
|
||||
examples/lotta-modules/bun-old
|
||||
examples/lotta-modules/bun-nofscache
|
||||
|
||||
src/node-fallbacks/out/*
|
||||
src/node-fallbacks/node_modules
|
||||
sign.json
|
||||
release/
|
||||
*.dmg
|
||||
sign.*.json
|
||||
packages/debug-*
|
||||
packages/bun-cli/postinstall.js
|
||||
packages/bun-*/bun
|
||||
packages/bun-*/bun-profile
|
||||
packages/bun-*/debug-bun
|
||||
packages/bun-*/*.o
|
||||
packages/bun-cli/postinstall.js
|
||||
|
||||
packages/bun-cli/bin/*
|
||||
bun-test-scratch
|
||||
misctools/fetch
|
||||
|
||||
src/deps/libiconv
|
||||
src/deps/openssl
|
||||
src/tests.zig
|
||||
*.blob
|
||||
23
.gitmodules
vendored
23
.gitmodules
vendored
@@ -3,4 +3,25 @@
|
||||
# url = https://github.com/Hejsil/zig-clap
|
||||
[submodule "src/deps/picohttpparser"]
|
||||
path = src/deps/picohttpparser
|
||||
url = https://github.com/h2o/picohttpparser/
|
||||
url = https://github.com/h2o/picohttpparser.git
|
||||
ignore = dirty
|
||||
[submodule "src/javascript/jsc/WebKit"]
|
||||
path = src/javascript/jsc/WebKit
|
||||
url = https://github.com/Jarred-Sumner/WebKit.git
|
||||
ignore = dirty
|
||||
[submodule "src/deps/mimalloc"]
|
||||
path = src/deps/mimalloc
|
||||
url = https://github.com/microsoft/mimalloc.git
|
||||
ignore = dirty
|
||||
[submodule "src/deps/zlib"]
|
||||
path = src/deps/zlib
|
||||
url = https://github.com/cloudflare/zlib.git
|
||||
ignore = dirty
|
||||
[submodule "src/deps/libarchive"]
|
||||
path = src/deps/libarchive
|
||||
url = https://github.com/libarchive/libarchive.git
|
||||
ignore = dirty
|
||||
[submodule "src/deps/s2n-tls"]
|
||||
path = src/deps/s2n-tls
|
||||
url = https://github.com/Jarred-Sumner/s2n-tls
|
||||
ignore = dirty
|
||||
|
||||
48
.vscode/c_cpp_properties.json
vendored
Normal file
48
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"forcedInclude": [
|
||||
"${workspaceFolder}/src/javascript/jsc/bindings/root.h"
|
||||
],
|
||||
"includePath": [
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/WTF/Headers",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/*",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/bindings/",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/Source/bmalloc/",
|
||||
"${workspaceFolder}/src/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers/"
|
||||
],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}/src/javascript/jsc/bindings/*",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/WTF/Headers/**",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/WebKitBuild/Release/*",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/bindings/**",
|
||||
"${workspaceFolder}/src/JavaScript/jsc/WebKit/Source/bmalloc/**",
|
||||
"${workspaceFolder}/src/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers/"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ".vscode/cppdb"
|
||||
},
|
||||
"defines": [
|
||||
"STATICALLY_LINKED_WITH_JavaScriptCore=1",
|
||||
"STATICALLY_LINKED_WITH_WTF=1",
|
||||
"BUILDING_WITH_CMAKE=1",
|
||||
"NOMINMAX",
|
||||
"ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS=0",
|
||||
"BUILDING_JSCONLY__",
|
||||
"USE_FOUNDATION=1",
|
||||
"ASSERT_ENABLED=0",
|
||||
"DU_DISABLE_RENAMING=1"
|
||||
],
|
||||
"macFrameworkPath": [],
|
||||
"compilerPath": "/usr/local/opt/llvm/bin/clang",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "macos-clang-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
435
.vscode/launch.json
vendored
435
.vscode/launch.json
vendored
@@ -1,28 +1,87 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
// {
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Test",
|
||||
// "program": "${workspaceFolder}/zig-out/bin/test",
|
||||
// "preLaunchTask": "test",
|
||||
// "args": ["/usr/local/bin/zig"],
|
||||
// "cwd": "${workspaceFolder}",
|
||||
// "console": "internalConsole"
|
||||
// },
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Eval Small TEst",
|
||||
"name": "fetch debug",
|
||||
"program": "${workspaceFolder}/misctools/fetch",
|
||||
"args": ["https://api.github.com/repos/hanford/trends/tarball"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "bun create debug",
|
||||
"program": "bun-debug",
|
||||
"args": ["create", "hanford/trends", "foo"],
|
||||
"cwd": "/tmp/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "bun run debug",
|
||||
"program": "bun-debug",
|
||||
"args": ["paoskdpoasdk"],
|
||||
"cwd": "/tmp/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "bun a debug",
|
||||
"program": "bun-debug",
|
||||
"args": ["create", "https://github.com/ahfarmer/calculator", "--force"],
|
||||
"cwd": "/tmp/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "bun routes",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/integration/apps/routing",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Eval Error",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/spjs",
|
||||
"args": [
|
||||
"./quoted-escape.js",
|
||||
"error.js",
|
||||
"--resolve=dev",
|
||||
"--outdir=outcss"
|
||||
// "--public-url=https://localhost:9000/"
|
||||
// "--origin=https://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": ".bun",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"./examples/hello-next/node_modules.server.bun"
|
||||
// "--origin=https://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Discord",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"discord"
|
||||
// "--origin=https://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
@@ -31,12 +90,10 @@
|
||||
"name": "Eval",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/spjs",
|
||||
"args": [
|
||||
"src/index.tsx",
|
||||
"--resolve=dev",
|
||||
"--outdir=outcss"
|
||||
// "--public-url=https://localhost:9000/"
|
||||
"./src/index.tsx"
|
||||
// "--origin=https://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/css-stress-test",
|
||||
"cwd": "${workspaceFolder}/examples/css-stress-test",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
@@ -44,43 +101,67 @@
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Dev Launch",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"./simple.css",
|
||||
"--resolve=dev",
|
||||
"--outdir=outcss",
|
||||
"--public-url=https://localhost:9000/"
|
||||
"--origin=https://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Linux Launch",
|
||||
"program": "${workspaceFolder}/packages/debug-bun-cli-linux-x64/bin/bun-debug",
|
||||
"args": ["--origin=http://jarred-desktop.local:3000/"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Release Serve",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/bun",
|
||||
// "args": ["--serve", "--origin=http://localhost:3000"],
|
||||
"args": ["dev", "--origin=http://localhost:3000"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Serve",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"args": [
|
||||
"./src/index.tsx",
|
||||
"--resolve=lazy",
|
||||
"--outdir=public",
|
||||
"--serve",
|
||||
"--public-url=http://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/simple-react",
|
||||
"program": "bun-debug",
|
||||
// "args": ["--serve", "--origin=http://localhost:3000"],
|
||||
"args": ["dev", "--origin=http://localhost:3000"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Serve aarch64",
|
||||
"program": "${workspaceFolder}/build/macos-aarch64/bun",
|
||||
// "args": ["--serve", "--origin=http://localhost:3000"],
|
||||
"args": ["dev", "--origin=http://ci.local:3000"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Lazy Build",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"./src/index.tsx",
|
||||
"--resolve=lazy",
|
||||
"--public-url=http://localhost:9000/"
|
||||
"--origin=http://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/simple-react",
|
||||
"cwd": "${workspaceFolder}/examples/simple-react",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
@@ -88,52 +169,260 @@
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Build",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"./src/index.tsx",
|
||||
"--resolve=dev",
|
||||
"--outdir=outcss",
|
||||
"--platform=browser",
|
||||
"--public-url=http://localhost:9000/"
|
||||
"--origin=http://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/css-stress-test",
|
||||
"cwd": "${workspaceFolder}/examples/css-stress-test",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Dazzle serve",
|
||||
"program": "bun-debug",
|
||||
"args": ["--origin=http://localhost:5000", "--disable-hmr"],
|
||||
"cwd": "/Users/jarred/Build/lattice/apps/dazzle",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Bun",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "--use=next"],
|
||||
"cwd": "/Users/jarred/Build/lattice/apps/dazzle",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unicode check",
|
||||
"args": ["--disable-hmr"],
|
||||
"program": "bun-debug",
|
||||
"cwd": "/Users/jarred/Build/app994",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo .jsb",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"args": [
|
||||
"./src/index.tsx",
|
||||
"--resolve=lazy",
|
||||
"--public-url=http://localhost:9000/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/simple-react",
|
||||
"name": "Demo .bun",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "--use=bun-framework-next"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "PNPM .bun",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "./pages/index.js"],
|
||||
"cwd": "/Users/jarred/Build/pnpm-bun/packages/app",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Build .jsb",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"args": [
|
||||
"./src/index.tsx",
|
||||
"--public-url=http://localhost:9000/",
|
||||
"--new-jsb"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/demos/simple-react",
|
||||
"name": "PNPM serve",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "/Users/jarred/Build/pnpm-bun/packages/app",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Print .jsb",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"args": ["./node_modules.jsb"],
|
||||
"cwd": "${workspaceFolder}/demos/simple-react",
|
||||
"name": "Mixed case resolve",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"build",
|
||||
"./index.js",
|
||||
"--origin=http://localhost:9000/",
|
||||
// "--use=./bun-framework-next",
|
||||
"--platform=browser"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/examples/lotta-modules/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Build .bun lotta-modules",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "./index.js", "--platform=browser"],
|
||||
"cwd": "${workspaceFolder}/examples/lotta-modules/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Dev CRA",
|
||||
"program": "bun-debug",
|
||||
"args": ["dev", "--platform=browser"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-create-react-app/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Fragment",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Context Bun Bug",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "./code.js"],
|
||||
"cwd": "/Users/jarred/Build/context/www",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Context Bun",
|
||||
"program": "bun-debug",
|
||||
"args": ["bun", "--use=next"],
|
||||
"cwd": "/Users/jarred/Build/context/www",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Bun-hello",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/packages/bun-hello",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Integration Test Dev",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/integration/snippets",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Integration Test Dev (no hmr)",
|
||||
"program": "bun-debug",
|
||||
"args": ["--disable-hmr"],
|
||||
"cwd": "${workspaceFolder}/integration/snippets",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Fixtures Dev",
|
||||
"program": "a",
|
||||
"args": ["dev"],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"name": "Fixtures Rel",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/bun",
|
||||
"args": ["dev"],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
|
||||
"request": "launch",
|
||||
"name": "Context Dev",
|
||||
"program": "bun-debug",
|
||||
"args": [],
|
||||
"cwd": "/Users/jarred/Build/context/www",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Context Rel",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/bun",
|
||||
"args": [],
|
||||
"cwd": "/Users/jarred/Build/context/www",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug Dev",
|
||||
"program": "bun-debug",
|
||||
"args": ["dev"],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Type-only import",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"bun",
|
||||
"./src/test/fixtures/type-only-import.ts",
|
||||
"--external=react"
|
||||
],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Dev lotta-modules",
|
||||
"program": "bun-debug",
|
||||
"args": ["dev", "./index.js", "--platform=browser"],
|
||||
"cwd": "${workspaceFolder}/examples/lotta-modules/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Build .bun",
|
||||
"program": "bun-debug",
|
||||
"args": [
|
||||
"bun",
|
||||
// "./index.js",
|
||||
"--origin=http://localhost:9000/",
|
||||
"--use=./bun-framework-next",
|
||||
"--platform=browser"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/examples/hello-next/",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "PNPM Resolve symlink",
|
||||
"program": "bun-debug",
|
||||
"args": ["--resolve=dev", "test-pnpm.js", "--platform=browser"],
|
||||
"cwd": "${workspaceFolder}/examples/css-stress-test",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Demo Print .bun",
|
||||
"program": "bun-debug",
|
||||
"args": ["./node_modules.bun"],
|
||||
"cwd": "${workspaceFolder}/examples/simple-react",
|
||||
"console": "internalConsole"
|
||||
},
|
||||
|
||||
@@ -141,7 +430,7 @@
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "DAev Launch",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/esdev",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/bun",
|
||||
"args": ["./simple.jsx", "--resolve=disable"],
|
||||
"cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
"console": "internalConsole"
|
||||
@@ -152,7 +441,7 @@
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "/Users/jarred/Code/esbuild/cmd/esbuild",
|
||||
"cwd": "/Users/jarred/Code/esdev/src/test/fixtures",
|
||||
"cwd": "/Users/jarred/Code/bun/src/test/fixtures",
|
||||
"args": ["--bundle", "--outfile=out.esbuild.js", "await.ts"]
|
||||
},
|
||||
|
||||
@@ -160,7 +449,7 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch (other)",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
// "args": ["./simple.jsx", "--resolve=disable"],
|
||||
// "cwd": "${workspaceFolder}/src/test/fixtures",
|
||||
// "console": "internalConsole"
|
||||
@@ -169,12 +458,12 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
// "preLaunchTask": "build",
|
||||
// "args": [
|
||||
// "--resolve=disable",
|
||||
// "--cwd",
|
||||
// "/Users/jarredsumner/Code/esdev/src/test/fixtures",
|
||||
// "/Users/jarredsumner/Code/bun/src/test/fixtures",
|
||||
// "escape-chars.js"
|
||||
// ],
|
||||
// "cwd": "${workspaceFolder}",
|
||||
@@ -184,7 +473,7 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
// "preLaunchTask": "build",
|
||||
// "args": [
|
||||
// "--resolve=dev",
|
||||
@@ -201,7 +490,7 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
// "preLaunchTask": "build",
|
||||
// "args": [
|
||||
// "--resolve=dev",
|
||||
@@ -218,7 +507,7 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
// // "preLaunchTask": "build",
|
||||
// "args": [
|
||||
// "--resolve=dev",
|
||||
@@ -227,7 +516,7 @@
|
||||
// "pages/index.jsx",
|
||||
// "-o",
|
||||
// "out",
|
||||
// "--public-url=https://hello.com/",
|
||||
// "--origin=https://hello.com/",
|
||||
// "--serve"
|
||||
// ],
|
||||
// "cwd": "${workspaceFolder}",
|
||||
@@ -237,8 +526,8 @@
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Rome",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
"program": "${workspaceFolder}/build/macos-x86_64/bun",
|
||||
// "preLaunchTask": "build",
|
||||
"args": [
|
||||
"--resolve=dev",
|
||||
@@ -250,7 +539,7 @@
|
||||
// "@romejs/js-analysis/evaluators/modules/ImportCall.ts",
|
||||
"--outdir=${workspaceFolder}/bench/rome/src/out",
|
||||
// "@romejs/cli-diagnostics/banners/success.json",
|
||||
"--public-url=https://hello.com/"
|
||||
"--origin=https://hello.com/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/bench/rome/src",
|
||||
"console": "internalConsole"
|
||||
@@ -259,8 +548,8 @@
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Rome Dev",
|
||||
// "program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
"program": "${workspaceFolder}/build/debug/macos-x86_64/esdev",
|
||||
// "program": "bun-debug",
|
||||
"program": "bun-debug",
|
||||
// "preLaunchTask": "build",
|
||||
"args": [
|
||||
"--resolve=dev",
|
||||
@@ -272,7 +561,7 @@
|
||||
// "@romejs/js-analysis/evaluators/modules/ImportCall.ts",
|
||||
"--outdir=${workspaceFolder}/bench/rome/src/out",
|
||||
// "@romejs/cli-diagnostics/banners/success.json",
|
||||
"--public-url=https://hello.com/"
|
||||
"--origin=https://hello.com/"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/bench/rome/src",
|
||||
"console": "internalConsole"
|
||||
@@ -281,13 +570,13 @@
|
||||
// "type": "lldb",
|
||||
// "request": "launch",
|
||||
// "name": "Dev Launch",
|
||||
// "program": "${workspaceFolder}/build/bin/debug/esdev",
|
||||
// "program": "${workspaceFolder}/build/bin/debug/bun",
|
||||
// "preLaunchTask": "build",
|
||||
// "args": [
|
||||
// "--resolve=dev",
|
||||
// "--cwd",
|
||||
// "/",
|
||||
// "/Users/jarredsumner/Code/esdev/src/test/fixtures/img-bug.js",
|
||||
// "/Users/jarredsumner/Code/bun/src/test/fixtures/img-bug.js",
|
||||
// "-o",
|
||||
// "out"
|
||||
// ],
|
||||
|
||||
147
.vscode/settings.json
vendored
Normal file
147
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"git.autoRepositoryDetection": "openEditors",
|
||||
"search.quickOpen.includeSymbols": false,
|
||||
"search.seedWithNearestWord": true,
|
||||
"search.smartCase": true,
|
||||
"search.exclude": {},
|
||||
"search.followSymlinks": false,
|
||||
"search.useIgnoreFiles": true,
|
||||
"zig.buildOnSave": false,
|
||||
"[zig]": {
|
||||
"editor.defaultFormatter": "tiehuis.zig"
|
||||
},
|
||||
"lldb.verboseLogging": true,
|
||||
"zig.beforeDebugCmd": "make build-unit ${file} ${filter} ${bin}",
|
||||
"zig.testCmd": "make test ${file} ${filter} ${bin}",
|
||||
"files.exclude": {
|
||||
"**/.git": true,
|
||||
"**/.svn": true,
|
||||
"**/.hg": true,
|
||||
"**/CVS": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/Thumbs.db": true,
|
||||
"**/*.xcworkspacedata": true,
|
||||
"**/*.xcscheme": true,
|
||||
"**/*.pem": true,
|
||||
"**/*.xcodeproj": true,
|
||||
|
||||
"integration/snapshots": true,
|
||||
"integration/snapshots-no-hmr": true,
|
||||
"src/javascript/jsc/WebKit": true,
|
||||
"src/deps/libarchive": true,
|
||||
"src/deps/mimalloc": true,
|
||||
"src/deps/s2n-tls": true,
|
||||
"src/deps/openssl": true,
|
||||
"src/deps/zlib": true,
|
||||
"integration/snippets/package-json-exports/_node_modules_copy": true
|
||||
},
|
||||
"C_Cpp.files.exclude": {
|
||||
"**/.vscode": true,
|
||||
"src/javascript/jsc/WebKit/JSTests": true,
|
||||
"src/javascript/jsc/WebKit/Tools": true,
|
||||
"src/javascript/jsc/WebKit/WebDriverTests": true,
|
||||
"src/javascript/jsc/WebKit/WebKit.xcworkspace": true,
|
||||
"src/javascript/jsc/WebKit/WebKitLibraries": true,
|
||||
"src/javascript/jsc/WebKit/Websites": true,
|
||||
"src/javascript/jsc/WebKit/resources": true,
|
||||
"src/javascript/jsc/WebKit/LayoutTests": true,
|
||||
"src/javascript/jsc/WebKit/ManualTests": true,
|
||||
"src/javascript/jsc/WebKit/PerformanceTests": true,
|
||||
"src/javascript/jsc/WebKit/WebKitLegacy": true,
|
||||
"src/javascript/jsc/WebKit/WebCore": true,
|
||||
"src/javascript/jsc/WebKit/WebDriver": true,
|
||||
"src/javascript/jsc/WebKit/WebKitBuild": true,
|
||||
"src/javascript/jsc/WebKit/WebInspectorUI": true
|
||||
},
|
||||
"[cpp]": {
|
||||
"editor.defaultFormatter": "xaver.clang-format"
|
||||
},
|
||||
"[h]": {
|
||||
"editor.defaultFormatter": "xaver.clang-format"
|
||||
},
|
||||
"[c]": {
|
||||
"editor.defaultFormatter": "xaver.clang-format"
|
||||
},
|
||||
"files.associations": {
|
||||
"*.idl": "cpp",
|
||||
"memory": "cpp",
|
||||
"iostream": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"random": "cpp",
|
||||
"ios": "cpp",
|
||||
"filesystem": "cpp",
|
||||
"__locale": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"__mutex_base": "cpp",
|
||||
"__string": "cpp",
|
||||
"string": "cpp",
|
||||
"string_view": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"__config": "cpp",
|
||||
"__nullptr": "cpp",
|
||||
"exception": "cpp",
|
||||
"__bit_reference": "cpp",
|
||||
"atomic": "cpp",
|
||||
"utility": "cpp",
|
||||
"sstream": "cpp",
|
||||
"__functional_base": "cpp",
|
||||
"new": "cpp",
|
||||
"__debug": "cpp",
|
||||
"__errc": "cpp",
|
||||
"__hash_table": "cpp",
|
||||
"__node_handle": "cpp",
|
||||
"__split_buffer": "cpp",
|
||||
"__threading_support": "cpp",
|
||||
"__tuple": "cpp",
|
||||
"array": "cpp",
|
||||
"bit": "cpp",
|
||||
"bitset": "cpp",
|
||||
"cctype": "cpp",
|
||||
"chrono": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"complex": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"deque": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"istream": "cpp",
|
||||
"iterator": "cpp",
|
||||
"limits": "cpp",
|
||||
"locale": "cpp",
|
||||
"mutex": "cpp",
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"ratio": "cpp",
|
||||
"stack": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"system_error": "cpp",
|
||||
"thread": "cpp",
|
||||
"tuple": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"vector": "cpp",
|
||||
"__bits": "cpp",
|
||||
"__tree": "cpp",
|
||||
"map": "cpp",
|
||||
"numeric": "cpp",
|
||||
"set": "cpp",
|
||||
"__memory": "cpp",
|
||||
"memory_resource": "cpp"
|
||||
},
|
||||
"go.logging.level": "off",
|
||||
"cmake.configureOnOpen": false
|
||||
}
|
||||
52
Dockerfile-zig
Normal file
52
Dockerfile-zig
Normal file
@@ -0,0 +1,52 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y wget gnupg2 curl lsb-release wget software-properties-common
|
||||
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||
|
||||
RUN wget https://apt.llvm.org/llvm.sh --no-check-certificate
|
||||
RUN chmod +x llvm.sh
|
||||
RUN ./llvm.sh 12
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg2 \
|
||||
software-properties-common \
|
||||
cmake \
|
||||
build-essential \
|
||||
git \
|
||||
libssl-dev \
|
||||
ruby \
|
||||
liblld-12-dev \
|
||||
libclang-12-dev \
|
||||
nodejs \
|
||||
gcc \
|
||||
g++ \
|
||||
npm \
|
||||
clang-12 \
|
||||
clang-format-12 \
|
||||
libc++-12-dev \
|
||||
libc++abi-12-dev \
|
||||
lld-12 \
|
||||
libicu-dev
|
||||
|
||||
RUN update-alternatives --install /usr/bin/ld ld /usr/bin/lld-12 90 && \
|
||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-12 90 && \
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-12 90 && \
|
||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-12 90
|
||||
|
||||
|
||||
ENV CC=clang-12
|
||||
ENV CXX=clang++-12
|
||||
|
||||
# Compile zig
|
||||
RUN mkdir -p /home/ubuntu/zig; cd /home/ubuntu; git clone https://github.com/jarred-sumner/zig.git; cd /home/ubuntu/zig && git checkout jarred/zig-sloppy-with-small-structs && cmake . -DCMAKE_BUILD_TYPE=Release && make -j$(nproc)
|
||||
|
||||
ENV PATH="/home/ubuntu/zig:$PATH"
|
||||
|
||||
RUN npm install -g esbuild
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
900
Makefile
900
Makefile
@@ -1,92 +1,858 @@
|
||||
SHELL := /bin/bash # Use bash syntax to be consistent
|
||||
|
||||
OS_NAME := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH_NAME_RAW := $(shell uname -m)
|
||||
BUN_AUTO_UPDATER_REPO = Jarred-Sumner/bun-releases-for-updater
|
||||
|
||||
make-lazy = $(eval $1 = $$(eval $1 := $(value $(1)))$$($1))
|
||||
|
||||
MARCH_NATIVE =
|
||||
|
||||
ARCH_NAME :=
|
||||
ifeq ($(ARCH_NAME_RAW),arm64)
|
||||
ARCH_NAME = aarch64
|
||||
BREW_PREFIX_PATH = /opt/homebrew
|
||||
else
|
||||
ARCH_NAME = x64
|
||||
BREW_PREFIX_PATH = /usr/local
|
||||
MARCH_NATIVE = -march=native
|
||||
endif
|
||||
|
||||
TRIPLET = $(OS_NAME)-$(ARCH_NAME)
|
||||
PACKAGE_NAME = bun-$(TRIPLET)
|
||||
PACKAGES_REALPATH = $(realpath packages)
|
||||
PACKAGE_DIR = $(PACKAGES_REALPATH)/$(PACKAGE_NAME)
|
||||
DEBUG_PACKAGE_DIR = $(PACKAGES_REALPATH)/debug-$(PACKAGE_NAME)
|
||||
RELEASE_BUN = $(PACKAGE_DIR)/bun
|
||||
DEBUG_BIN = $(DEBUG_PACKAGE_DIR)/
|
||||
DEBUG_BUN = $(DEBUG_BIN)/bun-debug
|
||||
BUILD_ID = $(shell cat ./build-id)
|
||||
PACKAGE_JSON_VERSION = 0.0.$(BUILD_ID)
|
||||
BUN_BUILD_TAG = bun-v$(PACKAGE_JSON_VERSION)
|
||||
BUN_RELEASE_BIN = $(PACKAGE_DIR)/bun
|
||||
PRETTIER ?= $(shell which prettier || echo "./node_modules/.bin/prettier")
|
||||
|
||||
NPM_CLIENT = $(shell which npm)
|
||||
ZIG ?= $(shell which zig || echo -e "error: Missing zig. Please make sure zig is in PATH. Or set ZIG=/path/to-zig-executable")
|
||||
|
||||
# We must use the same compiler version for the JavaScriptCore bindings and JavaScriptCore
|
||||
# If we don't do this, strange memory allocation failures occur.
|
||||
# This is easier to happen than you'd expect.
|
||||
CC = $(shell which clang-12 || which clang)
|
||||
CXX = $(shell which clang++-12 || which clang++)
|
||||
|
||||
# macOS sed is different
|
||||
SED = $(shell which gsed || which sed)
|
||||
|
||||
DEPS_DIR = $(shell pwd)/src/deps
|
||||
CPUS ?= $(shell nproc)
|
||||
USER ?= $(echo $USER)
|
||||
|
||||
OPENSSL_VERSION = OpenSSL_1_1_1l
|
||||
LIBICONV_PATH ?= $(BREW_PREFIX_PATH)/opt/libiconv/lib/libiconv.a
|
||||
|
||||
OPENSSL_LINUX_DIR = $(DEPS_DIR)/openssl/openssl-OpenSSL_1_1_1l
|
||||
|
||||
LIBCRYPTO_PREFIX_DIR = $(BREW_PREFIX_PATH)/opt/openssl@1.1
|
||||
LIBCRYPTO_STATIC_LIB ?= $(LIBCRYPTO_PREFIX_DIR)/lib/libcrypto.a
|
||||
LIBCRYPTO_INCLUDE_DIR = $(LIBCRYPTO_PREFIX_DIR)/include
|
||||
|
||||
ifeq ($(OS_NAME),linux)
|
||||
LIBCRYPTO_STATIC_LIB =
|
||||
LIBICONV_PATH = $(DEPS_DIR)/libiconv.a
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# Linux needs to have libcrypto 1.1.1 installed
|
||||
# download-openssl-linux:
|
||||
# mkdir -p $(DEPS_DIR)/openssl
|
||||
# wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1l.zip
|
||||
# unzip -o OpenSSL_1_1_1l.zip -d $(DEPS_DIR)/openssl
|
||||
# rm OpenSSL_1_1_1l.zip
|
||||
|
||||
# build-openssl-linux:
|
||||
# cd $(OPENSSL_LINUX_DIR); \
|
||||
# ./config -d -fPIC \
|
||||
# no-md2 no-rc5 no-rfc3779 no-sctp no-ssl-trace no-zlib \
|
||||
# no-hw no-mdc2 no-seed no-idea enable-ec_nistp_64_gcc_128 no-camellia \
|
||||
# no-bf no-ripemd no-dsa no-ssl2 no-ssl3 no-capieng \
|
||||
# -DSSL_FORBID_ENULL -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_HEARTBEATS; \
|
||||
# make -j $(CPUS) depend; \
|
||||
# make -j $(CPUS); \
|
||||
# make -j $(CPUS) install_sw; \
|
||||
# cp libcrypto.a $(DEPS_DIR)/libcrypto.a
|
||||
|
||||
build-iconv-linux:
|
||||
cd src/deps/libiconv/libiconv-1.16; ./configure --enable-static; make -j 12; cp ./lib/.libs/libiconv.a $(DEPS_DIR)/libiconv.a
|
||||
|
||||
BUN_TMP_DIR := /tmp/make-bun
|
||||
BUN_DEPLOY_DIR = /tmp/bun-v$(PACKAGE_JSON_VERSION)/$(PACKAGE_NAME)
|
||||
|
||||
DEFAULT_USE_BMALLOC := 1
|
||||
# ifeq ($(OS_NAME),linux)
|
||||
# DEFAULT_USE_BMALLOC = 0
|
||||
# endif
|
||||
|
||||
USE_BMALLOC ?= DEFAULT_USE_BMALLOC
|
||||
|
||||
JSC_BASE_DIR ?= ${HOME}/webkit-build
|
||||
|
||||
DEFAULT_JSC_LIB :=
|
||||
|
||||
ifeq ($(OS_NAME),linux)
|
||||
DEFAULT_JSC_LIB = $(JSC_BASE_DIR)/lib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
DEFAULT_JSC_LIB = src/deps
|
||||
endif
|
||||
|
||||
JSC_LIB ?= $(DEFAULT_JSC_LIB)
|
||||
|
||||
JSC_INCLUDE_DIR ?= $(JSC_BASE_DIR)/include
|
||||
ZLIB_INCLUDE_DIR ?= $(DEPS_DIR)/zlib
|
||||
ZLIB_LIB_DIR ?= $(DEPS_DIR)/zlib
|
||||
|
||||
JSC_FILES := $(JSC_LIB)/libJavaScriptCore.a $(JSC_LIB)/libWTF.a $(JSC_LIB)/libbmalloc.a
|
||||
|
||||
DEFAULT_LINKER_FLAGS =
|
||||
|
||||
JSC_BUILD_STEPS :=
|
||||
ifeq ($(OS_NAME),linux)
|
||||
JSC_BUILD_STEPS += jsc-check
|
||||
DEFAULT_LINKER_FLAGS= -lcrypto -pthread -ldl
|
||||
endif
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
JSC_BUILD_STEPS += jsc-build-mac jsc-copy-headers
|
||||
endif
|
||||
|
||||
|
||||
STRIP ?= $(shell which llvm-strip || which llvm-strip-12 || echo "Missing llvm-strip. Please pass it in the STRIP environment var"; exit 1;)
|
||||
|
||||
HOMEBREW_PREFIX ?= $(BREW_PREFIX_PATH)
|
||||
|
||||
s2n-ubuntu-deps:
|
||||
# https://github.com/aws/s2n-tls/blob/main/codebuild/spec/buildspec_ubuntu.yml#L50
|
||||
sudo apt-get install -y --no-install-recommends indent \
|
||||
iproute2 \
|
||||
kwstyle \
|
||||
lcov \
|
||||
libssl-dev \
|
||||
m4 \
|
||||
make \
|
||||
net-tools \
|
||||
nettle-bin \
|
||||
nettle-dev \
|
||||
pkg-config \
|
||||
psmisc \
|
||||
python3-pip \
|
||||
shellcheck \
|
||||
sudo \
|
||||
tcpdump \
|
||||
unzip \
|
||||
valgrind \
|
||||
zlib1g-dev \
|
||||
zlib \
|
||||
cmake \
|
||||
tox \
|
||||
libtool \
|
||||
ninja-build
|
||||
|
||||
s2n-linux:
|
||||
cd $(DEPS_DIR)/s2n-tls; \
|
||||
make clean; \
|
||||
rm -rf build; \
|
||||
CC=$(CC) CXX=$(CXX) cmake . -Bbuild -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBENCHMARK=0; \
|
||||
CC=$(CC) CXX=$(CXX) cmake --build ./build -j$(CPUS); \
|
||||
CC=$(CC) CXX=$(CXX) CTEST_PARALLEL_LEVEL=$(CPUS) ninja -C build;
|
||||
cp $(DEPS_DIR)/s2n-tls/build/lib/libs2n.a $(DEPS_DIR)/libs2n.a
|
||||
|
||||
s2n-linux-debug:
|
||||
# https://github.com/aws/s2n-tls/blob/main/codebuild/spec/buildspec_ubuntu.yml#L50
|
||||
sudo apt-get install -y --no-install-recommends indent \
|
||||
iproute2 \
|
||||
kwstyle \
|
||||
lcov \
|
||||
libssl-dev \
|
||||
m4 \
|
||||
make \
|
||||
net-tools \
|
||||
nettle-bin \
|
||||
nettle-dev \
|
||||
pkg-config \
|
||||
psmisc \
|
||||
python3-pip \
|
||||
shellcheck \
|
||||
sudo \
|
||||
tcpdump \
|
||||
unzip \
|
||||
valgrind \
|
||||
zlib1g-dev \
|
||||
zlibc \
|
||||
cmake \
|
||||
tox \
|
||||
libtool \
|
||||
ninja-build
|
||||
|
||||
cd $(DEPS_DIR)/s2n-tls; \
|
||||
make clean; \
|
||||
rm -rf build; \
|
||||
CC=$(CC) CXX=$(CXX) cmake . -Bbuild -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBENCHMARK=0; \
|
||||
CC=$(CC) CXX=$(CXX) cmake --build ./build -j$(CPUS); \
|
||||
CC=$(CC) CXX=$(CXX) CTEST_PARALLEL_LEVEL=$(CPUS) ninja -C build;
|
||||
cp $(DEPS_DIR)/s2n-tls/build/lib/libs2n.a $(DEPS_DIR)/libs2n.a
|
||||
|
||||
|
||||
SRC_DIR := src/javascript/jsc/bindings
|
||||
OBJ_DIR := src/javascript/jsc/bindings-obj
|
||||
SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp)
|
||||
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES))
|
||||
MAC_INCLUDE_DIRS := -Isrc/javascript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders \
|
||||
-Isrc/javascript/jsc/WebKit/WebKitBuild/Release/WTF/Headers \
|
||||
-Isrc/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers \
|
||||
-Isrc/javascript/jsc/WebKit/WebKitBuild/Release/ \
|
||||
-Isrc/javascript/jsc/bindings/ \
|
||||
-Isrc/javascript/jsc/WebKit/Source/bmalloc
|
||||
|
||||
LINUX_INCLUDE_DIRS := -I$(JSC_INCLUDE_DIR) \
|
||||
-Isrc/javascript/jsc/bindings/
|
||||
|
||||
INCLUDE_DIRS :=
|
||||
|
||||
ifeq ($(OS_NAME),linux)
|
||||
INCLUDE_DIRS += $(LINUX_INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
INCLUDE_DIRS += $(MAC_INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
MACOS_ICU_FILES = $(HOMEBREW_PREFIX)/opt/icu4c/lib/libicudata.a \
|
||||
$(HOMEBREW_PREFIX)/opt/icu4c/lib/libicui18n.a \
|
||||
$(HOMEBREW_PREFIX)/opt/icu4c/lib/libicuuc.a
|
||||
|
||||
MACOS_ICU_INCLUDE = $(HOMEBREW_PREFIX)/opt/icu4c/include
|
||||
|
||||
ICU_FLAGS :=
|
||||
|
||||
# TODO: find a way to make this more resilient
|
||||
# Ideally, we could just look up the linker search paths
|
||||
LIB_ICU_PATH ?= /usr/lib/x86_64-linux-gnu
|
||||
|
||||
ifeq ($(OS_NAME),linux)
|
||||
ICU_FLAGS += $(LIB_ICU_PATH)/libicuuc.a $(LIB_ICU_PATH)/libicudata.a $(LIB_ICU_PATH)/libicui18n.a
|
||||
endif
|
||||
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
ICU_FLAGS += -l icucore \
|
||||
$(MACOS_ICU_FILES) \
|
||||
-I$(MACOS_ICU_INCLUDE)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
CLANG_FLAGS = $(INCLUDE_DIRS) \
|
||||
-std=gnu++17 \
|
||||
-DSTATICALLY_LINKED_WITH_JavaScriptCore=1 \
|
||||
-DSTATICALLY_LINKED_WITH_WTF=1 \
|
||||
-DSTATICALLY_LINKED_WITH_BMALLOC=1 \
|
||||
-DBUILDING_WITH_CMAKE=1 \
|
||||
-DNDEBUG=1 \
|
||||
-DNOMINMAX \
|
||||
-DIS_BUILD \
|
||||
-g \
|
||||
-DENABLE_INSPECTOR_ALTERNATE_DISPATCHERS=0 \
|
||||
-DBUILDING_JSCONLY__ \
|
||||
-DASSERT_ENABLED=0 \
|
||||
-fPIE
|
||||
|
||||
# This flag is only added to webkit builds on Apple platforms
|
||||
# It has something to do with ICU
|
||||
ifeq ($(OS_NAME), darwin)
|
||||
CLANG_FLAGS += -DDU_DISABLE_RENAMING=1 \
|
||||
-mmacosx-version-min=10.11
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ARCHIVE_FILES_WITHOUT_LIBCRYPTO = src/deps/mimalloc/libmimalloc.a \
|
||||
src/deps/zlib/libz.a \
|
||||
src/deps/libarchive.a \
|
||||
src/deps/libs2n.a \
|
||||
src/deps/picohttpparser.o \
|
||||
|
||||
ARCHIVE_FILES = $(ARCHIVE_FILES_WITHOUT_LIBCRYPTO) src/deps/libcrypto.a
|
||||
|
||||
PLATFORM_LINKER_FLAGS =
|
||||
|
||||
ifeq ($(OS_NAME), linux)
|
||||
PLATFORM_LINKER_FLAGS = -lstdc++fs \
|
||||
-lc \
|
||||
-Wl,-z,now \
|
||||
-Wl,--as-needed \
|
||||
-Wl,-z,stack-size=12800000 \
|
||||
-Wl,-z,notext \
|
||||
-ffunction-sections \
|
||||
-fdata-sections \
|
||||
-Wl,--gc-sections
|
||||
endif
|
||||
|
||||
|
||||
BUN_LLD_FLAGS = $(OBJ_FILES) \
|
||||
${ICU_FLAGS} \
|
||||
${JSC_FILES} \
|
||||
$(ARCHIVE_FILES) \
|
||||
$(LIBICONV_PATH) \
|
||||
$(CLANG_FLAGS) \
|
||||
$(DEFAULT_LINKER_FLAGS) \
|
||||
$(PLATFORM_LINKER_FLAGS)
|
||||
|
||||
|
||||
bun: vendor identifier-cache build-obj bun-link-lld-release bun-codesign-release-local
|
||||
|
||||
|
||||
vendor-without-check: api analytics node-fallbacks runtime_js fallback_decoder bun_error mimalloc picohttp zlib s2n libarchive
|
||||
|
||||
|
||||
libarchive:
|
||||
cd src/deps/libarchive; \
|
||||
(make clean || echo ""); \
|
||||
(./build/clean.sh || echo ""); \
|
||||
./build/autogen.sh; \
|
||||
./configure --disable-shared --enable-static --with-pic --disable-bsdtar --disable-bsdcat --disable-rpath --enable-posix-regex-lib --without-xml2 --without-expat --without-openssl --without-iconv --without-zlib; \
|
||||
make -j${CPUS}; \
|
||||
cp ./.libs/libarchive.a $(DEPS_DIR)/libarchive.a;
|
||||
|
||||
tgz:
|
||||
$(ZIG) build-exe -Drelease-fast --main-pkg-path $(shell pwd) ./misctools/tgz.zig $(DEPS_DIR)/zlib/libz.a $(DEPS_DIR)/libarchive.a $(LIBICONV_PATH) -lc
|
||||
|
||||
tgz-debug:
|
||||
$(ZIG) build-exe --main-pkg-path $(shell pwd) ./misctools/tgz.zig $(DEPS_DIR)/zlib/libz.a $(DEPS_DIR)/libarchive.a $(LIBICONV_PATH) -lc
|
||||
|
||||
vendor: require init-submodules vendor-without-check
|
||||
|
||||
zlib:
|
||||
cd src/deps/zlib; cmake .; make;
|
||||
|
||||
require:
|
||||
@echo "Checking if the required utilities are available..."
|
||||
@cmake --version >/dev/null 2>&1 || (echo -e "ERROR: cmake is required."; exit 1)
|
||||
@esbuild --version >/dev/null 2>&1 || (echo -e "ERROR: esbuild is required."; exit 1)
|
||||
@npm --version >/dev/null 2>&1 || (echo -e "ERROR: npm is required."; exit 1)
|
||||
@which aclocal > /dev/null || (echo -e "ERROR: automake is required. Install on mac with:\n\n brew install automake"; exit 1)
|
||||
@which glibtoolize > /dev/null || (echo -e "ERROR: libtool is required. Install on mac with:\n\n brew install libtool"; exit 1)
|
||||
@which ninja > /dev/null || (echo -e "ERROR: Ninja is required. Install on mac with:\n\n brew install ninja"; exit 1)
|
||||
@stat $(LIBICONV_PATH) >/dev/null 2>&1 || (echo -e "ERROR: libiconv is required. Please run:\n\n brew install libiconv"; exit 1)
|
||||
@stat $(LIBCRYPTO_STATIC_LIB) >/dev/null 2>&1 || (echo -e "ERROR: OpenSSL 1.1 is required. Please run:\n\n brew install openssl@1.1"; exit 1)
|
||||
@echo "You have the dependencies installed! Woo"
|
||||
|
||||
init-submodules:
|
||||
git submodule update --init --recursive --progress --depth=1
|
||||
|
||||
build-obj:
|
||||
$(ZIG) build obj -Drelease-fast
|
||||
|
||||
sign-macos-x64:
|
||||
gon sign.macos-x64.json
|
||||
|
||||
sign-macos-aarch64:
|
||||
gon sign.macos-aarch64.json
|
||||
|
||||
cls:
|
||||
@echo "\n\n---\n\n"
|
||||
|
||||
release: all-js build-obj jsc-bindings-mac cls bun-link-lld-release release-bin-entitlements
|
||||
|
||||
jsc-check:
|
||||
@ls $(JSC_BASE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit build. Please compile the WebKit submodule using the Dockerfile at $(shell pwd)/src/javascript/WebKit/Dockerfile and then copy from /output in the Docker container to $(JSC_BASE_DIR). You can override the directory via JSC_BASE_DIR. \n\n DOCKER_BUILDKIT=1 docker build -t bun-webkit $(shell pwd)/src/javascript/jsc/WebKit -f $(shell pwd)/src/javascript/jsc/WebKit/Dockerfile --progress=plain\n\n docker container create bun-webkit\n\n # Get the container ID\n docker container ls\n\n docker cp DOCKER_CONTAINER_ID_YOU_JUST_FOUND:/output $(JSC_BASE_DIR)" && exit 1)
|
||||
@ls $(JSC_INCLUDE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit include directory at $(JSC_INCLUDE_DIR)." && exit 1)
|
||||
@ls $(JSC_LIB) >/dev/null 2>&1 || (echo "Failed to access WebKit lib directory at $(JSC_LIB)." && exit 1)
|
||||
|
||||
all-js: runtime_js fallback_decoder bun_error node-fallbacks
|
||||
|
||||
speedy: speedy-prod-native speedy-prod-wasi speedy-prod-wasm
|
||||
|
||||
api:
|
||||
peechy --schema src/api/schema.peechy --esm src/api/schema.js --ts src/api/schema.d.ts --zig src/api/schema.zig
|
||||
$(NPM_CLIENT) install; ./node_modules/.bin/peechy --schema src/api/schema.peechy --esm src/api/schema.js --ts src/api/schema.d.ts --zig src/api/schema.zig
|
||||
$(ZIG) fmt src/api/schema.zig
|
||||
$(PRETTIER) --write src/api/schema.js
|
||||
$(PRETTIER) --write src/api/schema.d.ts
|
||||
|
||||
node-fallbacks:
|
||||
@cd src/node-fallbacks; $(NPM_CLIENT) install; npm run --silent build
|
||||
|
||||
fallback_decoder:
|
||||
@esbuild --target=esnext --bundle src/fallback.ts --format=iife --platform=browser --minify > src/fallback.out.js
|
||||
|
||||
runtime_js:
|
||||
@NODE_ENV=production esbuild --define:process.env.NODE_ENV="production" --target=esnext --bundle src/runtime/index.ts --format=iife --platform=browser --global-name=BUN_RUNTIME --minify --external:/bun:* > src/runtime.out.js; cat src/runtime.footer.js >> src/runtime.out.js
|
||||
|
||||
runtime_js_dev:
|
||||
@NODE_ENV=development esbuild --define:process.env.NODE_ENV="development" --target=esnext --bundle src/runtime/index.ts --format=iife --platform=browser --global-name=BUN_RUNTIME --external:/bun:* > src/runtime.out.js; cat src/runtime.footer.js >> src/runtime.out.js
|
||||
|
||||
bun_error:
|
||||
@cd packages/bun-error; $(NPM_CLIENT) install; npm run --silent build
|
||||
|
||||
generate-install-script:
|
||||
@rm -f $(PACKAGES_REALPATH)/bun/install.js
|
||||
@esbuild --log-level=error --define:BUN_VERSION="\"$(PACKAGE_JSON_VERSION)\"" --define:process.env.NODE_ENV="\"production\"" --platform=node --format=cjs $(PACKAGES_REALPATH)/bun/install.ts > $(PACKAGES_REALPATH)/bun/install.js
|
||||
|
||||
fetch:
|
||||
cd misctools; $(ZIG) build-obj -Drelease-fast ./fetch.zig -fcompiler-rt -lc --main-pkg-path ../
|
||||
$(CXX) ./misctools/fetch.o -g -O3 -o ./misctools/fetch $(DEFAULT_LINKER_FLAGS) -lc \
|
||||
src/deps/mimalloc/libmimalloc.a \
|
||||
src/deps/zlib/libz.a \
|
||||
src/deps/libarchive.a \
|
||||
src/deps/libs2n.a \
|
||||
src/deps/picohttpparser.o \
|
||||
$(LIBCRYPTO_STATIC_LIB)
|
||||
|
||||
fetch-debug:
|
||||
cd misctools; $(ZIG) build-obj ./fetch.zig -fcompiler-rt -lc --main-pkg-path ../
|
||||
$(CXX) ./misctools/fetch.o -g -o ./misctools/fetch $(DEFAULT_LINKER_FLAGS) -lc \
|
||||
src/deps/mimalloc/libmimalloc.a \
|
||||
src/deps/zlib/libz.a \
|
||||
src/deps/libarchive.a \
|
||||
src/deps/libs2n.a \
|
||||
src/deps/picohttpparser.o \
|
||||
$(LIBCRYPTO_STATIC_LIB)
|
||||
|
||||
s2n-mac:
|
||||
cd $(DEPS_DIR)/s2n-tls; \
|
||||
make clean; \
|
||||
CC=$(CC) CXX=$(CXX) cmake . -Bbuild -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DLibCrypto_INCLUDE_DIR=$(LIBCRYPTO_INCLUDE_DIR) \
|
||||
-DLibCrypto_STATIC_LIBRARY=$(LIBCRYPTO_STATIC_LIB) \
|
||||
-DLibCrypto_LIBRARY=$(LIBCRYPTO_STATIC_LIB) \
|
||||
-DCMAKE_PREFIX_PATH=$(LIBCRYPTO_PREFIX_DIR); \
|
||||
CC=$(CC) CXX=$(CXX) cmake --build ./build -j$(CPUS); \
|
||||
CC=$(CC) CXX=$(CXX) CTEST_PARALLEL_LEVEL=$(CPUS) ninja -C build
|
||||
cp $(DEPS_DIR)/s2n-tls/build/lib/libs2n.a $(DEPS_DIR)/libs2n.a
|
||||
|
||||
libcrypto-old:
|
||||
unlink $(DEPS_DIR)/libcrypto.a || echo "";
|
||||
ln $(LIBCRYPTO_STATIC_LIB) $(DEPS_DIR)/libcrypto.a || echo "";
|
||||
|
||||
s2n-mac-debug:
|
||||
cd $(DEPS_DIR)/s2n-tls; \
|
||||
make clean; \
|
||||
CC=$(CC) CXX=$(CXX) cmake . -Bbuild -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DLibCrypto_INCLUDE_DIR=$(LIBCRYPTO_INCLUDE_DIR) \
|
||||
-DLibCrypto_STATIC_LIBRARY=$(LIBCRYPTO_STATIC_LIB) \
|
||||
-DLibCrypto_LIBRARY=$(LIBCRYPTO_STATIC_LIB) \
|
||||
-DCMAKE_PREFIX_PATH=$(LIBCRYPTO_PREFIX_DIR); \
|
||||
CC=$(CC) CXX=$(CXX) cmake --build ./build -j$(CPUS); \
|
||||
CC=$(CC) CXX=$(CXX) CTEST_PARALLEL_LEVEL=$(CPUS) ninja -C build test
|
||||
cp $(DEPS_DIR)/s2n-tls/build/lib/libs2n.a $(DEPS_DIR)/libs2n.a
|
||||
unlink $(DEPS_DIR)/libcrypto.a || echo "";
|
||||
ln $(LIBCRYPTO_STATIC_LIB) $(DEPS_DIR)/libcrypto.a || echo "";
|
||||
|
||||
libcrypto_path:
|
||||
@echo ${LIBCRYPTO_STATIC_LIB}
|
||||
|
||||
bun-codesign-debug:
|
||||
bun-codesign-release-local:
|
||||
|
||||
|
||||
speedy-prod-native-macos:
|
||||
cd src/deps; clang -c picohttpparser.c; cd ../../
|
||||
zig build -Drelease-fast -Dtarget=x86_64-macos-gnu
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
s2n: s2n-mac
|
||||
|
||||
speedy-prod-native-macos-lib:
|
||||
zig build lib -Drelease-fast -Dtarget=x86_64-macos-gnu
|
||||
|
||||
speedy-m1:
|
||||
zig build -Drelease-fast -Dtarget=aarch64-macos-gnu
|
||||
# Hardened runtime will not work with debugging
|
||||
bun-codesign-debug:
|
||||
codesign --entitlements $(realpath entitlements.plist) --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict $(DEBUG_BUN)
|
||||
|
||||
speedy-prod-wasm:
|
||||
zig build -Drelease-fast -Dtarget=wasm32-freestanding
|
||||
bun-codesign-release-local:
|
||||
codesign --entitlements $(realpath entitlements.plist) --options runtime --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict $(RELEASE_BUN)
|
||||
codesign --entitlements $(realpath entitlements.plist) --options runtime --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict $(PACKAGE_DIR)/bun-profile
|
||||
|
||||
speedy-prod-wasi:
|
||||
zig build -Drelease-fast -Dtarget=wasm32-wasi
|
||||
|
||||
speedy-dev: speedy-dev-native speedy-dev-wasi speedy-dev-wasm
|
||||
endif
|
||||
|
||||
speedy-dev-native:
|
||||
zig build
|
||||
jsc: jsc-build jsc-bindings
|
||||
jsc-build: $(JSC_BUILD_STEPS)
|
||||
jsc-bindings: jsc-bindings-headers jsc-bindings-mac
|
||||
|
||||
jsc-bindings-headers:
|
||||
rm -f /tmp/build-jsc-headers src/javascript/jsc/bindings/headers.zig
|
||||
touch src/javascript/jsc/bindings/headers.zig
|
||||
mkdir -p src/javascript/jsc/bindings-obj/
|
||||
$(ZIG) build headers-obj
|
||||
$(CXX) $(PLATFORM_LINKER_FLAGS) -g $(DEBUG_BIN)/headers.o -W -o /tmp/build-jsc-headers $(DEFAULT_LINKER_FLAGS) -lc $(ARCHIVE_FILES);
|
||||
/tmp/build-jsc-headers
|
||||
$(ZIG) translate-c src/javascript/jsc/bindings/headers.h > src/javascript/jsc/bindings/headers.zig
|
||||
$(ZIG) run misctools/headers-cleaner.zig -lc
|
||||
$(SED) -i '/pub const __darwin/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const __builtin/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const int/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const uint/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const intmax/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const uintmax/d' src/javascript/jsc/bindings/headers.zig || echo "";
|
||||
$(SED) -i '/pub const max_align_t/{N;N;N;d;}' src/javascript/jsc/bindings/headers.zig
|
||||
$(SED) -i '/pub const ZigErrorCode/d' src/javascript/jsc/bindings/headers.zig
|
||||
$(SED) -i '/pub const JSClassRef/d' src/javascript/jsc/bindings/headers.zig
|
||||
$(ZIG) fmt src/javascript/jsc/bindings/headers.zig
|
||||
|
||||
|
||||
speedy-dev-wasm:
|
||||
zig build -Dtarget=wasm32-freestanding
|
||||
bump:
|
||||
expr $(BUILD_ID) + 1 > build-id
|
||||
|
||||
speedy-dev-wasi:
|
||||
zig build -Dtarget=wasm32-wasi
|
||||
|
||||
identifier-cache:
|
||||
$(ZIG) run src/js_lexer/identifier_data.zig
|
||||
|
||||
tag:
|
||||
git tag $(BUN_BUILD_TAG)
|
||||
git push --tags
|
||||
|
||||
prepare-release: tag release-create
|
||||
|
||||
release-create-auto-updater:
|
||||
|
||||
release-create:
|
||||
gh release create --title "Bun v$(PACKAGE_JSON_VERSION)" "$(BUN_BUILD_TAG)"
|
||||
gh release create --repo=$(BUN_AUTO_UPDATER_REPO) --title "Bun v$(PACKAGE_JSON_VERSION)" "$(BUN_BUILD_TAG)" -n "See https://github.com/Jarred-Sumner/bun/releases/tag/$(BUN_BUILD_TAG) for release notes. Using the install script or bun upgrade is the recommended way to install Bun. Join Bun's Discord to get access https://bun.sh/discord"
|
||||
|
||||
release-bin-entitlements:
|
||||
|
||||
release-bin-generate-zip:
|
||||
release-bin-codesign:
|
||||
|
||||
ifeq ($(OS_NAME),darwin)
|
||||
# Without this, JIT will fail on aarch64
|
||||
# strip will remove the entitlements.plist
|
||||
# which, in turn, will break JIT
|
||||
release-bin-entitlements:
|
||||
codesign --entitlements $(realpath entitlements.plist) --options runtime --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict $(PACKAGE_DIR)/bun
|
||||
codesign --entitlements $(realpath entitlements.plist) --options runtime --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict $(PACKAGE_DIR)/bun-profile
|
||||
|
||||
|
||||
# macOS expects a specific directory structure for the zip file
|
||||
# ditto lets us generate it similarly to right clicking "Compress" in Finder
|
||||
release-bin-generate-zip:
|
||||
dot_clean -vnm /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET)
|
||||
cd /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET) && \
|
||||
codesign --entitlements $(realpath entitlements.plist) --options runtime --force --timestamp --sign "$(CODESIGN_IDENTITY)" -vvvv --deep --strict bun
|
||||
ditto -ck --rsrc --sequesterRsrc --keepParent /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET) $(BUN_DEPLOY_ZIP)
|
||||
|
||||
release-bin-codesign:
|
||||
xcrun notarytool submit --wait $(BUN_DEPLOY_ZIP) --keychain-profile "bun"
|
||||
|
||||
else
|
||||
|
||||
release-bin-generate-zip:
|
||||
cd /tmp/bun-$(PACKAGE_JSON_VERSION)/ && zip -r bun-$(TRIPLET).zip bun-$(TRIPLET)
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
BUN_DEPLOY_ZIP = /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET).zip
|
||||
|
||||
|
||||
release-bin-generate-copy:
|
||||
rm -rf /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET) $(BUN_DEPLOY_ZIP)
|
||||
mkdir -p /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET)
|
||||
cp $(BUN_RELEASE_BIN) /tmp/bun-$(PACKAGE_JSON_VERSION)/bun-$(TRIPLET)/bun
|
||||
|
||||
release-bin-generate: release-bin-generate-copy release-bin-generate-zip
|
||||
|
||||
|
||||
release-bin-check:
|
||||
test $(shell eval $(BUN_RELEASE_BIN) --version) = $(PACKAGE_JSON_VERSION)
|
||||
|
||||
release-bin-without-push: test-all release-bin-check release-bin-generate release-bin-codesign
|
||||
release-bin: release-bin-without-push release-bin-push
|
||||
|
||||
release-bin-push:
|
||||
gh release upload $(BUN_BUILD_TAG) --clobber $(BUN_DEPLOY_ZIP)
|
||||
gh release upload $(BUN_BUILD_TAG) --clobber $(BUN_DEPLOY_ZIP) --repo $(BUN_AUTO_UPDATER_REPO)
|
||||
|
||||
dev-obj:
|
||||
$(ZIG) build obj
|
||||
|
||||
dev-obj-linux:
|
||||
$(ZIG) build obj -Dtarget=x86_64-linux-gnu
|
||||
|
||||
dev: mkdir-dev dev-obj bun-link-lld-debug bun-codesign-debug
|
||||
|
||||
mkdir-dev:
|
||||
mkdir -p $(DEBUG_PACKAGE_DIR)/bin
|
||||
|
||||
test-install:
|
||||
cd integration/scripts && $(NPM_CLIENT) install
|
||||
|
||||
test-all: test-install test-with-hmr test-no-hmr test-create-next test-create-react test-bun-run
|
||||
test-all-mac: test-install test-with-hmr-mac test-no-hmr-mac test-create-next-mac test-create-react-mac test-bun-run-mac
|
||||
|
||||
copy-test-node-modules:
|
||||
rm -rf integration/snippets/package-json-exports/node_modules || echo "";
|
||||
cp -r integration/snippets/package-json-exports/_node_modules_copy integration/snippets/package-json-exports/node_modules || echo "";
|
||||
kill-bun:
|
||||
-killall -9 bun bun-debug
|
||||
|
||||
test-dev-create-next:
|
||||
BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-create-next.sh
|
||||
|
||||
test-dev-create-react:
|
||||
BUN_BIN=$(DEBUG_BUN) bash integration/apps/bun-create-react.sh
|
||||
|
||||
test-create-next:
|
||||
BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-next.sh
|
||||
|
||||
test-bun-run:
|
||||
cd integration/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-run-check.sh
|
||||
|
||||
test-create-react:
|
||||
BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-react.sh
|
||||
|
||||
test-with-hmr: kill-bun copy-test-node-modules
|
||||
BUN_BIN=$(RELEASE_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-no-hmr: kill-bun copy-test-node-modules
|
||||
-killall bun -9;
|
||||
DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(RELEASE_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-create-next-mac:
|
||||
BUN_BIN=$(MAC_BUN) bash integration/apps/bun-create-next.sh
|
||||
|
||||
test-bun-run-mac:
|
||||
cd integration/apps && BUN_BIN=$(MAC_BUN) bash ./bun-run-check.sh
|
||||
|
||||
test-create-react-mac:
|
||||
BUN_BIN=$(MAC_BUN) bash integration/apps/bun-create-react.sh
|
||||
|
||||
test-with-hmr-mac: kill-bun copy-test-node-modules
|
||||
BUN_BIN=$(MAC_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-no-hmr-mac: kill-bun copy-test-node-modules
|
||||
-killall bun -9;
|
||||
DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(MAC_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-dev-with-hmr: copy-test-node-modules
|
||||
-killall bun-debug -9;
|
||||
BUN_BIN=$(DEBUG_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-dev-no-hmr: copy-test-node-modules
|
||||
-killall bun-debug -9;
|
||||
DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(DEBUG_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-dev-bun-run:
|
||||
cd integration/apps && BUN_BIN=$(DEBUG_BUN) bash bun-run-check.sh
|
||||
|
||||
test-dev-all: test-dev-with-hmr test-dev-no-hmr test-dev-create-next test-dev-create-react test-dev-bun-run
|
||||
test-dev-bunjs:
|
||||
|
||||
test-dev: test-dev-with-hmr
|
||||
|
||||
jsc-copy-headers:
|
||||
find src/javascript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/Headers/JavaScriptCore/ -name "*.h" -exec cp {} src/javascript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/JavaScriptCore/ \;
|
||||
|
||||
jsc-build-mac-compile:
|
||||
cd src/javascript/jsc/WebKit && ICU_INCLUDE_DIRS="$(HOMEBREW_PREFIX)opt/icu4c/include" ./Tools/Scripts/build-jsc --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON -DCMAKE_BUILD_TYPE=relwithdebinfo -DUSE_PTHREAD_JIT_PERMISSIONS_API=1"
|
||||
|
||||
jsc-build-linux-compile:
|
||||
cd src/javascript/jsc/WebKit && ./Tools/Scripts/build-jsc --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON -DCMAKE_BUILD_TYPE=relwithdebinfo -DUSE_THIN_ARCHIVES=OFF"
|
||||
|
||||
jsc-build-mac: jsc-build-mac-compile jsc-build-mac-copy
|
||||
|
||||
jsc-build-linux: jsc-build-linux-compile jsc-build-mac-copy
|
||||
|
||||
jsc-build-mac-copy:
|
||||
cp src/javascript/jsc/WebKit/WebKitBuild/Release/lib/libJavaScriptCore.a src/deps/libJavaScriptCore.a
|
||||
cp src/javascript/jsc/WebKit/WebKitBuild/Release/lib/libWTF.a src/deps/libWTF.a
|
||||
cp src/javascript/jsc/WebKit/WebKitBuild/Release/lib/libbmalloc.a src/deps/libbmalloc.a
|
||||
|
||||
clean-bindings:
|
||||
rm -rf $(OBJ_DIR)/*.o
|
||||
|
||||
clean: clean-bindings
|
||||
rm src/deps/*.a src/deps/*.o
|
||||
(cd src/deps/mimalloc && make clean) || echo "";
|
||||
(cd src/deps/libarchive && make clean) || echo "";
|
||||
(cd src/deps/s2n-tls && make clean) || echo "";
|
||||
(cd src/deps/picohttp && make clean) || echo "";
|
||||
(cd src/deps/zlib && make clean) || echo "";
|
||||
|
||||
jsc-bindings-mac: $(OBJ_FILES)
|
||||
|
||||
|
||||
mimalloc:
|
||||
cd src/deps/mimalloc; cmake .; make;
|
||||
|
||||
bun-link-lld-debug:
|
||||
$(CXX) $(BUN_LLD_FLAGS) \
|
||||
-g \
|
||||
$(DEBUG_BIN)/bun-debug.o \
|
||||
-W \
|
||||
-o $(DEBUG_BIN)/bun-debug \
|
||||
|
||||
|
||||
bun-relink-copy:
|
||||
cp /tmp/bun-$(PACKAGE_JSON_VERSION).o $(BUN_RELEASE_BIN).o
|
||||
|
||||
bun-relink: bun-relink-copy bun-link-lld-release
|
||||
|
||||
|
||||
bun-link-lld-release:
|
||||
$(CXX) $(BUN_LLD_FLAGS) \
|
||||
$(BUN_RELEASE_BIN).o \
|
||||
-o $(BUN_RELEASE_BIN) \
|
||||
-W \
|
||||
-flto \
|
||||
-ftls-model=initial-exec \
|
||||
-O3
|
||||
cp $(BUN_RELEASE_BIN) $(BUN_RELEASE_BIN)-profile
|
||||
-$(STRIP) $(BUN_RELEASE_BIN)
|
||||
|
||||
mv $(BUN_RELEASE_BIN).o /tmp/bun-$(PACKAGE_JSON_VERSION).o
|
||||
|
||||
# We do this outside of build.zig for performance reasons
|
||||
# The C compilation stuff with build.zig is really slow and we don't need to run this as often as the rest
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
|
||||
$(CXX) -c -o $@ $< \
|
||||
$(CLANG_FLAGS) \
|
||||
-O1 \
|
||||
-w
|
||||
|
||||
sizegen:
|
||||
$(CXX) src/javascript/jsc/headergen/sizegen.cpp -o $(BUN_TMP_DIR)/sizegen $(CLANG_FLAGS) -O1
|
||||
$(BUN_TMP_DIR)/sizegen > src/javascript/jsc/bindings/sizes.zig
|
||||
|
||||
picohttp:
|
||||
$(CC) $(MARCH_NATIVE) -O3 -g -fPIE -c src/deps/picohttpparser/picohttpparser.c -Isrc/deps -o src/deps/picohttpparser.o; cd ../../
|
||||
|
||||
analytics:
|
||||
./node_modules/.bin/peechy --schema src/analytics/schema.peechy --zig src/analytics/analytics_schema.zig
|
||||
$(ZIG) fmt src/analytics/analytics_schema.zig
|
||||
|
||||
analytics-features:
|
||||
@cd misctools; $(ZIG) run --main-pkg-path ../ ./features.zig
|
||||
|
||||
find-unused-zig-files:
|
||||
@bash ./misctools/find-unused-zig.sh
|
||||
|
||||
generate-unit-tests:
|
||||
@bash ./misctools/generate-test-file.sh
|
||||
|
||||
fmt-all:
|
||||
find src -name "*.zig" -exec $(ZIG) fmt {} \;
|
||||
|
||||
unit-tests: generate-unit-tests run-unit-tests
|
||||
|
||||
|
||||
|
||||
ROME_TSCONFIG += {
|
||||
ROME_TSCONFIG += \"compilerOptions\": {
|
||||
ROME_TSCONFIG += \"sourceMap\": true,
|
||||
ROME_TSCONFIG += \"esModuleInterop\": true,
|
||||
ROME_TSCONFIG += \"resolveJsonModule\": true,
|
||||
ROME_TSCONFIG += \"moduleResolution\": \"node\",
|
||||
ROME_TSCONFIG += \"target\": \"es2019\",
|
||||
ROME_TSCONFIG += \"module\": \"commonjs\",
|
||||
ROME_TSCONFIG += \"baseUrl\": \".\"
|
||||
ROME_TSCONFIG += }
|
||||
ROME_TSCONFIG += }
|
||||
ifeq (test, $(firstword $(MAKECMDGOALS)))
|
||||
testpath := $(firstword $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS)))
|
||||
testfilter := $(wordlist 3, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
|
||||
testbinpath := zig-out/bin/test
|
||||
testbinpath := $(lastword $(testfilter))
|
||||
|
||||
github/rome:
|
||||
mkdir -p github/rome
|
||||
cd github/rome && git init && git remote add origin https://github.com/romejs/rome.git
|
||||
cd github/rome && git fetch --depth 1 origin d95a3a7aab90773c9b36d9c82a08c8c4c6b68aa5 && git checkout FETCH_HEAD
|
||||
ifeq ($(if $(patsubst /%,,$(testbinpath)),,yes),yes)
|
||||
testfilterflag := --test-filter "$(filter-out $(testbinpath), $(testfilter))"
|
||||
|
||||
# This target provides an easy way to verify that the build is correct. Since
|
||||
# Rome is self-hosted, we can just run the bundle to build Rome. This makes sure
|
||||
# the bundle doesn't crash when run and is a good test of a non-trivial workload.
|
||||
bench-rome-verify: | github/rome
|
||||
mkdir -p bench/rome-verify
|
||||
cp -r github/rome/packages bench/rome-verify/packages
|
||||
cp github/rome/package.json bench/rome-verify/package.json
|
||||
endif
|
||||
|
||||
bench-rome:
|
||||
rm -rf bench/rome
|
||||
mkdir -p bench/rome
|
||||
cp -r github/rome/packages bench/rome/src/
|
||||
echo "$(ROME_TSCONFIG)" > bench/rome/src/tsconfig.json
|
||||
echo 'import "rome/bin/rome"' > bench/rome/src/entry.ts
|
||||
ifneq ($(if $(patsubst /%,,$(testbinpath)),,yes),yes)
|
||||
testbinpath := zig-out/bin/test
|
||||
ifneq ($(strip $(testfilter)),)
|
||||
testfilterflag := --test-filter "$(testfilter)"
|
||||
endif
|
||||
endif
|
||||
|
||||
# Patch a cyclic import ordering issue that affects commonjs-style bundlers (webpack and parcel)
|
||||
echo "export { default as createHook } from './api/createHook';" > .temp
|
||||
sed "/createHook/d" bench/rome/src/@romejs/js-compiler/index.ts >> .temp
|
||||
mv .temp bench/rome/src/@romejs/js-compiler/index.ts
|
||||
testname := $(shell basename $(testpath))
|
||||
|
||||
# Replace "import fs = require('fs')" with "const fs = require('fs')" because
|
||||
# the TypeScript compiler strips these statements when targeting "esnext",
|
||||
# which breaks Parcel 2 when scope hoisting is enabled.
|
||||
find bench/rome/src -name '*.ts' -type f -print0 | xargs -L1 -0 sed -i '' 's/import \([A-Za-z0-9_]*\) =/const \1 =/g'
|
||||
find bench/rome/src -name '*.tsx' -type f -print0 | xargs -L1 -0 sed -i '' 's/import \([A-Za-z0-9_]*\) =/const \1 =/g'
|
||||
|
||||
$(eval $(testname):;@true)
|
||||
|
||||
# Get an approximate line count
|
||||
rm -r bench/rome/src/@romejs/js-parser/test-fixtures
|
||||
echo 'Line count:' && (find bench/rome/src -name '*.ts' && find bench/rome/src -name '*.js') | xargs wc -l | tail -n 1
|
||||
ifeq ($(words $(testfilter)), 0)
|
||||
testfilterflag := --test-name-prefix "$(testname): "
|
||||
endif
|
||||
|
||||
ifeq ($(testfilterflag), undefined)
|
||||
testfilterflag := --test-name-prefix "$(testname): "
|
||||
endif
|
||||
|
||||
|
||||
bench-rome-speedy: | bench/rome-verify
|
||||
cd bench/rome/src
|
||||
/Users/jarred/Code/esdev/build/macos-x86_64/esdev --outdir=dist ./entry.ts
|
||||
endif
|
||||
|
||||
github-rome:
|
||||
mkdir -p github/rome
|
||||
cd github/rome && git init && git remote add origin https://github.com/romejs/rome.git
|
||||
cd github/rome && git fetch --depth 1 origin d95a3a7aab90773c9b36d9c82a08c8c4c6b68aa5 && git checkout FETCH_HEAD
|
||||
ifeq (build-unit, $(firstword $(MAKECMDGOALS)))
|
||||
testpath := $(firstword $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS)))
|
||||
testfilter := $(wordlist 3, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
|
||||
testbinpath := zig-out/bin/test
|
||||
testbinpath := $(lastword $(testfilter))
|
||||
|
||||
ifeq ($(if $(patsubst /%,,$(testbinpath)),,yes),yes)
|
||||
testfilterflag := --test-filter "$(filter-out $(testbinpath), $(testfilter))"
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(if $(patsubst /%,,$(testbinpath)),,yes),yes)
|
||||
testbinpath := zig-out/bin/test
|
||||
ifneq ($(strip $(testfilter)),)
|
||||
testfilterflag := --test-filter "$(testfilter)"
|
||||
endif
|
||||
endif
|
||||
|
||||
testname := $(shell basename $(testpath))
|
||||
|
||||
|
||||
$(eval $(testname):;@true)
|
||||
$(eval $(testfilter):;@true)
|
||||
$(eval $(testpath):;@true)
|
||||
|
||||
ifeq ($(words $(testfilter)), 0)
|
||||
testfilterflag := --test-name-prefix "$(testname): "
|
||||
endif
|
||||
|
||||
ifeq ($(testfilterflag), undefined)
|
||||
testfilterflag := --test-name-prefix "$(testname): "
|
||||
endif
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
build-unit:
|
||||
@rm -rf zig-out/bin/$(testname)
|
||||
@mkdir -p zig-out/bin
|
||||
zig test $(realpath $(testpath)) \
|
||||
$(testfilterflag) \
|
||||
--pkg-begin picohttp $(DEPS_DIR)/picohttp.zig --pkg-end \
|
||||
--pkg-begin clap $(DEPS_DIR)/zig-clap/clap.zig --pkg-end \
|
||||
--main-pkg-path $(shell pwd) \
|
||||
--test-no-exec \
|
||||
-fPIC \
|
||||
-femit-bin=zig-out/bin/$(testname) \
|
||||
-fcompiler-rt \
|
||||
-lc -lc++ \
|
||||
--cache-dir /tmp/zig-cache-bun-$(testname)-$(basename $(lastword $(testfilter))) \
|
||||
-fallow-shlib-undefined \
|
||||
-L$(LIBCRYPTO_PREFIX_DIR)/lib \
|
||||
-lcrypto -lssl \
|
||||
$(ARCHIVE_FILES_WITHOUT_LIBCRYPTO) $(ICU_FLAGS) && \
|
||||
cp zig-out/bin/$(testname) $(testbinpath)
|
||||
|
||||
run-unit:
|
||||
@zig-out/bin/$(testname) -- fake
|
||||
|
||||
|
||||
test: build-unit run-unit
|
||||
|
||||
integration-test-dev:
|
||||
USE_EXISTING_PROCESS=true TEST_SERVER_URL=http://localhost:3000 node integration/scripts/browser.js
|
||||
|
||||
copy-install:
|
||||
cp src/cli/install.sh ../bun.sh/docs/install.html
|
||||
|
||||
5
bench/hot-module-reloading/css-stress-test/.gitignore
vendored
Normal file
5
bench/hot-module-reloading/css-stress-test/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
bun
|
||||
next
|
||||
src/*.mov
|
||||
src/*.blob
|
||||
|
||||
77
bench/hot-module-reloading/css-stress-test/Makefile
Normal file
77
bench/hot-module-reloading/css-stress-test/Makefile
Normal file
@@ -0,0 +1,77 @@
|
||||
SLEEP_INTERVAL ?= 32
|
||||
SCREEN_WIDTH ?= $(shell system_profiler -json SPDisplaysDataType 2>/dev/null | jq -r '.. | objects | select(.spdisplays_main) | ._spdisplays_pixels | split(" ")[0]')
|
||||
SCREEN_HEIGHT ?= $(shell system_profiler -json SPDisplaysDataType 2>/dev/null | jq -r '.. | objects | select(.spdisplays_main) | ._spdisplays_pixels | split(" ")[2]')
|
||||
PROJECT ?= bun
|
||||
PACKAGE_NAME ?= bun-cli
|
||||
RUN_COUNT ?= 128
|
||||
ENDPOINT ?= /
|
||||
|
||||
ifeq ($(PROJECT),bun)
|
||||
PACKAGE_NAME := bun-cli
|
||||
endif
|
||||
|
||||
ifeq ($(PROJECT),next)
|
||||
PACKAGE_NAME := next
|
||||
endif
|
||||
|
||||
generate:
|
||||
@killall -9 bun next node || echo ""
|
||||
PROJECT=$(PROJECT) SCREEN_WIDTH=$(SCREEN_WIDTH) SCREEN_HEIGHT=$(SCREEN_HEIGHT) ENDPOINT=$(ENDPOINT) node browser.js
|
||||
|
||||
generate-css-in-js:
|
||||
@killall -9 bun next node || echo ""
|
||||
PROJECT=$(PROJECT) SCREEN_WIDTH=$(SCREEN_WIDTH) SCREEN_HEIGHT=$(SCREEN_HEIGHT) ENDPOINT=/css-in-js node browser.js
|
||||
loop:
|
||||
cp src/colors.css.0 src/colors.css
|
||||
sleep 3
|
||||
osascript -e 'tell application "System Events" to tell process "Chromium"' \
|
||||
-e 'set frontmost to true' \
|
||||
-e 'if windows is not {} then perform action "AXRaise" of item 1 of windows' \
|
||||
-e 'end tell'
|
||||
sleep 0.5
|
||||
cd src; zig run -Drelease-fast ../color-looper.zig -- ./colors.css:0 $(SLEEP_INTERVAL)
|
||||
cp src/colors.css.blob $(PROJECT)/colors.css.blob
|
||||
|
||||
loop-emotion:
|
||||
cp src/css-in-js-styles.0 src/css-in-js-styles.tsx
|
||||
sleep 3
|
||||
osascript -e 'tell application "System Events" to tell process "Chromium"' \
|
||||
-e 'set frontmost to true' \
|
||||
-e 'if windows is not {} then perform action "AXRaise" of item 1 of windows' \
|
||||
-e 'end tell'
|
||||
sleep 0.5
|
||||
cd src; zig run -Drelease-fast ../color-looper.emotion.zig -- ./css-in-js-styles.tsx:0 $(SLEEP_INTERVAL)
|
||||
cp src/css-in-js-styles.tsx.blob $(PROJECT)/css-in-js-styles.blob
|
||||
|
||||
process_video:
|
||||
rm -rf $(FRAMES_DIR); mkdir -p $(FRAMES_DIR); ffmpeg -i src/colors.css.mov -vf fps=120,format=gray $(FRAMES_DIR)/%d.tif
|
||||
|
||||
FRAMES_DIR ?= $(shell mkdir -p ./$(PROJECT)/frames; realpath ./$(PROJECT)/frames)
|
||||
|
||||
TIF_FILES := $(wildcard $(FRAMES_DIR)/*.tif)
|
||||
TXT_FILES := $(wildcard $(FRAMES_DIR)/*.txt)
|
||||
|
||||
OBJ_FILES := $(patsubst $(SRC_DIR)/%.tif,$(OBJ_DIR)/%.txt,$(TIF_FILES))
|
||||
TRIM_FILES := $(patsubst $(SRC_DIR)/%.txt,$(OBJ_DIR)/%.trim,$(TXT_FILES))
|
||||
|
||||
frames: $(OBJ_FILES)
|
||||
|
||||
|
||||
$(FRAMES_DIR)/%.txt: $(FRAMES_DIR)/%.tif
|
||||
tesseract -l eng $< $@
|
||||
|
||||
trim: $(TRIM_FILES) cleanup print
|
||||
|
||||
|
||||
|
||||
$(FRAMES_DIR)/%.trim: $(FRAMES_DIR)/%.txt
|
||||
(grep "Ran:" $< || echo "\n") >> $(PROJECT)/frames.all
|
||||
|
||||
cleanup:
|
||||
sed 's/^Ran: *//' $(PROJECT)/frames.all | tr -d ' ' | sort | uniq > $(PROJECT)/frames.all.clean
|
||||
|
||||
print:
|
||||
PACKAGE_NAME=$(PACKAGE_NAME) SLEEP_INTERVAL=$(SLEEP_INTERVAL) PROJECT=$(PROJECT) OUTFILE=timings/$(PACKAGE_NAME) node read-frames.js
|
||||
|
||||
print-emotion:
|
||||
PACKAGE_NAME=$(PACKAGE_NAME) SLEEP_INTERVAL=$(SLEEP_INTERVAL) PROJECT=$(PROJECT) OUTFILE=timings/emotion_$(PACKAGE_NAME) node read-frames.js
|
||||
62
bench/hot-module-reloading/css-stress-test/README.md
Normal file
62
bench/hot-module-reloading/css-stress-test/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# CSS Stress Test
|
||||
|
||||
This benchmarks bundler performance for CSS hot reloading.
|
||||
|
||||
## Results
|
||||
|
||||
Bun is 14x faster than Next.js at hot reloading CSS.
|
||||
|
||||
```
|
||||
Bun v0.0.34
|
||||
Saving every 16ms
|
||||
|
||||
Frame time:
|
||||
50th percentile: 22.2ms
|
||||
75th percentile: 23.9ms
|
||||
90th percentile: 25.3ms
|
||||
95th percentile: 43.6ms
|
||||
99th percentile: 49.1ms
|
||||
Rendered frames: 922 / 1024 (90%)
|
||||
```
|
||||
|
||||
```
|
||||
Next.js v11.1.2
|
||||
Saving every 16ms
|
||||
|
||||
Frame time:
|
||||
50th percentile: 312ms
|
||||
75th percentile: 337.6ms
|
||||
90th percentile: 387.7ms
|
||||
95th percentile: 446.9ms
|
||||
99th percentile: 591.7ms
|
||||
Rendered frames: 64 / 1024 (6%)
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
It times pixels instead of builds. `color-looper.zig` writes color updates and the timestamp to a css file, while simultaneously screen recording a non-headless Chromium instance. After it finishes, it OCRs the video frames and verifies the scanned timestamps against the actual data. This data measures (1) how long each update took from saving to disk up to the pixels visible on the screen and (2) what % of frames were rendered.
|
||||
|
||||
The intent is to be as accurate as possible. Measuring times reported client-side is simpler, but lower accuracy since those times may not correspond to pixels on the screen and do not start from when the data was written to disk (at best, they measure when the filesystem watcher detected the update, but often not that either). `color-looper.zig` must run separately from `browser.js` or the results will be innaccurate.
|
||||
|
||||
It works like this:
|
||||
|
||||
1. `browser.js` loads either Bun or Next.js and a Chromium instance opened to the correct webpage
|
||||
2. `color-looper.zig` updates [`./src/colors.css`](./src/colors.css) in a loop up to `1024` times (1024 is arbitrary), sleeping every `16`ms or `32`ms (a CLI arg you can pass it). The `var(--timestamp)` CSS variable contains the UTC timestamp with precision of milliseconds and one extra decimal point
|
||||
3. `color-looper.zig` automatically records the screen via `screencapture` (builtin on macOS) and saves it, along with a `BigUint64Array` containing all the expected timestamps. When it's done, it writes to a designated file on disk which `browser.js` picks up as the signal to close the browser.
|
||||
4. `ffmpeg` converts each frame into a black and white `.tif` file, which `tesseract` then OCRs
|
||||
5. Various cleanup scripts extract the timestamp from each of those OCR'd frames into a single file
|
||||
6. Using the OCR'd data, `./read-frames.js` calculates the 50th, 75th, 90th, 95th, and 99th percentile frame time, along with how many frames were skipped. Frame time is the metric here that matters here because that's how much time elapsed between each update. It includes the artificial sleep interval, so it will not be faster than the sleep interval.
|
||||
|
||||
The script `run.sh` runs all the commands necessary to do this work unattended. It takes awhile though. The slow part is OCR'ing all the frames.
|
||||
|
||||
To run this, you need:
|
||||
|
||||
- `zig`
|
||||
- `bun-cli`
|
||||
- `node`
|
||||
- `tesseract`
|
||||
- `screencapture` (macOS builtin)
|
||||
- `ffmpeg`
|
||||
- `puppeteer` (from the package.json)
|
||||
|
||||
You will need to run `bun bun --use next` first, with `next@11.1.2`. It will only run on macOS due to the dependencies on `screencapture`, how it detects screen resolution (so that Chromium is maximized), and how it auto-focuses Chromium (apple script)
|
||||
118
bench/hot-module-reloading/css-stress-test/browser.js
Normal file
118
bench/hot-module-reloading/css-stress-test/browser.js
Normal file
@@ -0,0 +1,118 @@
|
||||
const puppeteer = require("puppeteer");
|
||||
const http = require("http");
|
||||
const path = require("path");
|
||||
const url = require("url");
|
||||
const fs = require("fs");
|
||||
const child_process = require("child_process");
|
||||
const serverURL = process.env.TEST_SERVER_URL || "http://localhost:8080";
|
||||
|
||||
if (process.env.PROJECT === "bun") {
|
||||
const bunFlags = [`--origin=${serverURL}`].filter(Boolean);
|
||||
const bunExec = process.env.BUN_BIN || "bun";
|
||||
const bunProcess = child_process.spawn(bunExec, bunFlags, {
|
||||
cwd: process.cwd(),
|
||||
stdio: "ignore",
|
||||
env: {
|
||||
...process.env,
|
||||
DISABLE_BUN_ANALYTICS: "1",
|
||||
},
|
||||
|
||||
shell: false,
|
||||
});
|
||||
console.log("$", bunExec, bunFlags.join(" "));
|
||||
const isDebug = bunExec.endsWith("-debug");
|
||||
|
||||
// bunProcess.stderr.pipe(process.stderr);
|
||||
// bunProcess.stdout.pipe(process.stdout);
|
||||
bunProcess.once("error", (err) => {
|
||||
console.error("❌ bun error", err);
|
||||
process.exit(1);
|
||||
});
|
||||
process.on("beforeExit", () => {
|
||||
bunProcess?.kill(0);
|
||||
});
|
||||
} else if (process.env.PROJECT === "next") {
|
||||
const bunProcess = child_process.spawn(
|
||||
"./node_modules/.bin/next",
|
||||
["--port", "8080"],
|
||||
{
|
||||
cwd: process.cwd(),
|
||||
stdio: "ignore",
|
||||
env: {
|
||||
...process.env,
|
||||
},
|
||||
|
||||
shell: false,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const delay = new Promise((resolve, reject) => {
|
||||
const watcher = fs.watch(path.resolve(process.cwd(), "src/colors.css.blob"));
|
||||
watcher.once("change", () => {
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
async function main() {
|
||||
const browser = await puppeteer.launch({
|
||||
headless: false,
|
||||
waitForInitialPage: true,
|
||||
args: [
|
||||
`--window-size=${parseInt(process.env.SCREEN_WIDTH || "1024", 10) / 2},${
|
||||
parseInt(process.env.SCREEN_HEIGHT || "1024", 10) / 2
|
||||
}`,
|
||||
],
|
||||
defaultViewport: {
|
||||
width: parseInt(process.env.SCREEN_WIDTH || "1024", 10) / 2,
|
||||
height: parseInt(process.env.SCREEN_HEIGHT || "1024", 10) / 2,
|
||||
},
|
||||
});
|
||||
const promises = [];
|
||||
let allTestsPassed = true;
|
||||
|
||||
async function runPage(key) {
|
||||
var page;
|
||||
|
||||
try {
|
||||
console.log("Opening page");
|
||||
page = await browser.newPage();
|
||||
|
||||
console.log(`Navigating to "http://localhost:8080/"`);
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
await page.goto("http://localhost:8080/", { waitUntil: "load" });
|
||||
break;
|
||||
} catch (exception) {
|
||||
if (!exception.toString().includes("ERR_CONNECTION_REFUSED")) break;
|
||||
}
|
||||
}
|
||||
|
||||
await page.bringToFront();
|
||||
|
||||
await delay;
|
||||
|
||||
// runner.stdout.pipe(process.stdout);
|
||||
// runner.stderr.pipe(process.stderr);
|
||||
var didResolve = false;
|
||||
|
||||
console.log(`Completed. Done.`);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
await page.close();
|
||||
await browser.close();
|
||||
}
|
||||
}
|
||||
|
||||
return runPage();
|
||||
}
|
||||
|
||||
main().catch((error) =>
|
||||
setTimeout(() => {
|
||||
throw error;
|
||||
})
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=16 PROJECT=bun node read-frames.js
|
||||
bun
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 22.2ms
|
||||
75th percentile: 23.9ms
|
||||
90th percentile: 25.3ms
|
||||
95th percentile: 43.6ms
|
||||
99th percentile: 49.1ms
|
||||
Rendered frames: 922 / 1024 (90%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=24 PROJECT=bun node read-frames.js
|
||||
bun
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 33.4ms
|
||||
75th percentile: 34.5ms
|
||||
90th percentile: 35.8ms
|
||||
95th percentile: 65.5ms
|
||||
99th percentile: 87.9ms
|
||||
Rendered frames: 937 / 1024 (92%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=32 PROJECT=bun node read-frames.js
|
||||
bun
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 40.7ms
|
||||
75th percentile: 42.3ms
|
||||
90th percentile: 43.5ms
|
||||
95th percentile: 76.4ms
|
||||
99th percentile: 118.8ms
|
||||
Rendered frames: 958 / 1024 (94%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=8 PROJECT=bun node read-frames.js
|
||||
bun
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 20ms
|
||||
75th percentile: 24.4ms
|
||||
90th percentile: 41ms
|
||||
95th percentile: 53.9ms
|
||||
99th percentile: 90.4ms
|
||||
Rendered frames: 475 / 1024 (46%)
|
||||
@@ -0,0 +1,218 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub const Counter = extern struct {
|
||||
timestamp: usize,
|
||||
percent: f64,
|
||||
rotate: u32,
|
||||
color_values: [8 * 3]u32,
|
||||
};
|
||||
|
||||
const RUN_COUNT = 1024;
|
||||
|
||||
var counters: [RUN_COUNT]Counter = undefined;
|
||||
|
||||
pub const Blob = extern struct {
|
||||
run_count: u32,
|
||||
interval: u64,
|
||||
};
|
||||
|
||||
pub var all_timestamps: [RUN_COUNT + 1]usize = undefined;
|
||||
|
||||
// usage:
|
||||
// ./file-path:0 10
|
||||
// 1 2 3
|
||||
|
||||
// 1. file path
|
||||
// 2. Byte offset in file
|
||||
// 3. ms update interval
|
||||
var color_buf: [8096 + SIMULATE_LONG_FILE.len]u8 = undefined;
|
||||
|
||||
pub fn main() anyerror!void {
|
||||
var allocator = std.heap.c_allocator;
|
||||
var timer = try std.time.Timer.start();
|
||||
|
||||
var args = std.mem.span(try std.process.argsAlloc(allocator));
|
||||
|
||||
var basepath_with_colon: []u8 = args[args.len - 2];
|
||||
var basepath: []u8 = "";
|
||||
var position_str: []u8 = "";
|
||||
if (std.mem.lastIndexOfScalar(u8, basepath_with_colon, ':')) |colon| {
|
||||
basepath = basepath_with_colon[0..colon];
|
||||
position_str = basepath_with_colon[colon + 1 ..];
|
||||
}
|
||||
var position = try std.fmt.parseInt(u32, position_str, 10);
|
||||
const filepath = try std.fs.path.resolve(allocator, &.{basepath});
|
||||
var file = try std.fs.openFileAbsolute(filepath, .{ .write = true });
|
||||
var ms = @truncate(u64, (try std.fmt.parseInt(u128, args[args.len - 1], 10)) * std.time.ns_per_ms);
|
||||
std.debug.assert(ms > 0);
|
||||
// std.debug.assert(std.math.isFinite(position));
|
||||
var prng = std.rand.DefaultPrng.init(0);
|
||||
var stdout = std.io.getStdOut();
|
||||
var log = stdout.writer();
|
||||
var colors = std.mem.zeroes([4][3]u32);
|
||||
var progress_bar: f64 = 0.0;
|
||||
var destination_count: f64 = 18.0;
|
||||
|
||||
// Randomize initial colors
|
||||
colors[0][0] = prng.random.int(u32);
|
||||
colors[0][1] = prng.random.int(u32);
|
||||
colors[0][2] = prng.random.int(u32);
|
||||
|
||||
colors[1][0] = prng.random.int(u32);
|
||||
colors[1][1] = prng.random.int(u32);
|
||||
colors[1][2] = prng.random.int(u32);
|
||||
|
||||
colors[2][0] = prng.random.int(u32);
|
||||
colors[2][1] = prng.random.int(u32);
|
||||
colors[2][2] = prng.random.int(u32);
|
||||
|
||||
colors[3][0] = prng.random.int(u32);
|
||||
colors[3][1] = prng.random.int(u32);
|
||||
colors[3][2] = prng.random.int(u32);
|
||||
var rotate: u32 = 0;
|
||||
var counter: usize = 0;
|
||||
const video = std.fmt.allocPrint(allocator, "{s}.mov", .{filepath}) catch unreachable;
|
||||
std.fs.deleteFileAbsolute(video) catch {};
|
||||
var screen_recorder_argv = [_][]const u8{ "screencapture", "-v", video };
|
||||
|
||||
var recorder = try std.ChildProcess.init(&screen_recorder_argv, allocator);
|
||||
recorder.stdin_behavior = .Pipe;
|
||||
try recorder.spawn();
|
||||
std.time.sleep(std.time.ns_per_s);
|
||||
var wrote: []u8 = undefined;
|
||||
while (counter < RUN_COUNT) {
|
||||
colors[0][0] += 1;
|
||||
colors[0][1] += 1;
|
||||
colors[0][2] += 1;
|
||||
colors[1][0] += 1;
|
||||
colors[1][1] += 1;
|
||||
colors[1][2] += 1;
|
||||
colors[2][0] += 1;
|
||||
colors[2][1] += 1;
|
||||
colors[2][2] += 1;
|
||||
colors[3][0] += 1;
|
||||
colors[3][1] += 1;
|
||||
colors[3][2] += 1;
|
||||
rotate += 1;
|
||||
const fmtd: []const u8 = comptime brk: {
|
||||
break :brk (
|
||||
\\
|
||||
\\import {{ Global }} from "@emotion/react";
|
||||
\\export function CSSInJSStyles() {{
|
||||
\\ return (
|
||||
\\ <Global
|
||||
\\ styles={{`
|
||||
\\:root {{
|
||||
\\ --timestamp: "{d}";
|
||||
\\ --interval: "{s}";
|
||||
\\ --progress-bar: {d}%;
|
||||
\\ --spinner-1-muted: rgb({d}, {d}, {d});
|
||||
\\ --spinner-1-primary: rgb({d}, {d}, {d});
|
||||
\\ --spinner-2-muted: rgb({d}, {d}, {d});
|
||||
\\ --spinner-2-primary: rgb({d}, {d}, {d});
|
||||
\\ --spinner-3-muted: rgb({d}, {d}, {d});
|
||||
\\ --spinner-3-primary: rgb({d}, {d}, {d});
|
||||
\\ --spinner-4-muted: rgb({d}, {d}, {d});
|
||||
\\ --spinner-4-primary: rgb({d}, {d}, {d});
|
||||
\\ --spinner-rotate: {d}deg;
|
||||
\\}}
|
||||
++ SIMULATE_LONG_FILE ++
|
||||
\\ `}}
|
||||
\\ />
|
||||
\\ );
|
||||
\\}}
|
||||
\\
|
||||
);
|
||||
};
|
||||
|
||||
counters[counter].timestamp = @truncate(u64, @intCast(u128, std.time.nanoTimestamp()) / (std.time.ns_per_ms / 10));
|
||||
counters[counter].rotate = rotate % 360;
|
||||
counters[counter].percent = std.math.mod(f64, std.math.round(((progress_bar + 1.0) / destination_count) * 1000) / 1000, 100) catch 0;
|
||||
counters[counter].color_values[0] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[0][0] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[1] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[0][1] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[2] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[0][2] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[3] = (colors[0][0] + 1) % 256;
|
||||
counters[counter].color_values[4] = (colors[0][1] + 1) % 256;
|
||||
counters[counter].color_values[5] = (colors[0][2] + 1) % 256;
|
||||
counters[counter].color_values[6] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[1][0] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[7] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[1][1] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[8] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[1][2] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[9] = (colors[1][0] + 1) % 256;
|
||||
counters[counter].color_values[10] = (colors[1][1] + 1) % 256;
|
||||
counters[counter].color_values[11] = (colors[1][2] + 1) % 256;
|
||||
counters[counter].color_values[12] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[2][0] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[13] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[2][1] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[14] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[2][2] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[15] = (colors[2][0] + 1) % 256;
|
||||
counters[counter].color_values[16] = (colors[2][1] + 1) % 256;
|
||||
counters[counter].color_values[17] = (colors[2][2] + 1) % 256;
|
||||
counters[counter].color_values[18] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[3][0] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[19] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[3][1] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[20] = @floatToInt(u32, std.math.round(@intToFloat(f64, ((colors[3][2] + 1) % 256)) * 0.8));
|
||||
counters[counter].color_values[21] = (colors[3][0] + 1) % 256;
|
||||
counters[counter].color_values[22] = (colors[3][1] + 1) % 256;
|
||||
counters[counter].color_values[23] = (colors[3][2] + 1) % 256;
|
||||
|
||||
file = try std.fs.createFileAbsolute(filepath, .{ .truncate = true });
|
||||
wrote = try std.fmt.bufPrint(&color_buf, fmtd, .{
|
||||
counters[counter].timestamp,
|
||||
args[args.len - 1],
|
||||
counters[counter].percent,
|
||||
counters[counter].color_values[0],
|
||||
counters[counter].color_values[1],
|
||||
counters[counter].color_values[2],
|
||||
counters[counter].color_values[3],
|
||||
counters[counter].color_values[4],
|
||||
counters[counter].color_values[5],
|
||||
counters[counter].color_values[6],
|
||||
counters[counter].color_values[7],
|
||||
counters[counter].color_values[8],
|
||||
counters[counter].color_values[9],
|
||||
counters[counter].color_values[10],
|
||||
counters[counter].color_values[11],
|
||||
counters[counter].color_values[12],
|
||||
counters[counter].color_values[13],
|
||||
counters[counter].color_values[14],
|
||||
counters[counter].color_values[15],
|
||||
counters[counter].color_values[16],
|
||||
counters[counter].color_values[17],
|
||||
counters[counter].color_values[18],
|
||||
counters[counter].color_values[19],
|
||||
counters[counter].color_values[20],
|
||||
counters[counter].color_values[21],
|
||||
counters[counter].color_values[22],
|
||||
counters[counter].color_values[23],
|
||||
counters[counter].rotate,
|
||||
});
|
||||
progress_bar += 1.0;
|
||||
_ = try file.writeAll(wrote);
|
||||
|
||||
try log.print("[{d}] \"{s}\":{d}\n", .{
|
||||
std.time.nanoTimestamp(),
|
||||
filepath,
|
||||
position,
|
||||
});
|
||||
counter += 1;
|
||||
// If we don't close the file, Parcel seems to never recognize it
|
||||
file.close();
|
||||
std.time.sleep(ms);
|
||||
}
|
||||
|
||||
try recorder.stdin.?.writeAll(&[_]u8{ 3, ';' });
|
||||
|
||||
_ = try recorder.wait();
|
||||
|
||||
all_timestamps[0] = wrote.len;
|
||||
for (counters) |count, i| {
|
||||
all_timestamps[i + 1] = count.timestamp;
|
||||
}
|
||||
|
||||
std.time.sleep(std.time.ns_per_s);
|
||||
var blob_file = try std.fs.createFileAbsolute(std.fmt.allocPrint(std.heap.c_allocator, "{s}.blob", .{filepath}) catch unreachable, .{ .truncate = true });
|
||||
try blob_file.writeAll(std.mem.asBytes(&all_timestamps));
|
||||
blob_file.close();
|
||||
}
|
||||
|
||||
const SIMULATE_LONG_FILE =
|
||||
\\
|
||||
;
|
||||
7194
bench/hot-module-reloading/css-stress-test/color-looper.zig
Normal file
7194
bench/hot-module-reloading/css-stress-test/color-looper.zig
Normal file
File diff suppressed because it is too large
Load Diff
6
bench/hot-module-reloading/css-stress-test/next-env.d.ts
vendored
Normal file
6
bench/hot-module-reloading/css-stress-test/next-env.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
experimental: {
|
||||
swcLoader: true,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=16 PROJECT=next node read-frames.js
|
||||
next
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 312ms
|
||||
75th percentile: 337.6ms
|
||||
90th percentile: 387.7ms
|
||||
95th percentile: 446.9ms
|
||||
99th percentile: 591.7ms
|
||||
Rendered frames: 64 / 1024 (6%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=24 PROJECT=next node read-frames.js
|
||||
next
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 310.1ms
|
||||
75th percentile: 360.3ms
|
||||
90th percentile: 461.6ms
|
||||
95th percentile: 660.4ms
|
||||
99th percentile: 1009.9ms
|
||||
Rendered frames: 78 / 1024 (8%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=32 PROJECT=next node read-frames.js
|
||||
next
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 306.7ms
|
||||
75th percentile: 324.7ms
|
||||
90th percentile: 380ms
|
||||
95th percentile: 483.6ms
|
||||
99th percentile: 933.6ms
|
||||
Rendered frames: 116 / 1024 (11%)
|
||||
@@ -0,0 +1,11 @@
|
||||
SLEEP_INTERVAL=8 PROJECT=next node read-frames.js
|
||||
next
|
||||
--------------------------------------------------
|
||||
CSS HMR FRAME TIME
|
||||
|
||||
50th percentile: 320.4ms
|
||||
75th percentile: 368.8ms
|
||||
90th percentile: 527.2ms
|
||||
95th percentile: 532.4ms
|
||||
99th percentile: 532.4ms
|
||||
Rendered frames: 32 / 1024 (3%)
|
||||
@@ -3,17 +3,26 @@
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@emotion/css": "^11.1.3",
|
||||
"@emotion/core": "latest",
|
||||
"@emotion/css": "latest",
|
||||
"@emotion/react": "latest",
|
||||
"@vitejs/plugin-react-refresh": "^1.3.3",
|
||||
"antd": "^4.16.1",
|
||||
"bun-framework-next": "latest",
|
||||
"left-pad": "^1.3.0",
|
||||
"next": "^11.0.0",
|
||||
"next": "^12",
|
||||
"parcel": "2.0.0-beta.3",
|
||||
"path-browserify": "^1.0.1",
|
||||
"percentile": "^1.5.0",
|
||||
"puppeteer": "^10.4.0",
|
||||
"puppeteer-video-recorder": "^1.0.5",
|
||||
"react": "^17.0.2",
|
||||
"react-bootstrap": "^1.6.1",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-form": "^4.0.1",
|
||||
"react-hook-form": "^7.8.3"
|
||||
"react-hook-form": "^7.8.3",
|
||||
"url": "^0.11.0",
|
||||
"wipwipwipwip-next-donotuse": "4.0.0"
|
||||
},
|
||||
"parcel": "parceldist/index.js",
|
||||
"targets": {
|
||||
@@ -27,6 +36,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@snowpack/plugin-react-refresh": "^2.5.0",
|
||||
"typescript": "^4.3.4"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import "../src/font.css";
|
||||
import "../src/index.css";
|
||||
|
||||
import App from "next/app";
|
||||
|
||||
class MyApp extends App {
|
||||
12
bench/hot-module-reloading/css-stress-test/pages/index.tsx
Normal file
12
bench/hot-module-reloading/css-stress-test/pages/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Main } from "src/main";
|
||||
export function IndexPage() {
|
||||
return (
|
||||
<Main
|
||||
productName={
|
||||
typeof location !== "undefined" ? location.search.substring(1) : ""
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default IndexPage;
|
||||
107
bench/hot-module-reloading/css-stress-test/read-frames.js
Normal file
107
bench/hot-module-reloading/css-stress-test/read-frames.js
Normal file
@@ -0,0 +1,107 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const path = require("path");
|
||||
const PROJECT = process.env.PROJECT || "bun";
|
||||
const percentile = require("percentile");
|
||||
const PACKAGE_NAME = process.env.PACKAGE_NAME;
|
||||
const label = `${PACKAGE_NAME}@${
|
||||
require(PACKAGE_NAME + "/package.json").version
|
||||
}`;
|
||||
|
||||
const BASEFOLDER = path.resolve(PROJECT);
|
||||
const OUTFILE = path.join(process.cwd(), process.env.OUTFILE);
|
||||
|
||||
const buf = fs.readFileSync(BASEFOLDER + "/colors.css.blob");
|
||||
const VALID_TIMES = new BigUint64Array(buf.buffer).subarray(1);
|
||||
const cssFileSize = new BigUint64Array(buf.buffer)[0];
|
||||
|
||||
const TOTAL_FRAMES = VALID_TIMES.length;
|
||||
|
||||
const timings = fs
|
||||
.readFileSync(BASEFOLDER + "/frames.all.clean", "utf8")
|
||||
.split("\n")
|
||||
.map((a) => a.replace(/[Ran:'\.]?/gm, "").trim())
|
||||
.filter((a) => parseInt(a, 10))
|
||||
.filter((a) => a.length > 0 && VALID_TIMES.includes(BigInt(parseInt(a, 10))))
|
||||
.map((num) => BigInt(num));
|
||||
|
||||
timings.sort();
|
||||
|
||||
const frameTimesCount = timings.length;
|
||||
|
||||
var frameTime = new Array(Math.floor(frameTimesCount / 2));
|
||||
|
||||
for (let i = 0; i < frameTime.length; i++) {
|
||||
const i1 = i * 2;
|
||||
const i2 = i * 2 + 1;
|
||||
|
||||
frameTime[i] = Math.max(Number(timings[i2] - timings[i1]), 0);
|
||||
}
|
||||
|
||||
const report = {
|
||||
label,
|
||||
cssFileSize: Number(cssFileSize),
|
||||
at: new Date().toISOString(),
|
||||
sleep: process.env.SLEEP_INTERVAL,
|
||||
package: {
|
||||
name: PACKAGE_NAME,
|
||||
version: require(PACKAGE_NAME + "/package.json").version,
|
||||
},
|
||||
timestamps: timings.map((a) => Number(a)),
|
||||
frameTimes: frameTime,
|
||||
percentileMs: {
|
||||
50: percentile(50, frameTime) / 10,
|
||||
75: percentile(75, frameTime) / 10,
|
||||
90: percentile(90, frameTime) / 10,
|
||||
95: percentile(95, frameTime) / 10,
|
||||
99: percentile(99, frameTime) / 10,
|
||||
},
|
||||
};
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(
|
||||
path.dirname(OUTFILE),
|
||||
path.basename(OUTFILE) +
|
||||
"@" +
|
||||
report.package.version +
|
||||
"." +
|
||||
process.env.SLEEP_INTERVAL +
|
||||
"ms." +
|
||||
`${process.platform}-${
|
||||
process.arch === "arm64" ? "aarch64" : process.arch
|
||||
}` +
|
||||
".json"
|
||||
),
|
||||
JSON.stringify(report, null, 2)
|
||||
);
|
||||
|
||||
console.log(
|
||||
label + "\n",
|
||||
"-".repeat(50) + "\n",
|
||||
"CSS HMR FRAME TIME\n" + "\n",
|
||||
|
||||
"50th percentile:",
|
||||
percentile(50, frameTime) / 10 + "ms",
|
||||
"\n",
|
||||
"75th percentile:",
|
||||
percentile(75, frameTime) / 10 + "ms",
|
||||
"\n",
|
||||
"90th percentile:",
|
||||
percentile(90, frameTime) / 10 + "ms",
|
||||
"\n",
|
||||
"95th percentile:",
|
||||
percentile(95, frameTime) / 10 + "ms",
|
||||
"\n",
|
||||
"99th percentile:",
|
||||
percentile(99, frameTime) / 10 + "ms",
|
||||
"\n",
|
||||
"Rendered frames:",
|
||||
timings.length,
|
||||
"/",
|
||||
TOTAL_FRAMES,
|
||||
"(" +
|
||||
Math.round(
|
||||
Math.max(Math.min(1.0, timings.length / TOTAL_FRAMES), 0) * 100
|
||||
) +
|
||||
"%)"
|
||||
);
|
||||
83
bench/hot-module-reloading/css-stress-test/run.sh
Normal file
83
bench/hot-module-reloading/css-stress-test/run.sh
Normal file
@@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Running next at 24ms"
|
||||
PROJECT=next SLEEP_INTERVAL=24 make generate &
|
||||
PROJECT=next SLEEP_INTERVAL=24 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=next SLEEP_INTERVAL=24 make process_video
|
||||
PROJECT=next SLEEP_INTERVAL=24 make frames -j$(nproc)
|
||||
PROJECT=next SLEEP_INTERVAL=24 make trim
|
||||
cp src/colors.css.blob next/colors.css.blob
|
||||
PROJECT=next SLEEP_INTERVAL=24 make print > "next.latest.24ms.txt"
|
||||
|
||||
echo "Running bun at 24ms"
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make generate &
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make process_video
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make frames -j$(nproc)
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make trim
|
||||
cp src/colors.css.blob bun/colors.css.blob
|
||||
PROJECT=bun SLEEP_INTERVAL=24 make print > "bun.latest.24ms.txt"
|
||||
|
||||
echo "Running next at 16ms"
|
||||
PROJECT=next SLEEP_INTERVAL=16 make generate &
|
||||
PROJECT=next SLEEP_INTERVAL=16 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=next SLEEP_INTERVAL=16 make process_video
|
||||
PROJECT=next SLEEP_INTERVAL=16 make frames -j$(nproc)
|
||||
PROJECT=next SLEEP_INTERVAL=16 make trim
|
||||
cp src/colors.css.blob next/colors.css.blob
|
||||
PROJECT=next SLEEP_INTERVAL=16 make print > "next.latest.16ms.txt"
|
||||
|
||||
echo "Running bun at 16ms"
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make generate &
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make process_video
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make frames -j$(nproc)
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make trim
|
||||
cp src/colors.css.blob bun/colors.css.blob
|
||||
PROJECT=bun SLEEP_INTERVAL=16 make print > "bun.latest.16ms.txt"
|
||||
|
||||
echo "Running bun at 8ms"
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make generate &
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make process_video
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make frames -j$(nproc)
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make trim
|
||||
cp src/colors.css.blob bun/colors.css.blob
|
||||
PROJECT=bun SLEEP_INTERVAL=8 make print > "bun.latest.8ms.txt"
|
||||
|
||||
|
||||
echo "Running next at 8ms"
|
||||
PROJECT=next SLEEP_INTERVAL=8 make generate &
|
||||
PROJECT=next SLEEP_INTERVAL=8 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=next SLEEP_INTERVAL=8 make process_video
|
||||
PROJECT=next SLEEP_INTERVAL=8 make frames -j$(nproc)
|
||||
PROJECT=next SLEEP_INTERVAL=8 make trim
|
||||
cp src/colors.css.blob next/colors.css.blob
|
||||
PROJECT=next SLEEP_INTERVAL=8 make print > "next.latest.8ms.txt"
|
||||
|
||||
echo "Running bun at 32ms"
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make generate &
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make process_video
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make frames -j$(nproc)
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make trim
|
||||
cp src/colors.css.blob bun/colors.css.blob
|
||||
PROJECT=bun SLEEP_INTERVAL=32 make print > "bun.latest.32ms.txt"
|
||||
|
||||
echo "Running next at 32ms"
|
||||
PROJECT=next SLEEP_INTERVAL=32 make generate &
|
||||
PROJECT=next SLEEP_INTERVAL=32 make loop
|
||||
killall Chromium || echo "";
|
||||
PROJECT=next SLEEP_INTERVAL=32 make process_video
|
||||
PROJECT=next SLEEP_INTERVAL=32 make frames -j$(nproc)
|
||||
PROJECT=next SLEEP_INTERVAL=32 make trim
|
||||
cp src/colors.css.blob next/colors.css.blob
|
||||
PROJECT=next SLEEP_INTERVAL=32 make print > "next.latest.32ms.txt"
|
||||
|
||||
14
bench/hot-module-reloading/css-stress-test/src/colors.css.0
Normal file
14
bench/hot-module-reloading/css-stress-test/src/colors.css.0
Normal file
@@ -0,0 +1,14 @@
|
||||
:root {
|
||||
--timestamp: "0";
|
||||
--interval: "8";
|
||||
--progress-bar: 0%;
|
||||
--spinner-1-muted: rgb(179, 6, 202);
|
||||
--spinner-1-primary: rgb(224, 8, 253);
|
||||
--spinner-2-muted: rgb(22, 188, 124);
|
||||
--spinner-2-primary: rgb(27, 235, 155);
|
||||
--spinner-3-muted: rgb(89, 72, 0);
|
||||
--spinner-3-primary: rgb(111, 90, 0);
|
||||
--spinner-4-muted: rgb(18, 84, 202);
|
||||
--spinner-4-primary: rgb(23, 105, 253);
|
||||
--spinner-rotate: 304deg;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Global } from "@emotion/react";
|
||||
export function CSSInJSStyles() {
|
||||
return (
|
||||
<Global
|
||||
styles={`
|
||||
:root {
|
||||
--timestamp: "0";
|
||||
--interval: "8";
|
||||
--progress-bar: 11.83299999999997%;
|
||||
--spinner-1-muted: rgb(142, 6, 182);
|
||||
--spinner-1-primary: rgb(177, 8, 227);
|
||||
--spinner-2-muted: rgb(110, 148, 190);
|
||||
--spinner-2-primary: rgb(138, 185, 238);
|
||||
--spinner-3-muted: rgb(75, 45, 64);
|
||||
--spinner-3-primary: rgb(94, 56, 80);
|
||||
--spinner-4-muted: rgb(155, 129, 108);
|
||||
--spinner-4-primary: rgb(194, 161, 135);
|
||||
--spinner-rotate: 213deg;
|
||||
}
|
||||
`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
import { Global } from "@emotion/react";
|
||||
export function CSSInJSStyles() {
|
||||
return (
|
||||
<Global
|
||||
styles={`
|
||||
:root {
|
||||
--timestamp: "16336621338281";
|
||||
--interval: "16";
|
||||
--progress-bar: 56.889%;
|
||||
--spinner-1-muted: rgb(179, 6, 202);
|
||||
--spinner-1-primary: rgb(224, 8, 253);
|
||||
--spinner-2-muted: rgb(22, 188, 124);
|
||||
--spinner-2-primary: rgb(27, 235, 155);
|
||||
--spinner-3-muted: rgb(89, 72, 0);
|
||||
--spinner-3-primary: rgb(111, 90, 0);
|
||||
--spinner-4-muted: rgb(18, 84, 202);
|
||||
--spinner-4-primary: rgb(23, 105, 253);
|
||||
--spinner-rotate: 304deg;
|
||||
} `}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -112,15 +112,26 @@ section {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ran,
|
||||
.timer {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
-webkit-text-stroke: white;
|
||||
-webkit-text-stroke-width: 2px;
|
||||
color: white;
|
||||
font-size: 100px;
|
||||
}
|
||||
.ran {
|
||||
}
|
||||
|
||||
.ProgressBar-container {
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
border: 1px solid var(--color-brand-muted);
|
||||
border-left: 10px solid red;
|
||||
border-right: 10px solid pink;
|
||||
border-top: 10px solid yellow;
|
||||
border-bottom: 10px solid orange;
|
||||
border-radius: 4px;
|
||||
|
||||
height: 92px;
|
||||
@@ -163,6 +174,7 @@ section {
|
||||
}
|
||||
|
||||
.highlight {
|
||||
margin-left: 0.5ch;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,25 @@
|
||||
import ReactDOMServer from "react-dom/server.browser";
|
||||
|
||||
import { Main } from "./main";
|
||||
import classNames from "classnames";
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
const Base = ({}) => {
|
||||
const name =
|
||||
typeof location !== "undefined"
|
||||
? decodeURIComponent(location.search.substring(1))
|
||||
: null;
|
||||
return <Main productName={name || "Bundler"} />;
|
||||
return <Main productName={name} />;
|
||||
};
|
||||
|
||||
function startReact() {
|
||||
const ReactDOM = require("react-dom");
|
||||
ReactDOM.render(<Base />, document.querySelector("#reactroot"));
|
||||
}
|
||||
|
||||
function ssr() {
|
||||
console.log(ReactDOMServer.renderToString(<Base />));
|
||||
ReactDOM.hydrate(<Base />, document.querySelector("#reactroot"));
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
console.log("HERE!!");
|
||||
globalThis.addEventListener("DOMContentLoaded", () => {
|
||||
startReact();
|
||||
});
|
||||
|
||||
startReact();
|
||||
} else {
|
||||
ssr();
|
||||
}
|
||||
|
||||
export { Base };
|
||||
@@ -1,18 +1,18 @@
|
||||
export const Main = ({ productName }) => {
|
||||
export const Main = ({ productName, cssInJS }) => {
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
<div className="Title">CSS HMR Stress Test</div>
|
||||
<div className="Title">CSS HMR Stress Test!</div>
|
||||
<p className="Description">
|
||||
This page visually tests how quickly a bundler can update CSS over Hot
|
||||
Module Reloading.
|
||||
This page visually tests how quickly a bundler can update{" "}
|
||||
{cssInJS ? "CSS-in-JS" : "CSS"} over Hot Module Reloading.
|
||||
</p>
|
||||
</header>
|
||||
<main className="main">
|
||||
<section className="ProgressSection">
|
||||
<p className="Subtitle">
|
||||
<span className="Subtitle-part">
|
||||
Ran: <span className="timer"></span>
|
||||
<span className="Subtitle-part ran">
|
||||
Ran: <span className="timer"></span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@@ -55,10 +55,7 @@ export const Main = ({ productName }) => {
|
||||
<div className="Bundler-container">
|
||||
<div className="Bundler">{productName}</div>
|
||||
<div className="Bundler-updateRate">
|
||||
Saving a css file every
|
||||
<span className="highlight">
|
||||
<span className="interval"></span>ms
|
||||
</span>
|
||||
{cssInJS ? "CSS-in-JS framework: " + cssInJS : ""}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,292 @@
|
||||
{
|
||||
"label": "bun-cli@0.0.34",
|
||||
"at": "2021-10-08T01:01:18.129Z",
|
||||
"sleep": "32",
|
||||
"package": {
|
||||
"name": "bun-cli",
|
||||
"version": "0.0.34"
|
||||
},
|
||||
"timestamps": [
|
||||
16336202536562, 16336202536908, 16336202537294, 16336202537705,
|
||||
16336202538114, 16336202538534, 16336202538941, 16336202539323,
|
||||
16336202539742, 16336202540159, 16336202540877, 16336202541310,
|
||||
16336202541749, 16336202542159, 16336202542565, 16336202542996,
|
||||
16336202543333, 16336202543761, 16336202544159, 16336202544534,
|
||||
16336202544944, 16336202545345, 16336202545744, 16336202546159,
|
||||
16336202546573, 16336202546986, 16336202547399, 16336202547781,
|
||||
16336202548202, 16336202548564, 16336202548949, 16336202549329,
|
||||
16336202549762, 16336202550168, 16336202550534, 16336202550887,
|
||||
16336202551305, 16336202551659, 16336202552060, 16336202552449,
|
||||
16336202552854, 16336202553270, 16336202553609, 16336202554034,
|
||||
16336202554437, 16336202554783, 16336202555191, 16336202555623,
|
||||
16336202556034, 16336202556449, 16336202556890, 16336202557283,
|
||||
16336202557669, 16336202558084, 16336202558496, 16336202558863,
|
||||
16336202559271, 16336202559659, 16336202560051, 16336202560452,
|
||||
16336202560873, 16336202561290, 16336202561659, 16336202562035,
|
||||
16336202562440, 16336202562862, 16336202563284, 16336202563659,
|
||||
16336202564034, 16336202564444, 16336202564853, 16336202565245,
|
||||
16336202565659, 16336202566034, 16336202566455, 16336202566873,
|
||||
16336202567284, 16336202567659, 16336202568034, 16336202568386,
|
||||
16336202568790, 16336202569204, 16336202569620, 16336202570384,
|
||||
16336202570768, 16336202571188, 16336202571551, 16336202572327,
|
||||
16336202572717, 16336202573116, 16336202573541, 16336202573959,
|
||||
16336202574319, 16336202574682, 16336202575040, 16336202575375,
|
||||
16336202577001, 16336202577342, 16336202577680, 16336202578066,
|
||||
16336202578451, 16336202579166, 16336202579534, 16336202579960,
|
||||
16336202580370, 16336202580789, 16336202581159, 16336202581576,
|
||||
16336202581949, 16336202582294, 16336202583087, 16336202583496,
|
||||
16336202583858, 16336202584203, 16336202584606, 16336202585034,
|
||||
16336202585386, 16336202585788, 16336202586211, 16336202586604,
|
||||
16336202587034, 16336202587459, 16336202587869, 16336202588295,
|
||||
16336202588668, 16336202589092, 16336202589452, 16336202589831,
|
||||
16336202590197, 16336202590608, 16336202591034, 16336202591460,
|
||||
16336202591880, 16336202592295, 16336202592727, 16336202593172,
|
||||
16336202593567, 16336202593994, 16336202594397, 16336202594795,
|
||||
16336202595224, 16336202595659, 16336202596058, 16336202596463,
|
||||
16336202596890, 16336202597322, 16336202597732, 16336202598159,
|
||||
16336202598534, 16336202598951, 16336202599365, 16336202599785,
|
||||
16336202600159, 16336202600593, 16336202601005, 16336202601402,
|
||||
16336202601807, 16336202602214, 16336202602556, 16336202602895,
|
||||
16336202603307, 16336202603661, 16336202604075, 16336202604491,
|
||||
16336202604853, 16336202605268, 16336202605670, 16336202606034,
|
||||
16336202606393, 16336202606748, 16336202607170, 16336202607568,
|
||||
16336202607982, 16336202608411, 16336202608836, 16336202609197,
|
||||
16336202609596, 16336202609965, 16336202610333, 16336202610740,
|
||||
16336202611159, 16336202611573, 16336202611975, 16336202612317,
|
||||
16336202612691, 16336202613060, 16336202613474, 16336202613903,
|
||||
16336202614341, 16336202614707, 16336202615094, 16336202615534,
|
||||
16336202615883, 16336202616296, 16336202616671, 16336202617034,
|
||||
16336202617391, 16336202617727, 16336202618159, 16336202618534,
|
||||
16336202618937, 16336202619360, 16336202619770, 16336202620179,
|
||||
16336202620716, 16336202621143, 16336202621534, 16336202622303,
|
||||
16336202622659, 16336202623085, 16336202623498, 16336202623850,
|
||||
16336202624220, 16336202624606, 16336202625034, 16336202625387,
|
||||
16336202625805, 16336202626210, 16336202626599, 16336202627034,
|
||||
16336202627386, 16336202627748, 16336202628159, 16336202628534,
|
||||
16336202628954, 16336202629373, 16336202629809, 16336202630197,
|
||||
16336202630535, 16336202630916, 16336202631290, 16336202631666,
|
||||
16336202632034, 16336202632369, 16336202633152, 16336202633534,
|
||||
16336202633883, 16336202634309, 16336202634717, 16336202635106,
|
||||
16336202635871, 16336202636253, 16336202636671, 16336202637070,
|
||||
16336202637434, 16336202637798, 16336202638184, 16336202638539,
|
||||
16336202638938, 16336202639307, 16336202639666, 16336202640095,
|
||||
16336202640534, 16336202640962, 16336202641307, 16336202641659,
|
||||
16336202642087, 16336202642521, 16336202642886, 16336202643309,
|
||||
16336202643662, 16336202644067, 16336202644491, 16336202644853,
|
||||
16336202645226, 16336202645659, 16336202646074, 16336202646497,
|
||||
16336202646890, 16336202647311, 16336202647749, 16336202648169,
|
||||
16336202648976, 16336202649378, 16336202649810, 16336202650165,
|
||||
16336202650534, 16336202650875, 16336202651250, 16336202651659,
|
||||
16336202652093, 16336202652516, 16336202652921, 16336202653332,
|
||||
16336202653722, 16336202654142, 16336202654534, 16336202654880,
|
||||
16336202655221, 16336202655562, 16336202655997, 16336202656378,
|
||||
16336202656811, 16336202657161, 16336202657588, 16336202657944,
|
||||
16336202658360, 16336202658708, 16336202659089, 16336202659428,
|
||||
16336202659849, 16336202660273, 16336202660685, 16336202661105,
|
||||
16336202661534, 16336202661873, 16336202662228, 16336202662658,
|
||||
16336202663438, 16336202663843, 16336202664219, 16336202664646,
|
||||
16336202665050, 16336202665487, 16336202665838, 16336202666211,
|
||||
16336202666573, 16336202666927, 16336202667334, 16336202667746,
|
||||
16336202668158, 16336202668563, 16336202668980, 16336202669406,
|
||||
16336202669753, 16336202670192, 16336202670554, 16336202670903,
|
||||
16336202671324, 16336202671734, 16336202672159, 16336202672573,
|
||||
16336202672982, 16336202673346, 16336202673680, 16336202674087,
|
||||
16336202674499, 16336202674909, 16336202675260, 16336202676110,
|
||||
16336202676535, 16336202676913, 16336202677312, 16336202677658,
|
||||
16336202678044, 16336202678413, 16336202678793, 16336202679208,
|
||||
16336202679604, 16336202680034, 16336202680385, 16336202680799,
|
||||
16336202681213, 16336202681595, 16336202682004, 16336202682346,
|
||||
16336202682726, 16336202683158, 16336202683586, 16336202683990,
|
||||
16336202684323, 16336202684742, 16336202685175, 16336202685578,
|
||||
16336202685979, 16336202686805, 16336202687206, 16336202687614,
|
||||
16336202688038, 16336202688473, 16336202688848, 16336202689221,
|
||||
16336202689559, 16336202689971, 16336202690368, 16336202690776,
|
||||
16336202691159, 16336202691585, 16336202692010, 16336202692373,
|
||||
16336202692780, 16336202693179, 16336202693580, 16336202693991,
|
||||
16336202694324, 16336202694727, 16336202695159, 16336202695588,
|
||||
16336202695991, 16336202696335, 16336202697160, 16336202697542,
|
||||
16336202697929, 16336202698323, 16336202698674, 16336202699060,
|
||||
16336202699492, 16336202699835, 16336202700238, 16336202700658,
|
||||
16336202701059, 16336202701420, 16336202701815, 16336202702229,
|
||||
16336202702659, 16336202703857, 16336202704256, 16336202704659,
|
||||
16336202705497, 16336202706309, 16336202706660, 16336202707085,
|
||||
16336202707511, 16336202707866, 16336202708210, 16336202708552,
|
||||
16336202708925, 16336202709287, 16336202709670, 16336202710045,
|
||||
16336202710402, 16336202710802, 16336202711167, 16336202711533,
|
||||
16336202712249, 16336202712660, 16336202713088, 16336202713519,
|
||||
16336202713936, 16336202714355, 16336202714740, 16336202715160,
|
||||
16336202715533, 16336202715878, 16336202716290, 16336202716708,
|
||||
16336202717102, 16336202718290, 16336202718699, 16336202719052,
|
||||
16336202719388, 16336202719808, 16336202720225, 16336202720659,
|
||||
16336202721052, 16336202721414, 16336202721828, 16336202722925,
|
||||
16336202723664, 16336202724063, 16336202724405, 16336202726003,
|
||||
16336202726736, 16336202727158, 16336202727543, 16336202727930,
|
||||
16336202728336, 16336202728703, 16336202729061, 16336202729483,
|
||||
16336202729832, 16336202730222, 16336202730659, 16336202731084,
|
||||
16336202731500, 16336202731911, 16336202732326, 16336202733158,
|
||||
16336202733585, 16336202734001, 16336202734691, 16336202735042,
|
||||
16336202735442, 16336202735863, 16336202736255, 16336202736671,
|
||||
16336202737043, 16336202737884, 16336202738671, 16336202739110,
|
||||
16336202739533, 16336202739886, 16336202740283, 16336202740706,
|
||||
16336202741143, 16336202741534, 16336202741942, 16336202742352,
|
||||
16336202742697, 16336202743103, 16336202743940, 16336202745172,
|
||||
16336202745542, 16336202745937, 16336202746339, 16336202746758,
|
||||
16336202747531, 16336202747877, 16336202748232, 16336202748658,
|
||||
16336202749055, 16336202749468, 16336202749859, 16336202750416,
|
||||
16336202750839, 16336202751178, 16336202751572, 16336202752002,
|
||||
16336202752419, 16336202753269, 16336202753678, 16336202754086,
|
||||
16336202754432, 16336202754835, 16336202755260, 16336202755683,
|
||||
16336202756059, 16336202756402, 16336202756837, 16336202758084,
|
||||
16336202758507, 16336202758879, 16336202759270, 16336202759674,
|
||||
16336202760044, 16336202760400, 16336202760801, 16336202761659,
|
||||
16336202762053, 16336202762397, 16336202763199, 16336202763547,
|
||||
16336202763948, 16336202764714, 16336202765113, 16336202765947,
|
||||
16336202766329, 16336202766664, 16336202767085, 16336202768233,
|
||||
16336202769056, 16336202769758, 16336202770178, 16336202770585,
|
||||
16336202770929, 16336202771325, 16336202772158, 16336202772594,
|
||||
16336202773033, 16336202773403, 16336202773801, 16336202774179,
|
||||
16336202774555, 16336202774989, 16336202775393, 16336202775809,
|
||||
16336202776209, 16336202776618, 16336202777033, 16336202777421,
|
||||
16336202777845, 16336202778246, 16336202778658, 16336202779055,
|
||||
16336202779411, 16336202779761, 16336202780175, 16336202780594,
|
||||
16336202781002, 16336202781848, 16336202782658, 16336202783033,
|
||||
16336202783857, 16336202784211, 16336202784557, 16336202784972,
|
||||
16336202785377, 16336202785810, 16336202786172, 16336202786934,
|
||||
16336202787343, 16336202787765, 16336202788201, 16336202788563,
|
||||
16336202788970, 16336202789329, 16336202789672, 16336202790055,
|
||||
16336202790456, 16336202790802, 16336202791580, 16336202791920,
|
||||
16336202792326, 16336202793158, 16336202793953, 16336202794368,
|
||||
16336202795187, 16336202795622, 16336202796033, 16336202796393,
|
||||
16336202796777, 16336202797173, 16336202797540, 16336202797975,
|
||||
16336202798317, 16336202798739, 16336202799158, 16336202799567,
|
||||
16336202799966, 16336202800378, 16336202800803, 16336202801232,
|
||||
16336202801658, 16336202802033, 16336202802374, 16336202802759,
|
||||
16336202803158, 16336202803533, 16336202803947, 16336202804354,
|
||||
16336202804729, 16336202805158, 16336202805534, 16336202805950,
|
||||
16336202806390, 16336202806805, 16336202807219, 16336202807643,
|
||||
16336202808033, 16336202808377, 16336202808790, 16336202809211,
|
||||
16336202809560, 16336202809920, 16336202810355, 16336202810758,
|
||||
16336202811187, 16336202811596, 16336202811943, 16336202812348,
|
||||
16336202812710, 16336202813060, 16336202813398, 16336202813791,
|
||||
16336202814158, 16336202814533, 16336202814878, 16336202815246,
|
||||
16336202815658, 16336202816079, 16336202816851, 16336202817202,
|
||||
16336202817540, 16336202817905, 16336202818244, 16336202818663,
|
||||
16336202819068, 16336202819418, 16336202819777, 16336202820193,
|
||||
16336202820599, 16336202821033, 16336202821395, 16336202821745,
|
||||
16336202822158, 16336202822590, 16336202822996, 16336202823396,
|
||||
16336202823804, 16336202824210, 16336202824581, 16336202824991,
|
||||
16336202825406, 16336202825806, 16336202826210, 16336202826598,
|
||||
16336202827033, 16336202827446, 16336202827839, 16336202828201,
|
||||
16336202828577, 16336202828968, 16336202829362, 16336202829709,
|
||||
16336202830096, 16336202830533, 16336202830917, 16336202831290,
|
||||
16336202831699, 16336202832035, 16336202832406, 16336202832804,
|
||||
16336202833200, 16336202833604, 16336202834033, 16336202834386,
|
||||
16336202834759, 16336202835190, 16336202835621, 16336202836033,
|
||||
16336202836405, 16336202837191, 16336202837613, 16336202838033,
|
||||
16336202838374, 16336202838798, 16336202839200, 16336202839603,
|
||||
16336202840034, 16336202840389, 16336202840783, 16336202841200,
|
||||
16336202841617, 16336202842034, 16336202842390, 16336202842737,
|
||||
16336202843158, 16336202843585, 16336202843923, 16336202844313,
|
||||
16336202844724, 16336202845158, 16336202845576, 16336202845939,
|
||||
16336202846368, 16336202846728, 16336202847158, 16336202847568,
|
||||
16336202847911, 16336202848291, 16336202848695, 16336202849103,
|
||||
16336202849533, 16336202849942, 16336202850368, 16336202850747,
|
||||
16336202851158, 16336202851549, 16336202851978, 16336202852383,
|
||||
16336202852725, 16336202853158, 16336202853554, 16336202853961,
|
||||
16336202854308, 16336202854704, 16336202855060, 16336202855418,
|
||||
16336202855776, 16336202856203, 16336202856617, 16336202857036,
|
||||
16336202857455, 16336202857884, 16336202858262, 16336202858658,
|
||||
16336202859071, 16336202859847, 16336202860237, 16336202860658,
|
||||
16336202861037, 16336202861452, 16336202861869, 16336202862218,
|
||||
16336202862590, 16336202863001, 16336202863422, 16336202863857,
|
||||
16336202864219, 16336202864658, 16336202865047, 16336202865404,
|
||||
16336202865789, 16336202866210, 16336202866624, 16336202867033,
|
||||
16336202867380, 16336202867797, 16336202868227, 16336202868658,
|
||||
16336202869083, 16336202869500, 16336202869906, 16336202870246,
|
||||
16336202870658, 16336202871086, 16336202871441, 16336202871820,
|
||||
16336202872204, 16336202872546, 16336202872943, 16336202873380,
|
||||
16336202873811, 16336202874213, 16336202874566, 16336202874918,
|
||||
16336202875261, 16336202875655, 16336202876047, 16336202876771,
|
||||
16336202877202, 16336202877612, 16336202878033, 16336202878412,
|
||||
16336202878846, 16336202879241, 16336202879658, 16336202880072,
|
||||
16336202880508, 16336202880901, 16336202881308, 16336202881725,
|
||||
16336202882158, 16336202882579, 16336202882945, 16336202883286,
|
||||
16336202883657, 16336202884048, 16336202884404, 16336202884752,
|
||||
16336202885158, 16336202885533, 16336202885938, 16336202886364,
|
||||
16336202886759, 16336202887175, 16336202887585, 16336202887929,
|
||||
16336202888345, 16336202888743, 16336202889157, 16336202889570,
|
||||
16336202889970, 16336202890382, 16336202890761, 16336202891187,
|
||||
16336202891600, 16336202892033, 16336202892454, 16336202892794,
|
||||
16336202893178, 16336202893533, 16336202893903, 16336202894264,
|
||||
16336202894668, 16336202895049, 16336202895400, 16336202895774,
|
||||
16336202896157, 16336202896537, 16336202896883, 16336202897232,
|
||||
16336202897658, 16336202898065, 16336202898493, 16336202898884,
|
||||
16336202899251, 16336202899673, 16336202900047, 16336202900467,
|
||||
16336202900883, 16336202901300, 16336202901676, 16336202902068,
|
||||
16336202902479, 16336202902902, 16336202903260, 16336202903675,
|
||||
16336202904094, 16336202904476, 16336202904824, 16336202905158,
|
||||
16336202905533, 16336202905934, 16336202906289, 16336202906717,
|
||||
16336202907158, 16336202907547, 16336202907904, 16336202908294,
|
||||
16336202908717, 16336202909157, 16336202909582, 16336202910005,
|
||||
16336202910399, 16336202910800, 16336202911220, 16336202911657,
|
||||
16336202912064, 16336202912405, 16336202912779, 16336202913158,
|
||||
16336202913553, 16336202913966, 16336202914376, 16336202914719,
|
||||
16336202915091, 16336202915515, 16336202915887, 16336202916293,
|
||||
16336202916649, 16336202917438, 16336202917869, 16336202918221,
|
||||
16336202919053, 16336202919425, 16336202919833, 16336202920234,
|
||||
16336202920658, 16336202921033, 16336202921433, 16336202921801,
|
||||
16336202922161, 16336202922589, 16336202923017, 16336202923418,
|
||||
16336202923804, 16336202924199, 16336202924593, 16336202925033,
|
||||
16336202925449, 16336202925818, 16336202926223, 16336202926662,
|
||||
16336202927431, 16336202927812, 16336202928227, 16336202928658,
|
||||
16336202929061, 16336202929473, 16336202929891, 16336202930241,
|
||||
16336202930657, 16336202931057, 16336202931396, 16336202931811,
|
||||
16336202932225, 16336202932657, 16336202933058, 16336202933445,
|
||||
16336202933790, 16336202934157, 16336202934562, 16336202934988,
|
||||
16336202935391, 16336202935777, 16336202936160, 16336202936562,
|
||||
16336202936986, 16336202937396, 16336202937751, 16336202938158,
|
||||
16336202938578, 16336202938985, 16336202939396, 16336202939752,
|
||||
16336202940157, 16336202940585
|
||||
],
|
||||
"frameTimes": [
|
||||
346, 411, 420, 382, 417, 433, 410, 431, 428, 375, 401, 415, 413, 382, 362,
|
||||
380, 406, 353, 354, 389, 416, 425, 346, 432, 415, 393, 415, 367, 388, 401,
|
||||
417, 376, 422, 375, 410, 392, 375, 418, 375, 352, 414, 764, 420, 776, 399,
|
||||
418, 363, 335, 341, 386, 715, 426, 419, 417, 345, 409, 345, 428, 402, 393,
|
||||
425, 426, 424, 379, 411, 426, 415, 445, 427, 398, 435, 405, 432, 427, 417,
|
||||
420, 434, 397, 407, 339, 354, 416, 415, 364, 355, 398, 429, 361, 369, 407,
|
||||
414, 342, 369, 429, 366, 440, 413, 363, 336, 375, 423, 409, 427, 769, 426,
|
||||
352, 386, 353, 405, 435, 362, 375, 419, 388, 381, 376, 335, 382, 426, 389,
|
||||
382, 399, 364, 355, 369, 429, 428, 352, 434, 423, 405, 362, 433, 423, 421,
|
||||
420, 402, 355, 341, 409, 423, 411, 420, 346, 341, 381, 350, 356, 348, 339,
|
||||
424, 420, 339, 430, 405, 427, 437, 373, 354, 412, 405, 426, 439, 349, 410,
|
||||
414, 364, 407, 410, 850, 378, 346, 369, 415, 430, 414, 382, 342, 432, 404,
|
||||
419, 403, 826, 408, 435, 373, 412, 408, 426, 363, 399, 411, 403, 429, 344,
|
||||
382, 394, 386, 343, 420, 361, 414, 1198, 403, 812, 425, 355, 342, 362, 375,
|
||||
400, 366, 411, 431, 419, 420, 345, 418, 1188, 353, 420, 434, 362, 1097, 399,
|
||||
1598, 422, 387, 367, 422, 390, 425, 411, 832, 416, 351, 421, 416, 841, 439,
|
||||
353, 423, 391, 410, 406, 1232, 395, 419, 346, 426, 413, 557, 339, 430, 850,
|
||||
408, 403, 423, 343, 1247, 372, 404, 356, 858, 344, 348, 766, 834, 335, 1148,
|
||||
702, 407, 396, 436, 370, 378, 434, 416, 409, 388, 401, 397, 350, 419, 846,
|
||||
375, 354, 415, 433, 762, 422, 362, 359, 383, 346, 340, 832, 415, 435, 360,
|
||||
396, 435, 422, 409, 412, 429, 375, 385, 375, 407, 429, 416, 415, 424, 344,
|
||||
421, 360, 403, 409, 405, 350, 393, 375, 368, 421, 351, 365, 419, 350, 416,
|
||||
434, 350, 432, 400, 406, 410, 400, 388, 413, 362, 391, 347, 437, 373, 336,
|
||||
398, 404, 353, 431, 412, 786, 420, 424, 403, 355, 417, 417, 347, 427, 390,
|
||||
434, 363, 360, 410, 380, 408, 409, 379, 391, 405, 433, 407, 396, 358, 427,
|
||||
419, 429, 396, 776, 421, 415, 349, 411, 435, 439, 357, 421, 409, 417, 431,
|
||||
417, 340, 428, 379, 342, 437, 402, 352, 394, 724, 410, 379, 395, 414, 393,
|
||||
417, 421, 341, 391, 348, 375, 426, 416, 344, 398, 413, 412, 426, 433, 340,
|
||||
355, 361, 381, 374, 380, 349, 407, 391, 422, 420, 417, 392, 423, 415, 382,
|
||||
334, 401, 428, 389, 390, 440, 423, 401, 437, 341, 379, 413, 343, 424, 406,
|
||||
789, 352, 372, 401, 375, 368, 428, 401, 395, 440, 369, 439, 381, 431, 412,
|
||||
350, 400, 415, 432, 387, 367, 426, 386, 402, 410, 407, 407, 356, 428
|
||||
],
|
||||
"percentileMs": {
|
||||
"50": 40.7,
|
||||
"75": 42.3,
|
||||
"90": 43.5,
|
||||
"95": 76.4,
|
||||
"99": 118.8
|
||||
}
|
||||
}
|
||||
6
bench/hot-module-reloading/css-stress-test/tsconfig.json
Normal file
6
bench/hot-module-reloading/css-stress-test/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {}
|
||||
}
|
||||
}
|
||||
15
bench/hot-module-reloading/readme.md
Normal file
15
bench/hot-module-reloading/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Benchmarking hot module reloading
|
||||
|
||||
## Methodology
|
||||
|
||||
How do you benchmark hot module reloading? What do you call "done" and what do you call "start"?
|
||||
|
||||
The answer for "done" is certainly not compilation time. Compilation time is one step.
|
||||
|
||||
I think the answer should be different depending on the type of content loaded.
|
||||
|
||||
For CSS, the answer should be "when the updated stylesheet was drawn on the screen"
|
||||
For JavaScript, the answer should be "when the rebuilt code completed execution such that any changes are applied"
|
||||
For images & assets, the answer should be "when the updated asset finished loading"
|
||||
|
||||
The start time should be defined as "the timestamp the filesystem set as the write time". As in, the time the developer pressed save in their editor.
|
||||
340
build.zig
340
build.zig
@@ -1,50 +1,101 @@
|
||||
const std = @import("std");
|
||||
const resolve_path = @import("./src/resolver/resolve_path.zig");
|
||||
|
||||
pub fn addPicoHTTP(step: *std.build.LibExeObjStep, dir: []const u8) void {
|
||||
pub fn addPicoHTTP(step: *std.build.LibExeObjStep, comptime with_obj: bool) void {
|
||||
const picohttp = step.addPackage(.{
|
||||
.name = "picohttp",
|
||||
.path = .{ .path = "src/deps/picohttp.zig" },
|
||||
});
|
||||
|
||||
step.addObjectFile(
|
||||
"src/deps/picohttpparser.o",
|
||||
);
|
||||
step.addIncludeDir("src/deps");
|
||||
|
||||
if (with_obj) {
|
||||
step.addObjectFile("src/deps/picohttpparser.o");
|
||||
}
|
||||
|
||||
// step.add("/Users/jarred/Code/WebKit/WebKitBuild/Release/lib/libWTF.a");
|
||||
|
||||
// ./Tools/Scripts/build-jsc --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON"
|
||||
// set -gx ICU_INCLUDE_DIRS "/usr/local/opt/icu4c/include"
|
||||
// homebrew-provided icu4c
|
||||
}
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
fn panicIfNotFound(comptime filepath: []const u8) []const u8 {
|
||||
var file = std.fs.cwd().openFile(filepath, .{ .read = true }) catch |err| {
|
||||
const linux_only = "\nOn Linux, you'll need to compile libiconv manually and copy the .a file into src/deps.";
|
||||
|
||||
std.debug.panic("error: {s} opening {s}. Please ensure you've downloaded git submodules, and ran `make vendor`, `make jsc`." ++ linux_only, .{ filepath, @errorName(err) });
|
||||
};
|
||||
file.close();
|
||||
|
||||
return filepath;
|
||||
}
|
||||
|
||||
var x64 = "x64";
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
var target = b.standardTargetOptions(.{});
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
var cwd_buf = [_]u8{0} ** 4096;
|
||||
var cwd = std.os.getcwd(&cwd_buf) catch unreachable;
|
||||
var cwd_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
|
||||
const cwd: []const u8 = b.pathFromRoot(".");
|
||||
var exe: *std.build.LibExeObjStep = undefined;
|
||||
|
||||
var output_dir_buf = std.mem.zeroes([4096]u8);
|
||||
var bin_label = if (mode == std.builtin.Mode.Debug) "/debug/" else "/";
|
||||
const output_dir = std.fmt.bufPrint(&output_dir_buf, "build{s}{s}-{s}", .{ bin_label, @tagName(target.getOs().tag), @tagName(target.getCpuArch()) }) catch unreachable;
|
||||
var bin_label = if (mode == std.builtin.Mode.Debug) "packages/debug-bun-" else "packages/bun-";
|
||||
|
||||
var triplet_buf: [64]u8 = undefined;
|
||||
var os_tagname = @tagName(target.getOs().tag);
|
||||
|
||||
const arch: std.Target.Cpu.Arch = target.getCpuArch();
|
||||
|
||||
if (std.mem.eql(u8, os_tagname, "macos")) {
|
||||
os_tagname = "darwin";
|
||||
if (arch.isAARCH64()) {
|
||||
target.os_version_min = std.build.Target.OsVersion{ .semver = .{ .major = 11, .minor = 0, .patch = 0 } };
|
||||
} else if (arch.isX86()) {
|
||||
target.os_version_min = std.build.Target.OsVersion{ .semver = .{ .major = 10, .minor = 14, .patch = 0 } };
|
||||
}
|
||||
}
|
||||
|
||||
std.mem.copy(
|
||||
u8,
|
||||
&triplet_buf,
|
||||
os_tagname,
|
||||
);
|
||||
var osname = triplet_buf[0..os_tagname.len];
|
||||
triplet_buf[osname.len] = '-';
|
||||
|
||||
std.mem.copy(u8, triplet_buf[osname.len + 1 ..], @tagName(target.getCpuArch()));
|
||||
var cpuArchName = triplet_buf[osname.len + 1 ..][0..@tagName(target.getCpuArch()).len];
|
||||
std.mem.replaceScalar(u8, cpuArchName, '_', '-');
|
||||
if (std.mem.eql(u8, cpuArchName, "x86-64")) {
|
||||
std.mem.copy(u8, cpuArchName, "x64");
|
||||
cpuArchName = cpuArchName[0..3];
|
||||
}
|
||||
|
||||
var triplet = triplet_buf[0 .. osname.len + cpuArchName.len + 1];
|
||||
|
||||
const output_dir_base = try std.fmt.bufPrint(&output_dir_buf, "{s}{s}", .{ bin_label, triplet });
|
||||
const output_dir = b.pathFromRoot(output_dir_base);
|
||||
const bun_executable_name = if (mode == std.builtin.Mode.Debug) "bun-debug" else "bun";
|
||||
|
||||
if (target.getOsTag() == .wasi) {
|
||||
exe.enable_wasmtime = true;
|
||||
exe = b.addExecutable("esdev", "src/main_wasi.zig");
|
||||
exe = b.addExecutable(bun_executable_name, "src/main_wasi.zig");
|
||||
exe.linkage = .dynamic;
|
||||
exe.setOutputDir(output_dir);
|
||||
} else if (target.getCpuArch().isWasm()) {
|
||||
// exe = b.addExecutable(
|
||||
// "esdev",
|
||||
// "bun",
|
||||
// "src/main_wasm.zig",
|
||||
// );
|
||||
// exe.is_linking_libc = false;
|
||||
// exe.is_dynamic = true;
|
||||
var lib = b.addExecutable("esdev", "src/main_wasm.zig");
|
||||
var lib = b.addExecutable(bun_executable_name, "src/main_wasm.zig");
|
||||
lib.single_threaded = true;
|
||||
// exe.want_lto = true;
|
||||
// exe.linkLibrary(lib);
|
||||
@@ -68,7 +119,7 @@ pub fn build(b: *std.build.Builder) void {
|
||||
lib.setTarget(target);
|
||||
lib.setBuildMode(mode);
|
||||
|
||||
std.fs.deleteTreeAbsolute(std.fs.path.join(std.heap.page_allocator, &.{ cwd, lib.getOutputSource().getPath(b) }) catch unreachable) catch {};
|
||||
std.fs.deleteTreeAbsolute(std.fs.path.join(b.allocator, &.{ cwd, lib.getOutputSource().getPath(b) }) catch unreachable) catch {};
|
||||
var install = b.getInstallStep();
|
||||
lib.strip = false;
|
||||
lib.install();
|
||||
@@ -84,7 +135,7 @@ pub fn build(b: *std.build.Builder) void {
|
||||
|
||||
return;
|
||||
} else {
|
||||
exe = b.addExecutable("esdev", "src/main.zig");
|
||||
exe = b.addExecutable(bun_executable_name, "src/main.zig");
|
||||
}
|
||||
// exe.setLibCFile("libc.txt");
|
||||
exe.linkLibC();
|
||||
@@ -95,46 +146,224 @@ pub fn build(b: *std.build.Builder) void {
|
||||
});
|
||||
|
||||
exe.setOutputDir(output_dir);
|
||||
|
||||
var walker = std.fs.walkPath(std.heap.page_allocator, cwd) catch unreachable;
|
||||
if (std.builtin.is_test) {
|
||||
while (walker.next() catch unreachable) |entry| {
|
||||
if (std.mem.endsWith(u8, entry.basename, "_test.zig")) {
|
||||
std.debug.print("[test] Added {s}", .{entry.basename});
|
||||
_ = b.addTest(entry.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const runtime_hash = std.hash.Wyhash.hash(0, @embedFile("./src/runtime.out.js"));
|
||||
const runtime_version_file = std.fs.cwd().openFile("src/runtime.version", .{ .write = true }) catch unreachable;
|
||||
runtime_version_file.writer().print("{x}", .{runtime_hash}) catch unreachable;
|
||||
var cwd_dir = std.fs.cwd();
|
||||
var runtime_out_file = try std.fs.cwd().openFile("src/runtime.out.js", .{ .read = true });
|
||||
const runtime_hash = std.hash.Wyhash.hash(
|
||||
0,
|
||||
try runtime_out_file.readToEndAlloc(b.allocator, try runtime_out_file.getEndPos()),
|
||||
);
|
||||
const runtime_version_file = std.fs.cwd().createFile("src/runtime.version", .{ .truncate = true }) catch std.debug.panic("Failed to create src/runtime.version", .{});
|
||||
defer runtime_version_file.close();
|
||||
runtime_version_file.writer().print("{x}", .{runtime_hash}) catch unreachable;
|
||||
var fallback_out_file = try std.fs.cwd().openFile("src/fallback.out.js", .{ .read = true });
|
||||
const fallback_hash = std.hash.Wyhash.hash(
|
||||
0,
|
||||
try fallback_out_file.readToEndAlloc(b.allocator, try fallback_out_file.getEndPos()),
|
||||
);
|
||||
|
||||
const fallback_version_file = std.fs.cwd().createFile("src/fallback.version", .{ .truncate = true }) catch std.debug.panic("Failed to create src/fallback.version", .{});
|
||||
|
||||
fallback_version_file.writer().print("{x}", .{fallback_hash}) catch unreachable;
|
||||
|
||||
defer fallback_version_file.close();
|
||||
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
b.install_path = output_dir;
|
||||
|
||||
var javascript = b.addExecutable("spjs", "src/main_javascript.zig");
|
||||
var typings_exe = b.addExecutable("typescript-decls", "src/javascript/jsc/typescript.zig");
|
||||
javascript.setMainPkgPath(b.pathFromRoot("."));
|
||||
typings_exe.setMainPkgPath(b.pathFromRoot("."));
|
||||
exe.setMainPkgPath(b.pathFromRoot("."));
|
||||
|
||||
// exe.want_lto = true;
|
||||
if (!target.getCpuArch().isWasm()) {
|
||||
addPicoHTTP(exe, cwd);
|
||||
var javascript = b.addExecutable("spjs", "src/main_javascript.zig");
|
||||
javascript.packages = std.ArrayList(std.build.Pkg).fromOwnedSlice(std.heap.c_allocator, std.heap.c_allocator.dupe(std.build.Pkg, exe.packages.items) catch unreachable);
|
||||
javascript.setOutputDir(output_dir);
|
||||
javascript.setBuildMode(mode);
|
||||
javascript.linkLibC();
|
||||
// javascript.linkLibCpp();
|
||||
b.default_step.dependOn(&exe.step);
|
||||
|
||||
if (target.getOsTag() == .macos) {
|
||||
javascript.linkFramework("JavaScriptCore");
|
||||
exe.linkFramework("JavascriptCore");
|
||||
const bindings_dir = std.fs.path.join(
|
||||
b.allocator,
|
||||
&.{
|
||||
cwd,
|
||||
"src",
|
||||
"javascript",
|
||||
"jsc",
|
||||
"bindings-obj",
|
||||
},
|
||||
) catch unreachable;
|
||||
|
||||
var bindings_dir_ = cwd_dir.openDir(bindings_dir, .{ .iterate = true }) catch std.debug.panic("Error opening bindings directory. Please make sure you ran `make jsc`. {s} should exist", .{bindings_dir});
|
||||
var bindings_walker = bindings_dir_.walk(b.allocator) catch std.debug.panic("Error reading bindings directory {s}", .{bindings_dir});
|
||||
|
||||
var bindings_files = std.ArrayList([]const u8).init(b.allocator);
|
||||
|
||||
while (bindings_walker.next() catch unreachable) |entry| {
|
||||
if (std.mem.eql(u8, std.fs.path.extension(entry.basename), ".o")) {
|
||||
bindings_files.append(bindings_dir_.realpathAlloc(b.allocator, entry.path) catch unreachable) catch unreachable;
|
||||
}
|
||||
}
|
||||
|
||||
javascript.strip = false;
|
||||
javascript.install();
|
||||
// // References:
|
||||
// // - https://github.com/mceSystems/node-jsc/blob/master/deps/jscshim/webkit.gyp
|
||||
// // - https://github.com/mceSystems/node-jsc/blob/master/deps/jscshim/docs/webkit_fork_and_compilation.md#webkit-port-and-compilation
|
||||
// const flags = [_][]const u8{
|
||||
// "-Isrc/JavaScript/jsc/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders",
|
||||
// "-Isrc/JavaScript/jsc/WebKit/WebKitBuild/Release/WTF/Headers",
|
||||
// "-Isrc/javascript/jsc/WebKit/WebKitBuild/Release/ICU/Headers",
|
||||
// "-DSTATICALLY_LINKED_WITH_JavaScriptCore=1",
|
||||
// "-DSTATICALLY_LINKED_WITH_WTF=1",
|
||||
// "-DBUILDING_WITH_CMAKE=1",
|
||||
// "-DNOMINMAX",
|
||||
// "-DENABLE_INSPECTOR_ALTERNATE_DISPATCHERS=0",
|
||||
// "-DBUILDING_JSCONLY__",
|
||||
// "-DASSERT_ENABLED=0", // missing symbol errors like this will happen "JSC::DFG::DoesGCCheck::verifyCanGC(JSC::VM&)"
|
||||
// "-Isrc/JavaScript/jsc/WebKit/WebKitBuild/Release/", // config.h,
|
||||
// "-Isrc/JavaScript/jsc/bindings/",
|
||||
// "-Isrc/javascript/jsc/WebKit/Source/bmalloc",
|
||||
// "-std=gnu++17",
|
||||
// if (target.getOsTag() == .macos) "-DUSE_FOUNDATION=1" else "",
|
||||
// if (target.getOsTag() == .macos) "-DUSE_CF_RETAIN_PTR=1" else "",
|
||||
// };
|
||||
const headers_step = b.step("headers-obj", "JSC headers Step #1");
|
||||
var headers_obj: *std.build.LibExeObjStep = b.addObject("headers", "src/javascript/jsc/bindings/bindings-generator.zig");
|
||||
headers_obj.setMainPkgPath(javascript.main_pkg_path.?);
|
||||
headers_step.dependOn(&headers_obj.step);
|
||||
|
||||
{
|
||||
b.default_step.dependOn(&b.addLog(
|
||||
"Build {s} v{} - v{}",
|
||||
.{
|
||||
triplet,
|
||||
target.getOsVersionMin().semver,
|
||||
target.getOsVersionMax().semver,
|
||||
},
|
||||
).step);
|
||||
}
|
||||
b.default_step.dependOn(&exe.step);
|
||||
|
||||
{
|
||||
var steps = [_]*std.build.LibExeObjStep{ exe, javascript, typings_exe };
|
||||
|
||||
// const single_threaded = b.option(bool, "single-threaded", "Build single-threaded") orelse false;
|
||||
|
||||
for (steps) |step, i| {
|
||||
step.linkLibC();
|
||||
step.linkLibCpp();
|
||||
addPicoHTTP(
|
||||
step,
|
||||
true,
|
||||
);
|
||||
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libJavaScriptCore.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libWTF.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libcrypto.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libbmalloc.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libarchive.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libs2n.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/zlib/libz.a"));
|
||||
step.addObjectFile(panicIfNotFound("src/deps/mimalloc/libmimalloc.a"));
|
||||
step.addLibPath("src/deps/mimalloc");
|
||||
step.addIncludeDir("src/deps/mimalloc");
|
||||
|
||||
// step.single_threaded = single_threaded;
|
||||
|
||||
if (target.getOsTag() == .macos) {
|
||||
const homebrew_prefix = comptime if (std.Target.current.cpu.arch == .aarch64)
|
||||
"/opt/homebrew/"
|
||||
else
|
||||
"/usr/local/";
|
||||
|
||||
// We must link ICU statically
|
||||
step.addObjectFile(panicIfNotFound(homebrew_prefix ++ "opt/icu4c/lib/libicudata.a"));
|
||||
step.addObjectFile(panicIfNotFound(homebrew_prefix ++ "opt/icu4c/lib/libicui18n.a"));
|
||||
step.addObjectFile(panicIfNotFound(homebrew_prefix ++ "opt/icu4c/lib/libicuuc.a"));
|
||||
step.addObjectFile(panicIfNotFound(homebrew_prefix ++ "opt/libiconv/lib/libiconv.a"));
|
||||
|
||||
// icucore is a weird macOS only library
|
||||
step.linkSystemLibrary("icucore");
|
||||
step.addLibPath(panicIfNotFound(homebrew_prefix ++ "opt/icu4c/lib"));
|
||||
step.addIncludeDir(panicIfNotFound(homebrew_prefix ++ "opt/icu4c/include"));
|
||||
} else {
|
||||
step.linkSystemLibrary("icuuc");
|
||||
step.linkSystemLibrary("icudata");
|
||||
step.linkSystemLibrary("icui18n");
|
||||
step.addObjectFile(panicIfNotFound("src/deps/libiconv.a"));
|
||||
}
|
||||
|
||||
for (bindings_files.items) |binding| {
|
||||
step.addObjectFile(
|
||||
binding,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var obj_step = b.step("obj", "Build Bun as a .o file");
|
||||
var obj = b.addObject(bun_executable_name, exe.root_src.?.path);
|
||||
obj.setTarget(target);
|
||||
addPicoHTTP(obj, false);
|
||||
obj.addPackage(.{
|
||||
.name = "clap",
|
||||
.path = .{ .path = "src/deps/zig-clap/clap.zig" },
|
||||
});
|
||||
|
||||
{
|
||||
obj_step.dependOn(&b.addLog(
|
||||
"Build {s} v{} - v{}\n",
|
||||
.{
|
||||
triplet,
|
||||
obj.target.getOsVersionMin().semver,
|
||||
obj.target.getOsVersionMax().semver,
|
||||
},
|
||||
).step);
|
||||
}
|
||||
|
||||
obj_step.dependOn(&obj.step);
|
||||
|
||||
obj.setOutputDir(output_dir);
|
||||
obj.setBuildMode(mode);
|
||||
obj.linkLibC();
|
||||
obj.linkLibCpp();
|
||||
|
||||
obj.strip = false;
|
||||
obj.bundle_compiler_rt = true;
|
||||
|
||||
if (target.getOsTag() == .linux) {
|
||||
// obj.want_lto = tar;
|
||||
obj.link_emit_relocs = true;
|
||||
obj.link_function_sections = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
headers_obj.setTarget(target);
|
||||
headers_obj.addPackage(.{
|
||||
.name = "clap",
|
||||
.path = .{ .path = "src/deps/zig-clap/clap.zig" },
|
||||
});
|
||||
|
||||
headers_obj.setOutputDir(output_dir);
|
||||
headers_obj.setBuildMode(mode);
|
||||
headers_obj.linkLibC();
|
||||
headers_obj.linkLibCpp();
|
||||
headers_obj.bundle_compiler_rt = true;
|
||||
|
||||
if (target.getOsTag() == .linux) {
|
||||
// obj.want_lto = tar;
|
||||
headers_obj.link_emit_relocs = true;
|
||||
headers_obj.link_function_sections = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
b.default_step.dependOn(&exe.step);
|
||||
}
|
||||
|
||||
exe.install();
|
||||
javascript.strip = false;
|
||||
javascript.packages = std.ArrayList(std.build.Pkg).fromOwnedSlice(b.allocator, b.allocator.dupe(std.build.Pkg, exe.packages.items) catch unreachable);
|
||||
|
||||
javascript.setOutputDir(output_dir);
|
||||
javascript.setBuildMode(mode);
|
||||
|
||||
const run_cmd = exe.run();
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
@@ -145,5 +374,24 @@ pub fn build(b: *std.build.Builder) void {
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
std.debug.print("Build: ./{s}/{s}\n", .{ output_dir, "esdev" });
|
||||
var log_step = b.addLog("Destination: {s}/{s}\n", .{ output_dir, bun_executable_name });
|
||||
log_step.step.dependOn(&exe.step);
|
||||
|
||||
var typings_cmd: *std.build.RunStep = typings_exe.run();
|
||||
typings_cmd.cwd = cwd;
|
||||
typings_cmd.addArg(cwd);
|
||||
typings_cmd.addArg("types");
|
||||
typings_cmd.step.dependOn(&typings_exe.step);
|
||||
|
||||
typings_exe.linkLibC();
|
||||
typings_exe.linkLibCpp();
|
||||
typings_exe.setMainPkgPath(cwd);
|
||||
|
||||
var typings_step = b.step("types", "Build TypeScript types");
|
||||
typings_step.dependOn(&typings_cmd.step);
|
||||
|
||||
var javascript_cmd = b.step("spjs", "Build standalone JavaScript runtime. Must run \"make jsc\" first.");
|
||||
javascript_cmd.dependOn(&javascript.step);
|
||||
}
|
||||
|
||||
pub var original_make_fn: ?fn (step: *std.build.Step) anyerror!void = null;
|
||||
|
||||
8
completions/bun.bash
Normal file
8
completions/bun.bash
Normal file
@@ -0,0 +1,8 @@
|
||||
#/usr/bin/env bash
|
||||
|
||||
# This is not implemented yet.
|
||||
# But a PR implementing it would be very welcome!
|
||||
_bun_completions() {
|
||||
}
|
||||
|
||||
complete -F _bun_completions bun
|
||||
90
completions/bun.fish
Normal file
90
completions/bun.fish
Normal file
@@ -0,0 +1,90 @@
|
||||
function __fish__get_bun_bins
|
||||
string split ' ' (bun getcompletes b)
|
||||
end
|
||||
|
||||
function __fish__get_bun_scripts
|
||||
set -lx SHELL bash
|
||||
set -lx MAX_DESCRIPTION_LEN 40
|
||||
string trim (string split '\n' (string split '\t' (bun getcompletes z)))
|
||||
end
|
||||
|
||||
function __fish__get_bun_bun_js_files
|
||||
string split ' ' (bun getcompletes j)
|
||||
end
|
||||
|
||||
function bun_fish_is_nth_token --description 'Test if current token is on Nth place' --argument-names n
|
||||
set -l tokens (commandline -poc)
|
||||
set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)
|
||||
test (count $tokens) -eq "$n"
|
||||
end
|
||||
|
||||
function __bun_command_count --argument-names n
|
||||
set -l cmds (commandline -poc)
|
||||
|
||||
test (count cmds) -eq "$n"
|
||||
end
|
||||
|
||||
function __bun_last_cmd --argument-names n
|
||||
set -l cmds (commandline -poc)
|
||||
|
||||
test "(cmds[-1])" = "$n"
|
||||
end
|
||||
|
||||
set -l bun_builtin_cmds dev create help bun upgrade discord run
|
||||
set -l bun_builtin_cmds_without_run dev create help bun upgrade discord
|
||||
set -l bun_builtin_cmds_without_bun dev create help upgrade run discord
|
||||
set -l bun_builtin_cmds_without_create dev help bun upgrade discord run
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a '(__fish__get_bun_scripts)' -d 'script'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from run" -a '(__fish__get_bun_bins)' -d 'package bin'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from run" -a '(__fish__get_bun_scripts)' -d 'script'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_run; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from run" -a '(__fish__get_bun_bun_js_files)' -d 'Bun.js'
|
||||
complete -c bun \
|
||||
-n "bun_fish_is_nth_token 1; and not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts) and __fish_use_subcommand" -a 'run' -f -d 'Run a script or bin'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" --no-files -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" --no-files -s 'p' -l 'port' -r -d 'Port number to start server from'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" --no-files -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" --no-files -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react'
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts);" --no-files -l 'use' -r -d 'Use a framework (ex: next)'
|
||||
complete -c bun \
|
||||
-n "bun_fish_is_nth_token 1; and not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts) and __fish_use_subcommand" -a 'dev' -d 'Start dev server'
|
||||
complete -c bun \
|
||||
-n "bun_fish_is_nth_token 1; and not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts) and __bun_command_count 1 and __fish_use_subcommand" -a 'create' -f -d 'Create a new project'
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create next react; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from create;" -a 'next' -d 'new Next.js project'
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create next react; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from create;" -a 'react' -d 'new React project'
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a 'upgrade' -d 'Upgrade Bun to the latest version' -x
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a '--help' -d 'See all commands and flags' -x
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -l "version" -s "v" -a '--version' -d 'Bun\'s version' -x
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_use_subcommand" -a 'discord' -d 'Open Bun\'s Discord server' -x
|
||||
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_bun; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); __fish_use_subcommand" -a 'bun' -d 'Generate a new bundle'
|
||||
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_bun; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from bun" -F -d 'Bundle this'
|
||||
|
||||
complete -c bun \
|
||||
-n "not __fish_seen_subcommand_from $bun_builtin_cmds_without_create; and not __fish_seen_subcommand_from (__fish__get_bun_bins); and not __fish_seen_subcommand_from (__fish__get_bun_scripts); and __fish_seen_subcommand_from react; or __fish_seen_subcommand_from next" -F -d "Create in directory"
|
||||
|
||||
complete -c bun --no-files
|
||||
368
completions/bun.zsh
Normal file
368
completions/bun.zsh
Normal file
@@ -0,0 +1,368 @@
|
||||
_bun() {
|
||||
local program=bun
|
||||
typeset -A opt_args
|
||||
local curcontext="$curcontext" state line context
|
||||
|
||||
# ---- Command:
|
||||
_arguments -s \
|
||||
'1: :->cmd' \
|
||||
'*: :->args' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
cmd)
|
||||
local -a scripts_list
|
||||
IFS=$'\n' scripts_list=($(SHELL=zsh bun getcompletes i))
|
||||
compadd $scripts_list && ret=0
|
||||
|
||||
main_commands=('bun:"Generate a bundle" create:"Create a new project" dev:"Start a dev server" help:"Show command help" run:"Run a script or package bin" upgrade:"Upgrade to the latest version of Bun"')
|
||||
main_commands=($main_commands)
|
||||
_alternative "args:Bun:(($main_commands))"
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
bun)
|
||||
|
||||
# ---- Command: bun
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'*: :->file' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--use[Use a framework, e.g. "next"]:use' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
file)
|
||||
_files
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
create)
|
||||
|
||||
# ---- Command: create
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'*: :->args' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
cmd2)
|
||||
_alternative 'args:create:((next\:"Next.js app" react\:"React app"))'
|
||||
;;
|
||||
|
||||
args)
|
||||
case $line[2] in
|
||||
next)
|
||||
|
||||
# ---- Command: create next
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'3: :->file' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
file)
|
||||
_files
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
react)
|
||||
|
||||
# ---- Command: create react
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'3: :->file' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
file)
|
||||
_files
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
dev)
|
||||
|
||||
# ---- Command: dev
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--bunfile[Use a specific .bun file (default: node_modules.bun)]:bunfile' \
|
||||
'--origin[Rewrite import paths to start from a different url. Default: http://localhost:3000]:origin' \
|
||||
'-u[Rewrite import paths to start from a different url. Default: http://localhost:3000]:u' \
|
||||
'--server-bunfile[Use a specific .bun file for SSR in bun dev (default: node_modules.server.bun)]:server-bunfile' \
|
||||
'--extension-order[defaults to: .tsx,.ts,.jsx,.js,.json]:extension-order' \
|
||||
'--jsx-runtime[JSX runtime to use. Defaults to "automatic"]:jsx-runtime:("automatic" "classic")' \
|
||||
'--main-fields[Main fields to lookup in package.json. Defaults to --platform dependent]:main-fields' \
|
||||
'--disable-react-fast-refresh[Disable React Fast Refresh]' \
|
||||
'--disable-hmr[Disable Hot Module Reloading]' \
|
||||
'--jsx-factory[Changes the function called when compiling JSX elements using the classic JSX runtime]:jsx-factory' \
|
||||
'--jsx-fragment[Changes the function called when compiling JSX fragments]:jsx-fragment' \
|
||||
'--jsx-import-source[Declares the module specifier to be used for importing the jsx and jsxs factory functions. Default: "react"]:jsx-import-source' \
|
||||
'--port[Port number]:port' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
help)
|
||||
|
||||
# ---- Command: help
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'*: :->args' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
cmd2)
|
||||
_alternative 'args:cmd3:((bun create dev run upgrade))'
|
||||
;;
|
||||
|
||||
args)
|
||||
case $line[2] in
|
||||
bun)
|
||||
|
||||
# ---- Command: help bun
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
create)
|
||||
|
||||
# ---- Command: help create
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'3: :->cmd3' \
|
||||
'*: :->args' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
cmd3)
|
||||
_alternative 'args:create:((next react))'
|
||||
;;
|
||||
|
||||
args)
|
||||
case $line[3] in
|
||||
next)
|
||||
|
||||
# ---- Command: help create next
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'3: :->cmd3' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
react)
|
||||
|
||||
# ---- Command: help create react
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'3: :->cmd3' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
dev)
|
||||
|
||||
# ---- Command: help dev
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
run)
|
||||
|
||||
# ---- Command: help run
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
upgrade)
|
||||
|
||||
# ---- Command: help upgrade
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->cmd2' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--all[]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
run)
|
||||
|
||||
# ---- Command: run
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'2: :->script' \
|
||||
'*: :->other' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' \
|
||||
'--silent[Don'"'"'t echo the command]' &&
|
||||
ret=0
|
||||
|
||||
case $state in
|
||||
script)
|
||||
_bun_run_param_script_completion
|
||||
;;
|
||||
other)
|
||||
_files
|
||||
;;
|
||||
esac
|
||||
|
||||
;;
|
||||
upgrade)
|
||||
|
||||
# ---- Command: upgrade
|
||||
_arguments -s -C \
|
||||
'1: :->cmd' \
|
||||
'--version[Show version and exit]' \
|
||||
'-V[Show version and exit]' \
|
||||
'--cwd[Change directory]:cwd' \
|
||||
'--help[Show command help]' \
|
||||
'-h[Show command help]' &&
|
||||
ret=0
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
_bun_run_param_script_completion() {
|
||||
local -a scripts_list
|
||||
IFS=$'\n' scripts_list=($(SHELL=zsh bun getcompletes s))
|
||||
compadd $scripts_list && ret=0
|
||||
|
||||
IFS=$'\n' bunjs=($(SHELL=zsh bun getcompletes j))
|
||||
IFS=$'\n' bins=($(SHELL=zsh bun getcompletes b))
|
||||
|
||||
if [ ! -z "$bunjs" -a "$bunjs" != " " ]; then
|
||||
if [ ! -z "$bins" -a "$bins" != " " ]; then
|
||||
compadd $bunjs && ret=0
|
||||
_alternative "args:bin:(($bins))"
|
||||
return 1
|
||||
fi
|
||||
|
||||
_alternative "args:Bun.js:(($bunjs))"
|
||||
fi
|
||||
|
||||
if [ ! -z "$bins" -a "$bins" != " " ]; then
|
||||
_alternative "args:bin:(($bins))"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
__bun_dynamic_comp() {
|
||||
local comp=""
|
||||
|
||||
for arg in scripts; do
|
||||
local line
|
||||
while read -r line; do
|
||||
local name="$line"
|
||||
local desc="$line"
|
||||
name="${name%$'\t'*}"
|
||||
desc="${desc/*$'\t'/}"
|
||||
echo
|
||||
done <<<"$arg"
|
||||
done
|
||||
|
||||
return $comp
|
||||
}
|
||||
|
||||
autoload -U compinit && compinit
|
||||
compdef _bun bun
|
||||
113
completions/spec.yaml
Normal file
113
completions/spec.yaml
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
name: bun
|
||||
appspec: { version: "0.001" }
|
||||
plugins: [-Meta]
|
||||
title: A tool for installing and managing Python packages
|
||||
|
||||
options:
|
||||
- version|V --Show version and exit
|
||||
- name: cwd
|
||||
type: string
|
||||
summary: "Change directory"
|
||||
|
||||
# subcommands:
|
||||
# bun:
|
||||
|
||||
subcommands:
|
||||
run:
|
||||
summary: Run a script or package bin
|
||||
parameters:
|
||||
- name: script
|
||||
multiple: false
|
||||
completion:
|
||||
command_string: >
|
||||
SHELL=zsh bun getcompletes r
|
||||
|
||||
options:
|
||||
- silent --Don't echo the command
|
||||
|
||||
create:
|
||||
summary: Create a new project
|
||||
subcommands:
|
||||
next:
|
||||
summary: "Next.js app"
|
||||
parameters:
|
||||
- name: file
|
||||
multiple: false
|
||||
type: file
|
||||
required: true
|
||||
|
||||
react:
|
||||
summary: "React app"
|
||||
parameters:
|
||||
- name: file
|
||||
multiple: false
|
||||
type: file
|
||||
required: true
|
||||
|
||||
bun:
|
||||
summary: Generate a bundle
|
||||
parameters:
|
||||
- name: file
|
||||
multiple: true
|
||||
type: file
|
||||
required: false
|
||||
options:
|
||||
- name: use
|
||||
type: string
|
||||
summary: Use a framework, e.g. "next"
|
||||
|
||||
upgrade:
|
||||
summary: Upgrade to the latest version of Bun
|
||||
|
||||
dev:
|
||||
summary: Start a dev server
|
||||
options:
|
||||
- name: bunfile
|
||||
type: string
|
||||
summary: "Use a specific .bun file (default: node_modules.bun)"
|
||||
|
||||
- name: origin
|
||||
type: string
|
||||
summary: "Rewrite import paths to start from a different url. Default: http://localhost:3000"
|
||||
|
||||
- name: u
|
||||
type: string
|
||||
summary: "Rewrite import paths to start from a different url. Default: http://localhost:3000"
|
||||
|
||||
- name: server-bunfile
|
||||
type: string
|
||||
summary: "Use a specific .bun file for SSR in bun dev (default: node_modules.server.bun)"
|
||||
- name: extension-order
|
||||
type: string
|
||||
summary: "defaults to: .tsx,.ts,.jsx,.js,.json"
|
||||
- name: "jsx-runtime"
|
||||
type: string
|
||||
enum: ["automatic", "classic"]
|
||||
summary: 'JSX runtime to use. Defaults to "automatic"'
|
||||
- name: main-fields
|
||||
type: string
|
||||
summary: Main fields to lookup in package.json. Defaults to --platform dependent
|
||||
- disable-react-fast-refresh --Disable React Fast Refresh
|
||||
- disable-hmr --Disable Hot Module Reloading
|
||||
- &jsx_factory name: jsx-factory
|
||||
type: string
|
||||
summary: "Changes the function called when compiling JSX elements using the classic JSX runtime"
|
||||
- &jsx_fragment name: jsx-fragment
|
||||
type: string
|
||||
summary: "Changes the function called when compiling JSX fragments"
|
||||
- &jsx_import_source name: jsx-import-source
|
||||
type: string
|
||||
summary: 'Declares the module specifier to be used for importing the jsx and jsxs factory functions. Default: "react"'
|
||||
- &port name: port
|
||||
type: int
|
||||
summary: Port number
|
||||
|
||||
parameters:
|
||||
- name: sasdasdds
|
||||
completion:
|
||||
command_string: >
|
||||
SHELL=zsh bun getcompletes r
|
||||
|
||||
# vim:et:sts=2:sws=2:sw=2:foldmethod=indent
|
||||
|
||||
2
demos/css-stress-test/next-env.d.ts
vendored
2
demos/css-stress-test/next-env.d.ts
vendored
@@ -1,2 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
||||
Binary file not shown.
@@ -1,14 +0,0 @@
|
||||
import { Main } from "../src/main";
|
||||
import { Button } from "../src/components/button";
|
||||
|
||||
export function getInitialProps() {
|
||||
return {};
|
||||
}
|
||||
|
||||
export default function IndexRoute() {
|
||||
return (
|
||||
<div>
|
||||
<Main productName={"Next.js (Webpack 5)"} />;<Button>hello</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/src/index.css" />
|
||||
<script async src="/src/index.tsx" type="module"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="reactroot"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,26 +0,0 @@
|
||||
import * as jsx_dev_runtime_runtime from "http://localhost:8000node_modules/react/jsx-dev-runtime.js";
|
||||
var jsxDEV = require( jsx_dev_runtime_runtime).jsxDEV, __jsxFilename = "src/components/button.tsx";
|
||||
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8000__runtime.js";
|
||||
import * as ttp_localhost_8000node_modules_module from "http://localhost:8000node_modules/react/index.js";
|
||||
var React = require(ttp_localhost_8000node_modules_module);
|
||||
export const Button = ({ label, label2, onClick }) => jsxDEV("div", {
|
||||
className: "Button",
|
||||
onClick,
|
||||
children: [jsxDEV("div", {
|
||||
className: "Button-label",
|
||||
children: [
|
||||
label,
|
||||
"111"
|
||||
]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 133
|
||||
}, this)]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 86
|
||||
}, this);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
import * as jsx_dev_runtime_runtime from "http://localhost:8000node_modules/react/jsx-dev-runtime.js";
|
||||
import * as React_dot_jsx from "http://localhost:8000node_modules/react/jsx-dev-runtime.js";
|
||||
var jsxDEV = require( jsx_dev_runtime_runtime).jsxDEV, __jsxFilename = "src/index.tsx", Fragment = require( React_dot_jsx).Fragment;
|
||||
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8000__runtime.js";
|
||||
import * as ttp_localhost_8000node_modules_module from "http://localhost:8000node_modules/react-dom/index.js";
|
||||
var ReactDOM = require(ttp_localhost_8000node_modules_module);
|
||||
import { Button} from "http://localhost:8000src/components/button.js";
|
||||
const Base = ({}) => {
|
||||
return jsxDEV("main", {
|
||||
children: [
|
||||
jsxDEV("h1", {
|
||||
children: ["I am the page"]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 132
|
||||
}, this),
|
||||
jsxDEV("h3", {
|
||||
className: "bacon",
|
||||
children: ["Here is some text"]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 161
|
||||
}, this),
|
||||
jsxDEV( Fragment, {
|
||||
children: ["Fragmen!t"]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 212
|
||||
}, this),
|
||||
jsxDEV(Button, {
|
||||
label: "Do not click.",
|
||||
onClick: () => alert("I told u not to click!"),
|
||||
children: []
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 234
|
||||
}, this)
|
||||
]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 119
|
||||
}, this);
|
||||
|
||||
};
|
||||
|
||||
function startReact() {
|
||||
ReactDOM.render( jsxDEV( Base, {
|
||||
children: []
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 408
|
||||
}, this), document.querySelector("#reactroot"));
|
||||
}
|
||||
globalThis.addEventListener("DOMContentLoaded", () => {
|
||||
startReact();
|
||||
});
|
||||
@@ -1,26 +0,0 @@
|
||||
import * as _jsx_dev_runtime_runtime from "../../node_modules/react/jsx-dev-runtime.js";
|
||||
var jsxDEV = require( _jsx_dev_runtime_runtime).jsxDEV, __jsxFilename = "src/components/button.tsx";
|
||||
|
||||
import {
|
||||
__require as require
|
||||
} from "../../__runtime.js";
|
||||
import * as node_modules_module from "../../node_modules/react/index.js";
|
||||
var React = require(node_modules_module);
|
||||
export const Button = ({ label, label2, onClick }) => jsxDEV("div", {
|
||||
className: "Button",
|
||||
onClick,
|
||||
children: [jsxDEV("div", {
|
||||
className: "Button-label",
|
||||
children: [
|
||||
label,
|
||||
"111"
|
||||
]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 133
|
||||
}, this)]
|
||||
}, undefined, true, {
|
||||
fileName: __jsxFilename,
|
||||
lineNumber: 86
|
||||
}, this);
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// Snowpack Configuration File
|
||||
// See all supported options: https://www.snowpack.dev/reference/configuration
|
||||
|
||||
/** @type {import("snowpack").SnowpackUserConfig } */
|
||||
module.exports = {
|
||||
root: "src",
|
||||
mount: {
|
||||
public: "/",
|
||||
src: "/",
|
||||
},
|
||||
plugins: ["@snowpack/plugin-react-refresh"],
|
||||
packageOptions: {
|
||||
/* ... */
|
||||
},
|
||||
devOptions: {
|
||||
/* ... */
|
||||
},
|
||||
buildOptions: {
|
||||
/* ... */
|
||||
},
|
||||
};
|
||||
@@ -1,37 +0,0 @@
|
||||
import React from "react";
|
||||
import { NewComponent } from "./new-comp";
|
||||
|
||||
const Toast = () => {
|
||||
const [baconyes, baconno] = useBacon();
|
||||
return <div>false</div>;
|
||||
};
|
||||
const Button = ({ label, label2, onClick }) => {
|
||||
const useCustomHookInsideFunction = (what, arr) => {
|
||||
return [true, false];
|
||||
};
|
||||
const [on, setOn] = React.useState(false);
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log({ on });
|
||||
}, [on]);
|
||||
|
||||
// const [foo1, foo2] = useCustomHookInsideFunction(() => {}, [on]);
|
||||
|
||||
return (
|
||||
<div className="Button" onClick={onClick}>
|
||||
<Toast>f</Toast>
|
||||
<div className="Button-label">{label}12</div>
|
||||
<NewComponent />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const Bacon = Button;
|
||||
|
||||
export { Bacon, Bacon as Button };
|
||||
|
||||
const RefreshLike = () => {};
|
||||
|
||||
const useBacon = () => {
|
||||
return [1, 8];
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
export const NewComponent = () => {
|
||||
return <div>NEW!</div>;
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
crossorigin="anonymous"
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&family=Space+Mono:wght@400;700&display=swap"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="reactroot"></div>
|
||||
<link rel="stylesheet" href="./src/index.css" />
|
||||
<script src="./src/index.tsx" async type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
:root {
|
||||
--timestamp: "12812";
|
||||
--interval: "8";
|
||||
--progress-bar: 11.83299999999997%;
|
||||
--spinner-1-muted: rgb(142, 6, 182);
|
||||
--spinner-1-primary: rgb(177, 8, 227);
|
||||
--spinner-2-muted: rgb(110, 148, 190);
|
||||
--spinner-2-primary: rgb(138, 185, 238);
|
||||
--spinner-3-muted: rgb(75, 45, 64);
|
||||
--spinner-3-primary: rgb(94, 56, 80);
|
||||
--spinner-4-muted: rgb(155, 129, 108);
|
||||
--spinner-4-primary: rgb(194, 161, 135);
|
||||
--spinner-rotate: 213deg;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&family=Space+Mono:wght@400;700&display=swap";
|
||||
16
entitlements.plist
Normal file
16
entitlements.plist
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
BIN
esdev-lists
BIN
esdev-lists
Binary file not shown.
BIN
esdev-nolists
BIN
esdev-nolists
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
examples/.gitignore
vendored
Normal file
1
examples/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bun-examples-all
|
||||
33
examples/macros/components/covid19.tsx
Normal file
33
examples/macros/components/covid19.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { fetchCSV } from "macro:fetchCSV";
|
||||
|
||||
export const Covid19 = () => {
|
||||
const rows = fetchCSV(
|
||||
"https://covid19.who.int/WHO-COVID-19-global-data.csv",
|
||||
{
|
||||
last: 100,
|
||||
columns: ["New_cases", "Date_reported", "Country"],
|
||||
}
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>Covid-19</h2>
|
||||
<h6>last {rows.length} updates from the WHO</h6>
|
||||
<div className="Table">
|
||||
<div className="Header">
|
||||
<div className="Heading">New Cases</div>
|
||||
<div className="Heading">Date</div>
|
||||
<div className="Heading">Country</div>
|
||||
</div>
|
||||
|
||||
{rows.map((row, index) => (
|
||||
<div className="Row" key={index}>
|
||||
<div className="Column">{row[0]}</div>
|
||||
<div className="Column">{row[1]}</div>
|
||||
<div className="Column">{row[2]}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
17
examples/macros/components/example.jsx
Normal file
17
examples/macros/components/example.jsx
Normal file
@@ -0,0 +1,17 @@
|
||||
// source code
|
||||
import { matchInFile } from "macro:matchInFile";
|
||||
|
||||
export const IPAddresses = () => (
|
||||
<div>
|
||||
<h2>recent ip addresses</h2>
|
||||
<div className="Lines">
|
||||
{matchInFile("access.log", /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}/).map(
|
||||
(ipAddress, index) => (
|
||||
<div className="Line" key={index}>
|
||||
{ipAddress}
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
15
examples/macros/components/index.tsx
Normal file
15
examples/macros/components/index.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as ReactDOM from "react-dom";
|
||||
import * as React from "react";
|
||||
import { IPAddresses } from "./example";
|
||||
import { Covid19 } from "./covid19";
|
||||
|
||||
const Start = function () {
|
||||
const root = document.createElement("div");
|
||||
document.body.appendChild(root);
|
||||
|
||||
// comment out to switch between examples
|
||||
// ReactDOM.render(<IPAddresses />, root);
|
||||
ReactDOM.render(<Covid19 />, root);
|
||||
};
|
||||
|
||||
Start();
|
||||
4
examples/macros/example.js
Normal file
4
examples/macros/example.js
Normal file
@@ -0,0 +1,4 @@
|
||||
// source code
|
||||
import { mysteryBox } from "macro:./mystery-box";
|
||||
|
||||
export default "You roll! " + mysteryBox(123);
|
||||
54
examples/macros/fetchCSV.tsx
Normal file
54
examples/macros/fetchCSV.tsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import Pappa from "papaparse";
|
||||
// Example usage:
|
||||
// const rows = fetchCSV(
|
||||
// "https://covid19.who.int/WHO-COVID-19-global-data.csv",
|
||||
// {
|
||||
// last: 100,
|
||||
// columns: ["New_cases", "Date_reported", "Country"],
|
||||
// }
|
||||
// );
|
||||
export async function fetchCSV(callExpression) {
|
||||
console.time("fetchCSV Total");
|
||||
const [
|
||||
urlNode,
|
||||
{
|
||||
properties: { last: limit = 10, columns = [] },
|
||||
},
|
||||
] = callExpression.arguments;
|
||||
const url = urlNode.get();
|
||||
|
||||
console.time("Fetch");
|
||||
const response = await fetch(url);
|
||||
const csvText = await response.text();
|
||||
console.timeEnd("Fetch");
|
||||
|
||||
console.time("Parse");
|
||||
let rows = Pappa.parse(csvText, { fastMode: true }).data;
|
||||
console.timeEnd("Parse");
|
||||
|
||||
console.time("Render");
|
||||
const columnIndices = new Array(columns.length);
|
||||
|
||||
for (let i = 0; i < columns.length; i++) {
|
||||
columnIndices[i] = rows[0].indexOf(columns[i]);
|
||||
}
|
||||
|
||||
rows = rows
|
||||
.slice(Math.max(limit, rows.length) - limit)
|
||||
.reverse()
|
||||
.filter((columns) => columns.every(Boolean));
|
||||
const value = (
|
||||
<array>
|
||||
{rows.map((columns) => (
|
||||
<array>
|
||||
{columnIndices.map((columnIndex) => (
|
||||
<string value={columns[columnIndex]} />
|
||||
))}
|
||||
</array>
|
||||
))}
|
||||
</array>
|
||||
);
|
||||
console.timeEnd("Render");
|
||||
console.timeEnd("fetchCSV Total");
|
||||
return value;
|
||||
}
|
||||
23
examples/macros/matchInFile.tsx
Normal file
23
examples/macros/matchInFile.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
// macro code
|
||||
export function matchInFile(callExpression: BunAST.CallExpression) {
|
||||
const [filePathNode, matcherNode] = callExpression.arguments;
|
||||
let filePath: string;
|
||||
filePath = filePathNode.get();
|
||||
|
||||
let matcher: RegExp;
|
||||
matcher = matcherNode.get();
|
||||
const file: string = Bun.readFile(Bun.cwd + filePath);
|
||||
|
||||
return (
|
||||
<array>
|
||||
{file
|
||||
.split("\n")
|
||||
.map((line) => line.match(matcher))
|
||||
.filter(Boolean)
|
||||
.reverse()
|
||||
.map((line) => (
|
||||
<string value={line[0]} />
|
||||
))}
|
||||
</array>
|
||||
);
|
||||
}
|
||||
10
examples/macros/now.tsx
Normal file
10
examples/macros/now.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import moment from "moment";
|
||||
export function now(node) {
|
||||
var fmt = "HH:mm:ss";
|
||||
const args = node.arguments;
|
||||
if (args[0] instanceof <string />) {
|
||||
fmt = args[0].get();
|
||||
}
|
||||
const time = moment().format(fmt);
|
||||
return <string value={time}></string>;
|
||||
}
|
||||
17
examples/macros/package.json
Normal file
17
examples/macros/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "macros",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"moment": "^2.29.1",
|
||||
"papaparse": "^5.3.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-refresh": "^0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.24",
|
||||
"@types/react-dom": "^17.0.9"
|
||||
}
|
||||
}
|
||||
14
examples/macros/public/index.html
Normal file
14
examples/macros/public/index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Macro test</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<link rel="stylesheet" href="/styles.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script async type="module" src="/components/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
47
examples/macros/styles.css
Normal file
47
examples/macros/styles.css
Normal file
@@ -0,0 +1,47 @@
|
||||
html {
|
||||
font-size: 4rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: black;
|
||||
|
||||
color: rgb(0, 255, 0);
|
||||
font-family: "Courier";
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 48px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.Line {
|
||||
font-size: 0.5rem;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.Table {
|
||||
display: grid;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.Row,
|
||||
.Header {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
text-align: right;
|
||||
|
||||
column-gap: 2rem;
|
||||
}
|
||||
|
||||
.Heading {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.Header {
|
||||
border-bottom: 1px solid rgb(0, 255, 0);
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.Heading:nth-of-type(2) {
|
||||
text-align: left;
|
||||
}
|
||||
7
examples/macros/tsconfig.json
Normal file
7
examples/macros/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {},
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
||||
3
examples/next/.eslintrc.json
Normal file
3
examples/next/.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
42
examples/next/.gitignore
vendored
Normal file
42
examples/next/.gitignore
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
**/*.trace
|
||||
**/*.zip
|
||||
**/*.tar.gz
|
||||
**/*.tgz
|
||||
**/*.log
|
||||
package-lock.json
|
||||
**/*.bun
|
||||
42
examples/next/.npmignore
Normal file
42
examples/next/.npmignore
Normal file
@@ -0,0 +1,42 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
**/*.trace
|
||||
**/*.zip
|
||||
**/*.tar.gz
|
||||
**/*.tgz
|
||||
**/*.log
|
||||
package-lock.json
|
||||
**/*.bun
|
||||
34
examples/next/README.md
Normal file
34
examples/next/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
13
examples/next/components/Title.tsx
Normal file
13
examples/next/components/Title.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import Hey from "./subtitle";
|
||||
|
||||
export default function Title() {
|
||||
return (
|
||||
<h1>
|
||||
Hello <Hey></Hey>
|
||||
</h1>
|
||||
);
|
||||
}
|
||||
|
||||
export enum TitleEnum {
|
||||
wow = 1,
|
||||
}
|
||||
4
examples/next/components/subtitle.tsx
Normal file
4
examples/next/components/subtitle.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
export default function Hey() {
|
||||
return <div>!!yep</div>;
|
||||
}
|
||||
42
examples/next/gitignore
Normal file
42
examples/next/gitignore
Normal file
@@ -0,0 +1,42 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
**/*.trace
|
||||
**/*.zip
|
||||
**/*.tar.gz
|
||||
**/*.tgz
|
||||
**/*.log
|
||||
package-lock.json
|
||||
**/*.bun
|
||||
6
examples/next/next-env.d.ts
vendored
Normal file
6
examples/next/next-env.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
10
examples/next/next.config.js
Normal file
10
examples/next/next.config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
typescript: {
|
||||
// !! WARN !!
|
||||
// Dangerously allow production builds to successfully complete even if
|
||||
// your project has type errors.
|
||||
// !! WARN !!
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
};
|
||||
21
examples/next/package.json
Normal file
21
examples/next/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@bun-examples/next",
|
||||
"version": "0.0.48",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"next": "12.0.2",
|
||||
"react": "beta",
|
||||
"react-dom": "beta",
|
||||
"react-is": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.19",
|
||||
"bun-framework-next": "^12",
|
||||
"typescript": "^4.4.0"
|
||||
},
|
||||
"bun-create": {
|
||||
"postinstall": [
|
||||
"bun bun --use next"
|
||||
]
|
||||
}
|
||||
}
|
||||
7
examples/next/pages/_app.tsx
Normal file
7
examples/next/pages/_app.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import "../styles/globals.css";
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
export default MyApp;
|
||||
36
examples/next/pages/index.tsx
Normal file
36
examples/next/pages/index.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import Head from "next/head";
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
import styles from "../styles/Home.module.css";
|
||||
import nextPackage from "next/package.json";
|
||||
export async function getStaticProps(ctx) {
|
||||
return {
|
||||
props: {},
|
||||
};
|
||||
}
|
||||
|
||||
export default function Home({}) {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Head>
|
||||
<title>Next.js</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className={styles.main}>
|
||||
<h1 className={styles.title}>
|
||||
Welcome to <a href="https://nextjs.org">Next.js!</a> v
|
||||
{nextPackage.version}
|
||||
</h1>
|
||||
|
||||
<p className={styles.description}>
|
||||
Get started by editing{" "}
|
||||
<code className={styles.code}>pages/index.tsx</code>
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<footer className={styles.footer}></footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
22
examples/next/pages/second.tsx
Normal file
22
examples/next/pages/second.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function Second({}) {
|
||||
return (
|
||||
<div style={{ padding: 16 }}>
|
||||
<h1>Second</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/">
|
||||
<a>Root page</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/foo/bar/third">
|
||||
<a>Third! page</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
BIN
examples/next/public/favicon.ico
Normal file
BIN
examples/next/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
4
examples/next/public/vercel.svg
Normal file
4
examples/next/public/vercel.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="283" height="64" viewBox="0 0 283 64" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user