Compare commits

...

501 Commits

Author SHA1 Message Date
Jarred Sumner
705a4a991a feat(minify): fold array length 2025-06-27 07:21:24 -07:00
Jarred Sumner
03f5a385b2 Add a repo pcakage.json script to show buildkite failures locally 2025-06-27 04:53:02 -07:00
Jarred Sumner
3c1a1b5634 Implement per-message deflate support in WebSocket client (#20613)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-27 00:04:42 -07:00
Ciro Spaciari
c15190990c fix(sockets) some fixes and improvements (#20652) 2025-06-26 15:57:06 -07:00
pfg
177239cff5 Split install.zig into multiple files (#20626)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-06-26 12:43:46 -07:00
Meghan Denny
ea7068a531 node: fix test-net-bytes-stats.js (#20629) 2025-06-26 01:48:23 -07:00
pfg
46cd5b10a1 Split js_ast.zig into multiple files (#20651)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-06-25 21:04:38 -07:00
Meghan Denny
b87cf4f247 zig: handle when coerceToInt32 and coerceToInt64 throw (#20655) 2025-06-25 20:44:13 -07:00
Ashcon Partovi
d3bc5e391f chore: update codeowners 2025-06-25 19:11:27 -07:00
Meghan Denny
f9712ce309 make node:buffer,zlib,stream,fs exception checker clear (#20494) 2025-06-25 18:36:08 -07:00
Jarred Sumner
5e0caa0aa4 Create upgrade-webkit.md 2025-06-25 03:20:22 -07:00
Meghan Denny
4cf31f6a57 node: sync test-net-connect-options-invalid.js (#20607) 2025-06-24 22:46:56 -07:00
Meghan Denny
3f257a2905 node: fix test-timers-invalid-clear.js (#20624) 2025-06-24 22:39:20 -07:00
Jarred Sumner
ba126fb330 Make node-gyp faster (#20556) 2025-06-24 21:07:01 -07:00
Meghan Denny
2072fa1d59 cpp: audit redundant and problematic uses of JSValue constructor (#20623) 2025-06-24 20:58:44 -07:00
Zack Radisic
61024b2b4a Fix copying UTF-16 -> UTF-8 sometimes causing invalid UTF-8 bytes (#20601) 2025-06-24 19:46:29 -07:00
Jarred Sumner
90e3d6c898 Fix flushHeaders streaming (#20577)
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-06-24 18:48:23 -07:00
Meghan Denny
e8b652a5d9 node: fix test-net-better-error-messages-path.js (#20609) 2025-06-24 17:48:06 -07:00
Jarred Sumner
5131e66fa5 Optimize napi_get_value_string_utf8 napi_get_value_string_latin1 napi_get_value_string_utf16 (#20612) 2025-06-24 17:39:33 -07:00
Jarred Sumner
c019f86f14 Fix crash in napi_remove_env_cleanup_hook during worker finalization (#20551) 2025-06-24 17:38:38 -07:00
Meghan Denny
354391a263 zig: socket: fix uaf in handleError, onOpen, onWritable (#20604) 2025-06-24 17:31:58 -07:00
Ciro Spaciari
17120cefdc fix(http2) fix remoteSettings not emitting on default settings (#20622) 2025-06-24 17:31:19 -07:00
Jarred Sumner
be7db0d37a Update CLAUDE.md 2025-06-24 05:10:39 -07:00
Jarred Sumner
299c6c9b21 Update some docs 2025-06-24 05:09:23 -07:00
Jarred Sumner
f1c2a611ad Create CLAUDE.md 2025-06-24 04:06:33 -07:00
Meghan Denny
7d9dd67586 node: fix test-net-connect-keepalive.js (#20610) 2025-06-24 02:56:50 -07:00
Meghan Denny
ccb0ed13c2 node: fix test-net-listen-fd0.js (#20611) 2025-06-24 02:56:40 -07:00
Jarred Sumner
b58daf86da Optimize napi_create_buffer (#20614) 2025-06-24 02:39:19 -07:00
Meghan Denny
050a9cecb7 node: sync test-net-connect-no-arg.js (#20608) 2025-06-24 01:02:38 -07:00
Zack Radisic
0a3ac50931 Refactor shell to use AllocationScope and fix memory issues (#20531)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com>
2025-06-23 22:29:48 -07:00
Meghan Denny
fe0bb68d17 build.zig: add missing debug check steps 2025-06-23 21:43:55 -07:00
Jarred Sumner
bc79a48ce4 Fix crash in NapiClass_ConstructorFunction due to incorrect handling of newTarget (#20552)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-23 19:50:09 -07:00
Meghan Denny
2081e5b656 test: update spawn.test.ts for ci on windows (#20600) 2025-06-23 19:40:53 -07:00
Jarred Sumner
e30d6d21f5 Bump WebKit - June 23rd edition (#20598) 2025-06-23 17:17:32 -07:00
Jarred Sumner
81e1a9d54d Unpause instead of close stdout/stderr in spawn onProcessExit (#20561)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-23 17:15:16 -07:00
Dylan Conway
1faeba01b9 remove ref count from napi_async_work (#20597) 2025-06-23 17:14:59 -07:00
Jarred Sumner
19540001d1 Prevent a call to JS during finalizer and/or worker termination (#20550) 2025-06-23 15:25:52 -07:00
Michael H
da0bc0b0d2 add space before "at" in assertionFailureAtLocation (#20591) 2025-06-23 15:22:39 -07:00
Jarred Sumner
95e12374ed Fix node_api_create_buffer_from_arraybuffer implementation (#20560) 2025-06-23 15:06:09 -07:00
Jarred Sumner
4cc61a1b8c Fix NODE_PATH for bun build (#20576)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-22 20:51:45 -07:00
Jarred Sumner
5416155449 Enable Math.sumPrecise (#20569) 2025-06-22 19:23:15 -07:00
Jarred Sumner
c7b1e5c709 Fix fs.watchFile ignoring atime (#20575)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-22 18:22:41 -07:00
Grigory
444b9d1883 build(windows/resources): specify company name (#20534) 2025-06-22 05:33:15 -07:00
Jarred Sumner
197c7abe7d Make the napi/v8 tests compile faster (#20555) 2025-06-21 23:57:04 -07:00
Jarred Sumner
653c459660 Fix asan failure in napi_async_work caused by accessing napi_async_work after freed (#20554) 2025-06-21 23:56:40 -07:00
Michael H
25dbe5cf3f fs.glob set onlyFiles: false so it can match folders (#20510) 2025-06-21 23:45:38 -07:00
Zack Radisic
2cbb196f29 Fix crash with garbage environment variables (#20527)
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Zack Radisic <zackradisic@users.noreply.github.com>
2025-06-21 23:44:59 -07:00
Jarred Sumner
064d7bb56e Fixes #10675 (#20553) 2025-06-21 23:44:28 -07:00
Jarred Sumner
37505ad955 Deflake test/js/node/fs/abort-signal-leak-read-write-file-fixture.ts on Windows 2025-06-21 23:43:55 -07:00
Meghan Denny
c40468ea39 install: fix crash researching #5949 (#20461) 2025-06-21 19:53:33 -07:00
Meghan Denny
29dd4166f2 Bump 2025-06-21 01:48:09 -07:00
Jarred Sumner
0b5363099b Some docs 2025-06-21 01:00:48 -07:00
Michael H
282dda62c8 Add --import as alias to --preload for nodejs compat (#20523) 2025-06-20 19:58:54 -07:00
familyboat
fd91e3de0d fix typo (#20449) 2025-06-20 19:57:36 -07:00
Jarred Sumner
633f4f593d Ahead-of-time frontend bundling support for HTML imports & bun build (#20511)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-20 19:55:52 -07:00
Jarred Sumner
fd5e777639 Remove outdated doc line 2025-06-20 16:16:14 -07:00
Michael H
770c1c8327 fix test-child-process-fork-exec-argv.js (#19639)
Co-authored-by: 190n <ben@bun.sh>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-20 11:53:36 -07:00
Zack Radisic
41d10ed01e Refactor shell and fix some bugs (#20476) 2025-06-19 18:47:00 -07:00
Meghan Denny
bb55b2596d fix passing nested object to macro" (#20497)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-19 17:13:27 -07:00
Dylan Conway
197443b2db fix(bundler): correct import_records for TLA detection (#20358) 2025-06-19 15:04:27 -07:00
Meghan Denny
b62f70c23a inspect-error-leak.test.js: add a slightly higher asan margin 2025-06-19 15:02:38 -07:00
Meghan Denny
d4ccba67f2 Revert "fix passing nested object to macro" (#20495) 2025-06-19 13:14:46 -07:00
Meghan Denny
43777cffee fix passing nested object to macro (#20467)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-19 12:56:27 -07:00
Michael H
3aedf0692c make options argument not required for fs.promises.glob (#20480) 2025-06-19 12:55:32 -07:00
190n
346e97dde2 fix bugs found by exception scope verification (#20285)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-06-18 23:08:19 -07:00
Jarred Sumner
aa37ecb7a5 Split up Timer.zig into more files (#20465)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-18 12:01:40 -07:00
Michael H
9811a2b53e docs: minor fix to Bun.deflateSync (#20466) 2025-06-18 12:01:30 -07:00
Michael H
b9e72d0d2e Make bunx work with npm i -g bun on windows (#20471) 2025-06-18 12:00:16 -07:00
Dylan Conway
b7d4b14b3d Fix BUN-D93 (#20468) 2025-06-18 02:28:54 -07:00
Meghan Denny
59e1320fb1 .github: add "needs triage" label to newly submitted crash reports 2025-06-17 20:42:11 -07:00
Meghan Denny
e402adaebf zig: RefCount: fix assertion found by windows app verifier (#20459)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-17 18:45:18 -07:00
Dylan Conway
3773ceeb7e Remove PreparePatchPackageInstall (#20457) 2025-06-17 17:23:29 -07:00
Jarred Sumner
162a9b66d8 bun pm view -> bun info (#20419)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-17 13:31:16 -07:00
Jarred Sumner
6274f10096 Make Strong use less ram (#20437)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com>
2025-06-17 13:30:58 -07:00
Jarred Sumner
978540902c bun init CLAUDE.md (#20443) 2025-06-17 13:00:28 -07:00
Jarred Sumner
b99a1256ff Split up string_immutable into more files (#20446)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-17 10:59:07 -07:00
pfg
8a1d8047f1 Unhandled rejections: remove "bun" option (#20441)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-16 19:13:00 -07:00
Michael H
a473657adb [bun build] in cjs node, dont convert module to require.module (#20343) 2025-06-16 16:56:54 -07:00
Jarred Sumner
775c3b1987 Update WebKit (#20413)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com>
2025-06-16 14:01:58 -07:00
Grigory
7ee98852c6 build: add metadata and icon to windows executable (#20383) 2025-06-15 21:45:50 -07:00
Jarred Sumner
f46df399eb Update package.json 2025-06-15 19:30:11 -07:00
Zack Radisic
c103b57bcc Split out shell code into more files (#20331)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-15 14:09:15 -07:00
Jarred Sumner
3b3cde9e74 Split up Bun.listen & Bun.connect code into more logical files (#20411)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-15 14:08:21 -07:00
pagal
2482af60d5 Added missing completion info for: bun update (#20316) 2025-06-15 13:20:35 -07:00
Meghan Denny
2245b5efd6 test: use randomized listeners in serve-types.test.ts (#20387)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-15 13:20:11 -07:00
berzan
155475693b Change clip-path property to clipPath. (#20409) 2025-06-15 13:19:56 -07:00
Michael Melesse
f5b42e1507 react-tailwind template fix (#20410) 2025-06-15 13:19:44 -07:00
Meghan Denny
139f2b23a2 chore: trim trailing space in uws (#20388) 2025-06-15 08:59:12 -07:00
190n
28006d0ad4 WIP: Fix ref counting bugs in spawn API observed under rr (#20191)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-14 16:59:29 +02:00
pfg
c44515eaaf Support --unhandled-rejections flag and rejectionHandled event (#19874)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-06-13 19:05:05 -07:00
pfg
e0924ef226 Implement require('tls').getCACertificates() (#20364)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-06-13 17:30:04 -07:00
Meghan Denny
9499f21518 Update .git-blame-ignore-revs 2025-06-13 16:16:14 -07:00
Meghan Denny
6b4662ff55 zig: .jsUndefined -> .js_undefined (#20377)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-13 16:14:57 -07:00
Meghan Denny
a445b45e55 empty commit to trigger formatting ci (#20378)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-13 15:18:28 -07:00
Christian Rishøj
82b34bbbdd feat(sqlite): Add columnTypes and declaredTypes to Statement (#20232)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-06-13 19:48:37 +02:00
190n
4d905123fa Always use correct Zig version for bun watch (#20309)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-06-13 19:47:33 +02:00
190n
c6deb4527c Fix crash when FFI pointers are encoded as ints (#20351)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-06-13 19:46:26 +02:00
Jarred Sumner
f3bca62a77 Fix proxy handling in bun audit (#20295)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-13 19:43:55 +02:00
Meghan Denny
62794850fa zig: node:zlib: tidy (#20362)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-13 19:43:35 +02:00
Dylan Conway
f53aff0935 Fix TypeScript non-null assertion with new operator (#20363)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan-conway@users.noreply.github.com>
2025-06-13 19:30:52 +02:00
Alistair Smith
9c5797e2f5 Update expectations.txt (#20350) 2025-06-12 17:35:32 -07:00
Kuba Ellwart
4329a66a1d fix(types): make the RedisClient.del accept spread keys by default (#20348) 2025-06-12 17:06:51 -07:00
Meghan Denny
12a4b95b34 zig: make uws Response and WebSocket opaque again (#20355) 2025-06-12 16:35:52 -07:00
Meghan Denny
cf00cb495c fix main zig build 2025-06-12 14:26:17 -07:00
Meghan Denny
5763a8e533 node:zlib: add zstd (#20313)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-12 14:20:28 -07:00
Meghan Denny
dedd433cbf zig: prefer .jsUndefined() over .undefined for JSValue (#20332) 2025-06-12 13:18:46 -07:00
Meghan Denny
d6590c4bfa Bump 2025-06-11 22:00:23 -07:00
Dax
07d3d6c9f6 add opencode-ai to trusted dependencies (#20330) 2025-06-11 21:47:51 -07:00
Ciro Spaciari
631e674842 fix(FileRoute) fix eof handling, fix max size handling, fix onReaderError behavior (#20317)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
2025-06-11 20:34:52 -07:00
Alistair Smith
3d19c1156c support multiple keys in RedisClient#del (#20307) 2025-06-11 17:31:35 -07:00
pfg
7a069d7214 Add back zls binary after zig upgrade (#20327) 2025-06-11 16:00:58 -07:00
Jarred Sumner
6ebad50543 Introduce ahead of time bundling for HTML imports with bun build (#20265)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: dylan-conway <35280289+dylan-conway@users.noreply.github.com>
2025-06-10 21:26:00 -07:00
Jarred Sumner
8750f0b884 Add FileRoute for serving files (#20198)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-06-10 19:41:21 -07:00
Ben Grant
c38bace86c delete stray file 2025-06-10 09:36:00 -07:00
Jarred Sumner
9fd18361f2 Revert "node:net: fix crash calling getsockname on native server handle (#20286)"
This reverts commit de6739c401.
2025-06-09 21:59:17 -07:00
Meghan Denny
de6739c401 node:net: fix crash calling getsockname on native server handle (#20286) 2025-06-09 21:57:57 -07:00
Jarred Sumner
2801cb1f4a Fix TOML parser to handle inline tables and table arrays correctly (#20291)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-06-09 18:52:30 -07:00
Jacob
b642e36da2 Add Support for LinkWorkspacePackages in Bunfig (#20226)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-09 17:01:15 -07:00
pfg
df3337936c Upgrade zig to 0.14.1 (#20289) 2025-06-09 16:51:10 -07:00
190n
ea05de59b3 Fix #20283 (#20287) 2025-06-09 16:50:24 -07:00
Jarred Sumner
601b8e3aaa Add CLAUDE.md to bun-types 2025-06-09 15:06:26 -07:00
github-actions[bot]
a11d9e2cd4 deps: update sqlite to 3.50.100 (#20257)
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-06-08 08:20:24 -07:00
Jarred Sumner
df84f665a5 mark as noalias (#20262)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-08 08:20:09 -07:00
Jarred Sumner
498186764a Remove a memcpy (#20261)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-08 05:07:09 -07:00
Dax
02a7d71b70 Add BUN_BE_BUN environment variable flag (#20251) 2025-06-07 20:17:47 -07:00
Jarred Sumner
c9761d4aa6 Fixes flaky test-http-pipeline-requests-connection-leak.js (#20248) 2025-06-07 05:19:11 -07:00
Jarred Sumner
c863e7582f Fix dest field in sys.Error (#20244) 2025-06-07 04:00:36 -07:00
Dylan Conway
d4710c6e86 fix "undefined is not an object" with ctrl+c during next dev (#20246) 2025-06-07 04:00:22 -07:00
Jarred Sumner
e1f3796677 Wait for FSEvents thread to exit before exiting the process (#20245) 2025-06-07 03:50:04 -07:00
Meghan Denny
ec07ef83a2 node:net: fix ReferenceError when localPort is passed to Socket connect 2025-06-07 02:06:07 -07:00
Jarred Sumner
eddee1b8cb *anyopaque -> mach_port_t (#20243) 2025-06-07 00:30:58 -07:00
Zack Radisic
fa1d37b4e3 Split bundler up into multiple files (#20192) 2025-06-06 18:34:18 -07:00
Meghan Denny
5b0523a32a cmake: suppress a few more warnings on windows 2025-06-06 17:44:46 -07:00
Jarred Sumner
5039310199 Bump WebKit (#20222) 2025-06-06 04:19:21 -07:00
190n
61e03a2758 Switch back from quick_exit(134) to abort() in Windows crash handler (#20194) 2025-06-05 20:39:47 -07:00
Jarred Sumner
27abb51561 Add fallback for ADDRCONFIG like Chrome's, avoid glibc UDP port 0 hangs (#19753)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-05 20:20:00 -07:00
connerlphillippi
09d0846d1b Fix use-after-free segfault in DevServer has_tailwind_plugin_hack map (#20214)
Co-authored-by: Conner Phillippi <conner@Conners-MacBook-Air.local>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-06-05 19:37:15 -07:00
Jarred Sumner
8e7cdb8493 Delete some dead code (#20218) 2025-06-05 19:01:30 -07:00
Jarred Sumner
538caa4d5e Fix incorrect typescript type 2025-06-05 18:28:00 -07:00
Ciro Spaciari
24bc236eb7 compat(http2) fix flow protocol (#20051)
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
2025-06-05 17:34:30 -07:00
190n
f59050fc23 Exit early if V8 tests fail to compile (#20215) 2025-06-05 17:15:02 -07:00
190n
1b092f156b Make DebugData.magic enum nonexhaustive (#20212) 2025-06-05 17:14:43 -07:00
190n
6a79b9ef87 Work around compiler crash in uws.WebSocket (#20211) 2025-06-05 17:12:40 -07:00
Jarred Sumner
f62940bbda A couple small zig cleanup things (#20196) 2025-06-05 05:11:28 -07:00
Meghan Denny
c82345c0a0 zig: fix debug crash in uws.Response (#20202) 2025-06-04 23:43:27 -07:00
Kai Tamkun
817d0464f6 Add support for node:vm.SyntheticModule (#19878) 2025-06-04 19:41:26 -07:00
Jarred Sumner
a5bb525614 Ensure we set the socket flag in LifecycleScriptSubprocess (#20179) 2025-06-04 19:38:47 -07:00
190n
4cb7910e32 remove unnecessary explicit backing integer (#20188) 2025-06-04 16:44:55 -07:00
190n
d7970946eb Delete flaky tests from #20065 (#20189) 2025-06-04 16:44:31 -07:00
pfg
014fb6be8f test-tls-check-server-identity (#20170) 2025-06-04 16:44:15 -07:00
Meghan Denny
5c7991b707 cpp: fix compile errors caught from disallowing implicit conversion from JSValue to EncodedJSValue (#20175) 2025-06-04 14:48:35 -07:00
Jarred Sumner
da5fc817d1 Change copy to a .len += 2025-06-04 00:25:57 -07:00
Jarred Sumner
407c4e800a Revert "add support for "workspaces.nohoist" and "workspaces.hoistingLimits" (#20124)"
This reverts commit 11070b8e16.
2025-06-03 23:51:03 -07:00
Dylan Conway
11070b8e16 add support for "workspaces.nohoist" and "workspaces.hoistingLimits" (#20124) 2025-06-03 23:44:09 -07:00
Kai Tamkun
adfdaab4fd Add test for #20144 (#20171) 2025-06-03 23:41:37 -07:00
Meghan Denny
bfd7fc06c7 fix test-net-server-max-connections.js (#20034)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-06-03 22:50:08 -07:00
pfg
bd3abc5a2a Fix calc bug (#20174) 2025-06-03 22:08:51 -07:00
Ali
193193024f Fixed exit signals hanging in loops (#20164) 2025-06-03 15:07:46 -07:00
nobkd
6edc3a9900 remove audit from bun pm help (#20167) 2025-06-03 14:37:03 -07:00
Jarred Sumner
1bd44e9ce7 Fixes #18239 (#20152) 2025-06-03 13:23:12 -07:00
Jarred Sumner
c7327d62c2 bun run prettier 2025-06-03 04:17:42 -07:00
Ali
90dda8219f Fixed: radians rewritten to degrees without converting (#19848) 2025-06-03 04:06:05 -07:00
Ali
885979644d Fixed : bun:ffi new CString() ignores byteOffset argument if byteLength is not provided (#19819)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-06-03 04:05:04 -07:00
Joel Shepherd
13c5b0d9cb Added rapidhash algorithm (#20163) 2025-06-03 03:34:35 -07:00
Kuba Ellwart
d6e45afef9 Support Optional Message Argument in RedisClient.ping() (#20161) 2025-06-03 02:33:10 -07:00
Jarred Sumner
300aedd9cc Bump WebKit, libpas on Windows edition (#20068)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-03 02:32:15 -07:00
Jarred Sumner
d9cf836b67 Split server.zig into more files (#20139)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-03 01:38:26 -07:00
Justin Yao Du
293215778f Fix a typo in bunfig docs page (extra if) (#20160) 2025-06-03 01:21:40 -07:00
Ali
95346bd919 fixed SharedArrayBuffer crashing on transfer (#20130) 2025-06-02 23:05:52 -07:00
Meghan Denny
ceaaed4848 node: more now passing tests (#20065) 2025-06-02 23:03:47 -07:00
Meghan Denny
abaa69183b write test in server.spec.ts better (#20150) 2025-06-02 23:03:05 -07:00
Meghan Denny
3e1075410b Delete test-net-allow-half-open.js
turned out to be flaky
2025-06-02 19:01:49 -07:00
190n
7a88bb0e1c add gamble.ts (#20153) 2025-06-02 18:17:05 -07:00
Meghan Denny
7a790581e0 Revert "fix test-net-bytes-stats.js" (#20154) 2025-06-02 18:15:39 -07:00
190n
d5cc530024 State CPU requirements in README (#20146) 2025-06-02 14:06:39 -07:00
Ben Grant
d7548325b1 delete event_loop/README.md 2025-06-02 11:49:09 -07:00
Jarred Sumner
d11fd94cdb Add readme to src/bun.js/event_loop 2025-06-02 03:51:46 -07:00
github-actions[bot]
4cbd040485 deps: update sqlite to 3.50.0 (#20122)
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-06-02 03:27:02 -07:00
Jarred Sumner
773484a628 Split uSockets/uWS <> Zig bindings into many different files (#20138)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-02 02:10:57 -07:00
Jarred Sumner
71c14fac7b Split EventLoop into many more files (#20134)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-06-01 20:43:30 -07:00
Stanislaw Wozniak
b2a728e45d bug: Do not duplicate Transfer-Encoding header (#20116)
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-06-01 15:54:04 -07:00
Jarred Sumner
390798c172 Fix memory leak in Bun.spawn (#20095)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-31 20:06:22 -07:00
Meghan Denny
284de53f26 safety: audit and add missing exception checks to JSC::constructArray+constructEmptyArray (#20119) 2025-05-31 20:05:02 -07:00
Jarred Sumner
5a025abddf Address clang warnings on newer clang (#20054) 2025-05-31 19:44:36 -07:00
Dylan Conway
4ab4b1b131 Clean up help text for package manager commands (#20117) 2025-05-31 19:21:37 -07:00
Roman A
13ea970852 A couple grammar fixes (#20096) 2025-05-31 19:14:51 -07:00
Meghan Denny
ba78d5b2c3 ci: pass the src directory to 'zig fmt' (#20114)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-05-31 18:52:18 -07:00
Dylan Conway
ce8767cdc8 add HTTPParser (#20049)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-31 16:21:08 -07:00
familyboat
082a9cb59c fix: missing "default" export in module "data.yml" (#20094) 2025-05-31 14:55:15 -07:00
Jarred Sumner
3c37f25b65 Avoid allocating 16 KB to read a potentially empty buffer (#20101) 2025-05-31 14:00:51 -07:00
Ali
a079743a02 fix NapiHandleScopeImpl memory leak (#20108) 2025-05-31 13:57:46 -07:00
Meghan Denny
e0852fd651 fix memory leak when pipe Bun.spawn stdio is never read repeatedly (#20102)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-05-31 11:16:49 -07:00
Grigory
6bbd1e0685 fix(NodeValidator): make object check less strict (#19047)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-30 22:10:29 -07:00
Ali
4534f6e635 fix NapiHandleScopeImpl race condition (#20093) 2025-05-30 20:33:50 -07:00
Meghan Denny
c62a7a77a3 fix assertion in JSSocketAddressDTO__create (#20063) 2025-05-30 19:33:58 -07:00
190n
ecf5ea389f Move LLDB initialization commands to make attach configuration work (#20085) 2025-05-30 19:33:03 -07:00
Jarred Sumner
010ef4d119 More comments in the socket type definition (#19410)
Co-authored-by: Alistair Smith <hi@alistair.sh>
2025-05-30 19:12:30 -07:00
Julie Saia
4d77cd53f1 Add support for catalogs in bun outdated (#20090)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-30 17:23:59 -07:00
Leander Paul
3cf353b755 feat: additional jest types in bun test (#19255)
Co-authored-by: Alistair Smith <hi@alistair.sh>
2025-05-30 15:28:11 -07:00
Jarred Sumner
fd894f5a65 Fix test-child-process-server-close (#20062) 2025-05-30 00:15:26 -07:00
Jarred Sumner
a9969b7db2 Update codex-test-sync.yml 2025-05-30 00:04:39 -07:00
Jarred Sumner
27a08fca84 Update codex-test-sync.yml 2025-05-29 23:40:57 -07:00
Jarred Sumner
a398bd62a3 Add passing node tests (#20052) 2025-05-29 22:53:28 -07:00
Jarred Sumner
2aa7c59727 Delete environment.json 2025-05-29 21:57:06 -07:00
Jarred Sumner
7765b61038 Update environment.json 2025-05-29 21:46:24 -07:00
Jarred Sumner
8a06ddb1fb Update environment.json 2025-05-29 21:11:53 -07:00
Jarred Sumner
2e76e69939 Update environment.json 2025-05-29 21:08:55 -07:00
Jarred Sumner
aa404b14c4 Fix http Expect header handling (#20026)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-05-29 20:03:32 -07:00
Jarred Sumner
a4819b41e9 Fix setSourceMapsEnabled node test (#20039)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-29 18:04:31 -07:00
Jarred Sumner
f5bfda9699 Fix http socket encoding check (#20031)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-29 17:05:51 -07:00
Jarred Sumner
9f5adfefe3 Add action that ensures the node test is downloaded from node's repo 2025-05-29 17:02:11 -07:00
Jarred Sumner
316c8d6c48 Add node:test:cp package.json script 2025-05-29 16:48:37 -07:00
Ashcon Partovi
da87890532 ci: Fix build image step with zig (#20023) 2025-05-29 16:07:35 -07:00
Meghan Denny
576f66c149 fix test-net-server-drop-connections.js (#19995) 2025-05-29 13:55:25 -07:00
Ashcon Partovi
cd0756c95c Revert "ci: Fix build image step with cross-compiled zig"
This reverts commit c92f3f7b72.
2025-05-29 12:44:43 -07:00
Ashcon Partovi
c92f3f7b72 ci: Fix build image step with cross-compiled zig 2025-05-29 12:43:29 -07:00
190n
f1226c9767 ci: fix machine.mjs for Windows instances (#20021)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-05-29 12:04:10 -07:00
Meghan Denny
b111e6db02 fix test-net-connect-handle-econnrefused.js (#19993) 2025-05-29 11:32:54 -07:00
Meghan Denny
ffffb634c6 fix test-net-bytes-stats.js (#20003) 2025-05-29 11:32:13 -07:00
Meghan Denny
d109183d3e fix test-net-better-error-messages-port.js (#20008) 2025-05-29 11:31:53 -07:00
Meghan Denny
14c9165d6f fix test-net-socket-local-address.js (#20010) 2025-05-29 11:31:26 -07:00
wldfngrs
c42539b0bf Fix parse segfault #18888 (#19817)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-29 08:44:19 -07:00
Meghan Denny
022a567af0 tidy from 19970 (#20002) 2025-05-29 00:31:44 -07:00
Jarred Sumner
cfb8956ac5 Cursor config 2025-05-28 23:09:16 -07:00
190n
2bb36ca6b4 Fix crash initializing process stdio streams while process is overridden (#19978) 2025-05-28 22:57:59 -07:00
Jarred Sumner
24b3de1bc3 Fix net close event and add reconnect test (#19975)
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-28 22:27:52 -07:00
Jarred Sumner
b01ffe6da8 Fix pauseOnConnect semantics for node:net server (#19987) 2025-05-28 22:23:57 -07:00
Kai Tamkun
579f2ecd51 Add node:vm leak tests (#19947)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-28 22:23:30 -07:00
Jarred Sumner
627b0010e0 Fix Node net bytesWritten with pending strings (#19962)
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-28 22:21:28 -07:00
Jarred Sumner
3369e25a70 Update environment.json 2025-05-28 22:04:38 -07:00
Jarred Sumner
06a40f0b29 Configure cursor 2025-05-28 21:55:08 -07:00
Jarred Sumner
7989352b39 Add node server close test (#19972)
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-28 21:38:52 -07:00
Jarred Sumner
e1ab6fe36b Add net autoselectfamily default test (#19970)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-28 21:30:22 -07:00
Jarred Sumner
14f59568cc Fix net.listen backlog arg & add Node test (#19966)
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-28 21:23:35 -07:00
github-actions[bot]
1855836259 deps: update c-ares to v1.34.5 (#19897)
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-05-28 19:50:29 -07:00
Meghan Denny
c85cf136a5 test-http-get-pipeline-problem.js passes on windows (#19980) 2025-05-28 19:28:02 -07:00
Meghan Denny
4da85ac9c1 test-http2-compat-serverrequest-pipe.js passes on windows (#19981) 2025-05-28 19:27:41 -07:00
Meghan Denny
9248d81871 test-http2-trailers-after-session-close.js passes on windows (#19983) 2025-05-28 19:27:12 -07:00
Meghan Denny
ba21d6d54b test-require-long-path.js passes on windows (#19984) 2025-05-28 19:26:44 -07:00
Meghan Denny
32985591eb test-http2-pipe-named-pipe.js passes on windows (#19982) 2025-05-28 19:26:20 -07:00
Jarred Sumner
544d399980 Start splitting install.zig into a few more files (#19959)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-28 19:25:59 -07:00
Meghan Denny
809992229f node:net rework (#18962)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-05-28 17:04:37 -07:00
190n
9a0624bd99 Delete files used by issue triage agent (#19955) 2025-05-28 12:07:47 -07:00
Dylan Conway
ec2c2281cf bump 2025-05-28 11:51:39 -07:00
Jarred Sumner
df017990aa Implement automatic workspace folders support for Chrome DevTools (#19949) 2025-05-28 00:25:30 -07:00
pfg
bf02d04479 Don't validate cookie strings passed in the CookieMap constructor (#19945)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-05-27 20:14:21 -07:00
Dylan Conway
5910504aeb bun pm audit -> bun audit (#19944) 2025-05-27 19:52:18 -07:00
Meghan Denny
8759527feb zsh: fix syntax error in bun audit completion 2025-05-27 19:51:18 -07:00
Jarred Sumner
7b4b299be0 Move this up even more 2025-05-27 18:22:30 -07:00
Jarred Sumner
ff8c2dcbc4 Bump WebKit again (#19943)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-27 17:55:43 -07:00
Jarred Sumner
a275ed654b Move this code up 2025-05-27 16:57:43 -07:00
Jarred Sumner
7b164ee9de Fix async explicit resource management in browser builds (#19896)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-27 16:45:54 -07:00
Varun Narravula
fc92921a4a fix: parse JSX namespace identifiers that have numbers in them (#19912)
Co-authored-by: Michael H <git@riskymh.dev>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-27 15:45:11 -07:00
Jarred Sumner
44d04968cd Add a cursor rule (#19926)
Co-authored-by: Andrew Jefferson <8148776+eastlondoner@users.noreply.github.com>
2025-05-27 15:45:01 -07:00
Ben Grant
e6ab636313 disallow bash tool in issue triage agent 2025-05-27 11:24:44 -07:00
Yechao LI
325d0b1ed6 fix: correct function type for spyon an optional function (#19240)
Co-authored-by: Alistair Smith <hi@alistair.sh>
2025-05-26 21:58:10 -07:00
Jarred Sumner
a8e4489e10 Add docs for bun pm audit (#19885)
Co-authored-by: Alistair Smith <hi@alistair.sh>
Co-authored-by: alii <25351731+alii@users.noreply.github.com>
2025-05-26 21:56:32 -07:00
Alistair Smith
31980bc151 perf_hooks.Histogram (#19920) 2025-05-26 21:18:22 -07:00
Jarred Sumner
e58df65a75 Bump WebKit (#19882) 2025-05-26 18:56:32 -07:00
Pierre
6317d6498f fix: Add missing CryptoKeyPair global type (#19921)
Co-authored-by: Alistair Smith <hi@alistair.sh>
2025-05-26 18:17:29 -07:00
Alistair Smith
9e61b70535 test-net-socket-constructor.js (#19804) 2025-05-26 13:14:42 -07:00
Alistair Smith
58c1372b50 Implements Node.js behaviour for parallel/test-tls-set-ciphers-error.js (#19443) 2025-05-26 13:13:59 -07:00
familyboat
88840dcafa doc: remove redundant word "page" (#19915) 2025-05-26 12:45:41 -07:00
Jarred Sumner
793a9752c9 Update react.md 2025-05-25 13:16:09 -07:00
Jarred Sumner
8f08e84c1e Update react.md 2025-05-25 12:56:46 -07:00
Jarred Sumner
3605531e34 Remove empty page 2025-05-25 12:09:25 -07:00
Jarred Sumner
7dc58e0ce4 Add BUN_OPTIONS env var (#19766)
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-05-24 13:36:51 -07:00
Sculas
15a58cca1c fix(windows): respect NO_COLOR in filter_run (#19888) 2025-05-24 13:33:16 -07:00
Jarred Sumner
a3fdfeb924 Add more to this list 2025-05-24 00:22:15 -07:00
Seth Flynn
c024e73e6a fix(BunRequest): make clone() return a BunRequest (#19813) 2025-05-23 23:37:47 -07:00
Kai Tamkun
392212b090 node:vm compatibility (#19703) 2025-05-23 22:59:58 -07:00
Jarred Sumner
3ea6133c46 CI: Remove unused top-level decls in formatter in zig (#19879)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-23 22:49:48 -07:00
190n
5d84f8a102 delete flaky test-worker-uncaught-exception.js (#19857) 2025-05-23 22:49:09 -07:00
Alistair Smith
9e329ee605 bun pm audit (#19855) 2025-05-23 22:31:12 -07:00
Kai Tamkun
76f6574729 Fix memory leak in c_ares.zig Error.Deferred.rejectLater (#19871) 2025-05-23 20:54:50 -07:00
Jarred Sumner
50b938561a Normalize versions in bun pm view <pkg> versions like npm view does (#19870)
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2025-05-23 18:10:56 -07:00
190n
3b75095f0c Use long timeout for bun test launch configurations (#19869) 2025-05-23 18:03:09 -07:00
Jarred Sumner
7b127c946d Fix regression from #19783 (#19837) 2025-05-23 17:49:36 -07:00
Ashcon Partovi
b9a63893fe ci: Fix permissions with gh CLI 2025-05-23 17:23:34 -07:00
Ashcon Partovi
ff1a35668f ci: Fix claude tool permissions 2025-05-23 17:17:04 -07:00
Ashcon Partovi
b36b4b2888 ci: Fix triage permissions 2025-05-23 17:13:55 -07:00
Ashcon Partovi
e7e5528632 ci: Fix triage workflow 2025-05-23 17:10:30 -07:00
Ashcon Partovi
9a5ff02420 ci: Fix anthropic auth in CI 2025-05-23 17:09:52 -07:00
Ashcon Partovi
4e9ee08a4a ci: Fix running claude in CI 2025-05-23 17:08:12 -07:00
Ashcon Partovi
e11ac9d1b8 ci: fix install claude in workflow 2025-05-23 17:06:05 -07:00
Ashcon Partovi
e9414966ca ci: Install claude for agent workflow 2025-05-23 17:01:38 -07:00
Ashcon Partovi
b2ae98865b ci: fix triage on linux 2025-05-23 16:58:30 -07:00
Ashcon Partovi
e8ed50cd9a ci: tweak how triage automation works 2025-05-23 16:56:14 -07:00
190n
9dd799d2e6 Implement Worker.getHeapSnapshot (#19706)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-05-23 16:50:13 -07:00
Meghan Denny
ba28eeece6 ci: add update-zstd.yml (#19812)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-23 16:49:37 -07:00
Meghan Denny
e9f908fcbf cmake: move SetupWebkit early-return so that WEBKIT_NAME is always printed (#19716) 2025-05-23 15:49:57 -07:00
Ashcon Partovi
654472f217 ci: fix triage automation trigger, again 2025-05-23 15:46:39 -07:00
Ashcon Partovi
5dcf99424c ci: fix triage automation trigger 2025-05-23 15:45:34 -07:00
Ashcon Partovi
ae91711010 ci: Fix triage workflow 2025-05-23 15:42:26 -07:00
Ashcon Partovi
ca6ba0fa2d ci: add triage automation (#19873) 2025-05-23 15:38:15 -07:00
Jarred Sumner
3195df8796 Remove leading period 2025-05-22 23:55:57 -07:00
Jarred Sumner
9d1eace981 Add bun pm view command (#19841)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-22 23:51:31 -07:00
Dylan Conway
8e80afbce1 Replace string runtime flags with enum (#19827) 2025-05-22 22:36:46 -07:00
190n
efb6b823c9 Strongly type GlobalObject::processObject() (#19826) 2025-05-22 21:48:48 -07:00
Jarred Sumner
6d348fa759 Add glob sources workflow (#19860) 2025-05-22 21:48:22 -07:00
Jarred Sumner
69be630aea WebKit Upgrade (#19839)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Ben Grant <ben@bun.sh>
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-05-22 21:12:43 -07:00
Jarred Sumner
bca833ad59 Split lockfile.zig into a more logical directory structure (#19858) 2025-05-22 21:11:54 -07:00
Ciro Spaciari
ef9ea8ae1c fix(fetch) ignore trailers and add trailer tests (#19854) 2025-05-22 20:17:21 -07:00
Dylan Conway
a844957eb3 Use operationMathPow for parser constant folding (#19853) 2025-05-22 20:16:37 -07:00
Jarred Sumner
573927c4bf Add a cursor rule 2025-05-22 12:04:10 -07:00
190n
3e97c1caf3 restore bun bd and make it quiet (#19831) 2025-05-22 00:40:48 -07:00
Meghan Denny
b4450db807 Bump 2025-05-21 16:58:52 -07:00
Alistair Smith
6a363a38da node:net compat: Invalid port test for .listen (#19768) 2025-05-21 11:56:17 -07:00
Jarred Sumner
ffa286ef70 Update docs on workspaces and catalogs (#19815) 2025-05-21 11:38:37 -07:00
Seokho Song, dave@modusign
2fc8785868 Add x25519 elliptic curve cryptography to webcrypto (#19674) 2025-05-21 11:23:23 -07:00
Dylan Conway
8ddb92085b update bun.lock types for catalog(s) (#19814)
Co-authored-by: RiskyMH <git@riskymh.dev>
2025-05-21 00:22:18 -07:00
Jarred Sumner
4ca83be84f Add Zstd decompression to HTTP client (#19800)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2025-05-20 23:26:47 -07:00
Jarred Sumner
8aae534270 Fix Node browser fallbacks to have util.inherit and other size improvements (#19783)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-20 23:25:52 -07:00
Dylan Conway
98ee30eccf Implement catalogs in bun install (#19809)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-05-20 23:03:21 -07:00
Jarred Sumner
562a65037d Bump zstd version (#19801)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-20 21:32:18 -07:00
pfg
beb1db967b Fix numeric header in node http server (#19811) 2025-05-20 21:32:07 -07:00
Jarred Sumner
0efbb29581 Do not use TCP cork in proxied HTTPS (#19794)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-20 21:27:17 -07:00
Ciro Spaciari
0e883c935c fix(install/fetch) proper handle proxy (#19771)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-20 21:11:22 -07:00
Jarred Sumner
497360d543 Fix BroadcastChannel.unref() return value (#19810)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2025-05-20 21:09:16 -07:00
190n
e23491391b bun run prettier (#19807)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-05-20 20:01:38 -07:00
190n
259bf47abd Add sourceMap to launch.json so lldb can find WebKit code (#19263) 2025-05-20 16:50:47 -07:00
190n
d1ac52da2c ci: use ARM EC2 instances for build-zig (#19781) 2025-05-20 12:41:06 -07:00
Ben Grant
1ebec90d6e Revert "Add test from #18287 (#19775)"
This reverts commit f1504c4265.
2025-05-20 12:22:01 -07:00
190n
f1504c4265 Add test from #18287 (#19775) 2025-05-20 11:56:30 -07:00
Ashcon Partovi
21f238a827 cmake: Move sources to their own folder (#19776) 2025-05-20 10:53:57 -07:00
Dylan Conway
33be08bde8 Fix RuntimeError.from return value (#19777)
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: dylan-conway <dylan-conway@users.noreply.github.com>
2025-05-19 17:05:10 -07:00
Braden Everson
67b64c3334 Update TextDecoder's constructor to Handle Undefined (#19708)
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2025-05-19 16:44:57 -07:00
Jarred Sumner
bfd12eeeba [bun install] Do not prefetch dns for npm registry if proxy (#19749) 2025-05-19 12:35:16 -07:00
Jarred Sumner
004ee11bed [internal builtins] Small typescript fix 2025-05-19 12:18:50 -07:00
Jarred Sumner
457c15e424 [bun install] Fix race condition when error occurs while extracting tarballs (#19751) 2025-05-19 11:55:34 -07:00
Jarred Sumner
815182799e [bun install] Don't save manifest cache when --no-cache is passed (#19752) 2025-05-19 11:39:39 -07:00
Jarred Sumner
a5cb42c407 Add Claude Code GitHub Workflow (#19769) 2025-05-19 11:28:20 -07:00
Jarred Sumner
0dade44a37 [internal] Add run:linux package.json script to run a command using a Linux debug build of bun 2025-05-19 06:56:16 -07:00
Jarred Sumner
09d3de918f Compress debug symbols in debug builds 2025-05-19 03:47:07 -07:00
Jarred Sumner
9e13a93215 [internal] Fix importing test/harness.ts without running bun install 2025-05-19 02:46:31 -07:00
Shubham Verma
2c5e9e5532 Removedep (#19737) 2025-05-18 06:13:37 -07:00
github-actions[bot]
9a392b39e2 deps: update libdeflate to v1.24 (#19731)
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-05-17 21:38:34 -07:00
Jarred Sumner
11ed29068f Simplify the root package.json (#19718) 2025-05-17 05:21:28 -07:00
Jarred Sumner
ea7b9ea976 Create AGENTS.md 2025-05-17 04:41:13 -07:00
Jarred Sumner
9bee7a64a2 Support method-specific routes for html & static routes (#19710) 2025-05-17 00:28:01 -07:00
Jarred Sumner
ea6f6dff7f bun init: Add --react flag (#19687) 2025-05-16 23:40:56 -07:00
pfg
342fe232d0 test-eventtarget.js (#19547)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-05-16 23:17:35 -07:00
pfg
89c5e40544 ReadableStream & ReadableByteStream fixes (#19683) 2025-05-16 22:30:58 -07:00
Jarred Sumner
95af099a0c Fixes #19695 (#19712) 2025-05-16 22:29:28 -07:00
pfg
8686361f4f fix constant folding bug (#19707) 2025-05-16 20:32:29 -07:00
Dylan Conway
3983010835 fix test-set-process-debug-port.js (#19662)
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-05-15 21:38:50 -07:00
Jarred Sumner
6bbdbcef33 Update README.md 2025-05-15 03:58:11 -07:00
Jarred Sumner
8f397fb5b7 Remove broken link 2025-05-15 03:57:31 -07:00
Jarred Sumner
34fd2437fd Update README.md 2025-05-15 03:36:33 -07:00
Jarred Sumner
bf7d9f272d Add old-version label when filing issues with very old versions, remove label if updated 2025-05-14 22:34:56 -07:00
Dylan Conway
45198e1e45 add ClientRequest.prototype.clearTimeout (#19612)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-14 22:15:33 -07:00
pfg
df8ad0cf0b Fix utf-8 parsing issue in the parser (#19666) 2025-05-14 22:14:55 -07:00
pfg
a7b46ebbfe fastGet can throw (#19506)
Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-14 22:14:20 -07:00
190n
6090833da6 deflake worker.test.ts (#19634) 2025-05-14 18:58:24 -07:00
190n
efc9cae938 pass test-worker-message-port-constructor (#19617) 2025-05-14 18:57:29 -07:00
pfg
06fa1ed598 Add support for maxSendHeaderBlockLength in http2 client (#19642) 2025-05-14 18:56:55 -07:00
190n
cd8d037c79 pass test-worker-message-event.js (#19614)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
2025-05-14 18:56:14 -07:00
Dylan Conway
5e8fbf57cb fix test-outgoing-message-pipe.js (#19613) 2025-05-14 18:50:26 -07:00
Jarred Sumner
83a825edff More efficient protect/unprotect (#19621) 2025-05-14 18:49:35 -07:00
190n
85766e90bf deflake setTimeout.test.js (#19636) 2025-05-14 18:49:11 -07:00
Meghan Denny
839ad3732f node: fix test-net-access-byteswritten.js (#19643) 2025-05-14 18:48:35 -07:00
Meghan Denny
d774baa28a tidyings from 18962 (#19644) 2025-05-14 18:47:51 -07:00
Alistair Smith
6e063fa57b Use "module": "Preserve" (#19655)
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
2025-05-14 18:43:15 -07:00
190n
a5358fbbd9 Fix Linux ASan debug builds (#19657) 2025-05-14 18:42:42 -07:00
Michael H
4a6f179db5 Fix autoinstall flags - make --install=force work (#19638) 2025-05-13 21:09:15 -07:00
190n
270c09bd90 Fix bundler_compile.test.ts (#19633) 2025-05-13 16:51:19 -07:00
Ciro Spaciari
d40662760a Revert "Revert "compat(http2) validations and some behavior fixes (#19558)"" (#19630) 2025-05-13 16:47:42 -07:00
Jarred Sumner
6a922be010 ci: never retry on SIGABRT (#19623) 2025-05-13 00:27:52 -07:00
Seokho Song, dave@modusign
dcf1b1fbf5 Fix css custom property parser uninteded removing previous token (#19599) 2025-05-12 18:45:46 -07:00
190n
4e234ded2a Revert "compat(http2) validations and some behavior fixes (#19558)" (#19616) 2025-05-12 18:02:37 -07:00
Jarred Sumner
3f360b0682 chore: format packages/scripts folder (#19611)
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-05-12 17:12:17 -07:00
Jarred Sumner
efdeac0a85 Make one of the js_lexer packed structs a u8 (#19497) 2025-05-12 14:14:21 -07:00
Dylan Conway
d900309354 add missing snapshot from esbuild/css.test.ts (#19605) 2025-05-12 14:13:12 -07:00
github-actions[bot]
da7dfa1b76 deps: update sqlite to 3.49.200 (#19582)
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
2025-05-12 14:10:39 -07:00
190n
a182c313e2 pass test-worker-nested-uncaught.js (#19509) 2025-05-12 14:10:18 -07:00
Dylan Conway
a2ae0d06b3 fix test-http-agent-getname.js (#19609) 2025-05-12 13:44:10 -07:00
Dylan Conway
26579c3ba5 fix test-abortsignal-any.mjs (#19511) 2025-05-12 13:43:54 -07:00
Ciro Spaciari
dd53294a25 compat(http2) validations and some behavior fixes (#19558)
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
Co-authored-by: 190n <ben@bun.sh>
2025-05-12 13:42:24 -07:00
Feng.YJ
0b8773ed76 chore: flag vscode JSON files as jsonc (#19515) 2025-05-12 12:07:02 -07:00
Ciro Spaciari
0a0205be6e compat(node:http) more (#19527)
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
Co-authored-by: 190n <ben@bun.sh>
2025-05-10 21:28:31 -07:00
Meghan Denny
de88da687f Bump 2025-05-10 10:50:01 -07:00
Jarred Sumner
64ed68c9e0 Delete .node files from bun build --compile after dlopen (#19551)
Co-authored-by: 190n <ben@bun.sh>
2025-05-09 21:26:28 -07:00
Alistair Smith
d09cbdfae9 Add a RedisClient#getBuffer method (#19567) 2025-05-09 21:25:40 -07:00
Dylan Conway
15a5e3a924 add process.resourceUsage (#19481) 2025-05-09 19:49:52 -07:00
Dylan Conway
ec865e385a fix test-webcrypto-random.js (#19264)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-09 18:09:32 -07:00
Dylan Conway
4a210138a9 implement --no-addons flag and "node-addons" export condition (#19530) 2025-05-09 18:07:55 -07:00
pfg
a4bc1c8a35 Fix inline snapshot whitespace matching bug (#19564)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-09 15:37:30 -07:00
Ciro Spaciari
de487713ed refactor(HttpParser.h) make it more readable (#19489) 2025-05-08 23:52:17 -07:00
Jarred Sumner
14b439a115 Fix formatters not running in CI + delete unnecessary files (#19433) 2025-05-08 23:22:16 -07:00
190n
b5f31a6ee2 node:worker_threads: improve error messages, support environmentData, emit worker event (#18768)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-05-08 19:27:46 -07:00
Alistair Smith
a8cc395a20 fix tls-keyengine-invalid-arg-type test (#19505)
Co-authored-by: Meghan Denny <meghan@bun.sh>
2025-05-08 18:52:00 -07:00
190n
71c770f3ae fix sql.test.ts (#19544) 2025-05-08 18:51:32 -07:00
Dylan Conway
ff1ff78e77 cmake: change sources from glob-based to file-based (#19535) 2025-05-08 16:58:06 -07:00
pfg
500199fe8b More node tests (#19197) 2025-05-07 16:21:08 -07:00
190n
52de27322a Do not ignore ASan failures in CI (#19445) 2025-05-07 16:07:59 -07:00
Dylan Conway
acf36d958a fix(npmrc): handle BOM conversion (#18878) 2025-05-06 22:16:56 -07:00
pfg
00a3cbd977 more child-process (#18688)
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
2025-05-06 22:12:24 -07:00
Jarred Sumner
d291b56f8b Fixes #19475 (#19495)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2025-05-06 20:17:23 -07:00
Alistair Smith
920b3dc8de @types/bun: Improvements to Bun.SQL (#19488)
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2025-05-06 17:32:10 -07:00
190n
b478171202 Initialize CODEOWNERS (#19480)
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
2025-05-06 12:23:42 -07:00
Jarred Sumner
1c464c5d14 Add stress test for Bun.serve() routes hot reloading 2025-05-06 03:23:16 -07:00
Jarred Sumner
5a58c02ed8 Normalize websocket URL in HMR to support older versions of Chrome (#19469) 2025-05-05 19:41:40 -07:00
Dylan Conway
8deac8b3b9 node:util fixes (#19439) 2025-05-05 19:40:57 -07:00
pfg
862ae48ebd add back perf tester (#19484) 2025-05-05 19:40:29 -07:00
Dylan Conway
33de1b81bf sync webkit (#19467) 2025-05-05 19:39:44 -07:00
Jarred Sumner
0a624bc0a8 Split WebSocket into more files (#19471) 2025-05-05 19:38:52 -07:00
Ashcon Partovi
c130d1bd69 ci: Switch build-zig to use EC2 (#19487) 2025-05-05 18:05:08 -07:00
Jarred Sumner
cc33a8562a Try windows CI (#19485) 2025-05-05 18:02:30 -07:00
Dylan Conway
428b9a92de test ci fix (#19483) 2025-05-05 17:09:46 -07:00
Alistair Smith
ded202d57b fix: parallel/test-cluster-eaddrinuse.js passing (#19444) 2025-05-05 17:08:18 -07:00
Dylan Conway
9dc1ce4f47 move next-auth.test.ts fixture into temp directory (#19482) 2025-05-05 16:30:53 -07:00
Jarred Sumner
1cf492c208 Update plugins.md 2025-05-05 15:40:07 -07:00
Jarred Sumner
09fc87850f Add a uuid guide 2025-05-05 03:40:07 -07:00
Meghan Denny
d69bd36c90 Bump 2025-05-04 13:52:08 -07:00
Jarred Sumner
85e5e31743 Clarify 2025-05-04 05:33:45 -07:00
Jarred Sumner
aecd91d11a Clarify 2025-05-04 05:29:30 -07:00
Jarred Sumner
0785effaab Fix the doc page for html 2025-05-03 23:01:44 -07:00
Jarred Sumner
32a47ae459 Fix uploading -profile builds in CI 2025-05-03 22:05:46 -07:00
Jarred Sumner
e9c653a1b6 Reduce CPU usage when using Bun.spawnSync with inherit (#19105) 2025-05-03 20:33:57 -07:00
Jarred Sumner
c419ae587a Fix CI build 2025-05-03 17:00:48 -07:00
Jarred Sumner
d26e140287 Make the development: setting slightly cleaner in the init templates 2025-05-03 16:57:53 -07:00
Jarred Sumner
8e829e1cd9 Fix windows release build 2025-05-03 04:13:40 -07:00
Jarred Sumner
ffa1d85642 Update ci.mjs 2025-05-03 04:02:16 -07:00
Jarred Sumner
26ae8b7ff6 Update ci.mjs 2025-05-03 03:58:36 -07:00
Jarred Sumner
9639630110 Disable benchmark step for now 2025-05-03 03:47:54 -07:00
Jarred Sumner
570e6b7e6a Add WebKit Inspector support to Bun's HTTP Server (#19340) 2025-05-03 03:11:55 -07:00
Jarred Sumner
b47c3bb356 Fix crash involving importing invalid file URLs (#19451) 2025-05-02 22:44:07 -07:00
Dylan Conway
a0819e9d02 fix more node:timers tests (#19432)
Co-authored-by: 190n <ben@bun.sh>
2025-05-02 20:50:02 -07:00
190n
754032c9ff skip flaky fetch test (#19437) 2025-05-02 20:49:15 -07:00
190n
b212e9dfcc Fix local ASan build (#19441) 2025-05-02 20:19:39 -07:00
chloe caruso
67f0c3e016 dev server: reference counted source map partials (#19447) 2025-05-02 20:02:00 -07:00
Jarred Sumner
7521e45b17 --console & console: true (#19427)
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com>
2025-05-02 12:55:57 -07:00
Ashcon Partovi
e2ed4f33a9 Remove unused files in bun-uws and bun-usockets (#19435) 2025-05-02 10:50:39 -07:00
Jarred Sumner
d8a69d6823 Enable ASAN with linux-x64-asan in CI 2025-05-02 10:44:09 -07:00
chloe caruso
32c1dcb70d dev server: unref source maps (#19371)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-02 04:13:54 -07:00
pfg
f18a6d7be7 test-whatwg-encoding-custom-textdecoder-api-invalid-label.js (#19430) 2025-05-02 04:04:44 -07:00
pfg
bbc98cb777 test-tls-root-certificates.js (#19426) 2025-05-02 04:03:52 -07:00
pfg
5f58be4ed4 test-v8-serialize-leak.js (#19425) 2025-05-01 23:45:54 -07:00
190n
16ca158267 clean up failing tests (#19424) 2025-05-01 19:32:31 -07:00
Kai Tamkun
992effaa26 node:vm Script cachedData support (#19379) 2025-05-01 16:37:02 -07:00
190n
dbd30fe33a chore: fix windows debug build (#19406) 2025-05-01 16:36:19 -07:00
Jarred Sumner
af0704b35a Fix race condition in debug build logs (#19414) 2025-05-01 16:36:04 -07:00
Meghan Denny
9e201eff9e node:net: implement BlockList (#19277) 2025-05-01 16:09:44 -07:00
Alistair Smith
5874cc44d3 Bring back default type arguments for Bun.[Sync]Subprocess (#19423) 2025-05-01 12:39:11 -07:00
190n
d4cad5d856 remove test-http2-large-file (#19407) 2025-04-30 17:33:05 -07:00
Jarred Sumner
d60fcefc0c Do not set stack limit at runtime (#19405) 2025-04-30 16:12:12 -07:00
190n
7e63a7e228 restore "remove most static initializers" and investigate test (#19374)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-04-30 15:05:38 -07:00
ALBIN BABU VARGHESE
fbbc16fec6 Fixed TextDecoder fatal option showing invalid arg when giving 0 or 1 (#19378)
Co-authored-by: Albin <albinbabuvarghese@gmail.com>
2025-04-30 14:47:58 -07:00
Dylan Conway
e91d190d94 fix(install): allow global postinstalls (#19387) 2025-04-30 14:42:34 -07:00
Jarred Sumner
44c97fa591 Add WebKit Inspector support for Bun's Dev Server (#19320)
Co-authored-by: chloe caruso <git@paperclover.net>
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com>
2025-04-29 18:34:26 -07:00
Jarred Sumner
7230b88c5d Clean up usage of .destroy in sinks (#19302) 2025-04-29 18:30:43 -07:00
Meghan Denny
11978cd48d node: fix test-http-client-request-options.js (#19377) 2025-04-29 18:29:47 -07:00
Meghan Denny
2fd2d6eeea node: fix test-http-client-reject-unexpected-agent.js (#19376) 2025-04-29 18:28:46 -07:00
Meghan Denny
2a2247bbb6 js: fix serialization of non-transferable objects (#19351) 2025-04-29 18:23:26 -07:00
Jarred Sumner
3ea7953474 Revert "investigate static-initializers.test.ts (#19352)"
This reverts commit b97cc6cb6c.
2025-04-29 14:24:31 -07:00
190n
b97cc6cb6c investigate static-initializers.test.ts (#19352) 2025-04-29 14:23:20 -07:00
Meghan Denny
4dc7076cad node: fix test-http-client-agent-abort-close-event.js (#19359) 2025-04-29 13:01:53 -07:00
Meghan Denny
8b10b0ae6b Bump 2025-04-28 22:48:43 -07:00
Alistair Smith
d4b02dcdc2 Support >= 3 arguments in Spawn.stdio (#19358) 2025-04-28 21:35:20 -07:00
chloe caruso
26e296a7e8 devserver: fix cases where source maps would not remap (#19289) 2025-04-28 17:56:35 -07:00
Ciro Spaciari
cb6abd2116 fix(node:http) proper send chunked encoding, dont send \r\b twice after headers are flushed (#19344) 2025-04-28 16:48:36 -07:00
Alistair Smith
8bd05b534d define sqlite constants as namespace (#19349) 2025-04-28 16:35:36 -07:00
190n
7b134693d6 Revert "Remove most static initializers (#19298)" (#19353) 2025-04-28 15:54:31 -07:00
Meghan Denny
ec6cb8283e bun.serve: use getBooleanStrict for tls.requestCert and tls.rejectUnauthorized (#19293) 2025-04-28 03:43:49 -07:00
Jarred Sumner
93ff4d97da Add assertion about returning pointers in constructors (#19332) 2025-04-28 02:12:59 -07:00
Dylan Conway
465379d96a add Timeout.prototype.close, _idleTimeout and _onTimeout (#19318) 2025-04-28 00:25:25 -07:00
Jarred Sumner
745b37038c Fix crash in InspectorTestReporterAgent (#19325) 2025-04-28 00:22:45 -07:00
Dylan Conway
1ee7bab0e7 fix test-parse-args.mjs (#19308) 2025-04-26 23:27:50 -07:00
Dylan Conway
915b8be722 fix node:process: avoid duplicate default export (#19311) 2025-04-26 17:19:36 -07:00
Dylan Conway
448340cf3f fix test-fs-read-position-validation.mjs (#19287) 2025-04-26 04:43:53 -07:00
Jarred Sumner
9ca2e1445c Remove most static initializers (#19298) 2025-04-26 04:03:59 -07:00
Jarred Sumner
4b297ef61a Update nodejs-apis.md 2025-04-26 03:52:33 -07:00
Jarred Sumner
b82b330954 Update nodejs-apis.md 2025-04-26 03:51:27 -07:00
Meghan Denny
147fb975e1 test: fix bundler_compile.test.ts (#19296) 2025-04-25 23:43:07 -07:00
Christoph
b7c5bd0922 Fix crash on empty text file import (#19165)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-04-25 23:42:41 -07:00
pfg
b97561f3f8 mime api (test-mime-api, test-mime-whatwg) (#19284) 2025-04-25 23:40:09 -07:00
pfg
ea681fa9ec test-assert-typedarray-deepequal (#19285) 2025-04-25 23:36:07 -07:00
Meghan Denny
d531e86634 node:dns: match expected .code on lookup() error (#19294) 2025-04-25 23:34:13 -07:00
Dylan Conway
4c059b290c implement process.ref and process.unref (#19265) 2025-04-25 18:27:11 -07:00
Dylan Conway
46881358e5 Add BroadcastChannel.prototype[util.inspect.custom] (#19269) 2025-04-25 18:25:22 -07:00
190n
b58afbc7d5 Bump WebKit (#19291) 2025-04-25 18:23:31 -07:00
190n
092ad39f6c Disable warnings from Highway (#19288) 2025-04-25 18:23:10 -07:00
cc
181da96604 compatibility: invalid arg error if error is nullptr in napi_throw (#19283) 2025-04-25 18:21:44 -07:00
Ashcon Partovi
397aa4a8a4 ci: merge build c++ and build vendor steps (#19292) 2025-04-25 18:11:33 -07:00
Ashcon Partovi
8d3f1d07f9 Update runner.node.mjs 2025-04-25 14:42:01 -07:00
Meghan Denny
eb0ea8e96b misc: tidy socket.zig (#19274) 2025-04-25 10:08:07 -07:00
Jarred Sumner
5152254b2b Add test for non-reified static properties on the Bun global (#19270) 2025-04-25 00:07:34 -07:00
Dylan Conway
83a2a64965 fix test-queue-microtask.js (#19262) 2025-04-24 23:03:48 -07:00
Alistair Smith
a1eb595d86 Improve types and autocomplete for Bun.spawn (fixes #17274) (#19162) 2025-04-24 22:04:28 -07:00
Alistair Smith
e6c516465e Implement test-http2-client-port-80.js (#19267) 2025-04-24 22:03:23 -07:00
Alistair Smith
316cc20456 Fix test-http2-client-request-options-errors (#19259)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-04-24 21:42:22 -07:00
Ciro Spaciari
59b2a60790 compat(node:http) more passing (#19236)
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
Co-authored-by: 190n <ben@bun.sh>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-04-24 19:26:55 -07:00
Dylan Conway
d070f110d0 Revert "add test"
This reverts commit 33d656eebe.
2025-04-24 16:43:14 -07:00
Dylan Conway
2d8009c19b Revert "add process.ref and process.unref"
This reverts commit 1924c27f1d.
2025-04-24 16:43:13 -07:00
Dylan Conway
33d656eebe add test 2025-04-24 16:42:13 -07:00
Dylan Conway
1924c27f1d add process.ref and process.unref 2025-04-24 16:41:58 -07:00
Alistair Smith
7a3dea8ac4 Remove failing crypto.subtle.deriveKey check (#19261) 2025-04-24 15:29:08 -07:00
Eckhardt (Kaizen) Dreyer
512dee748b docs: update WebSockets example to use Bun.CookieMap (#19181) 2025-04-24 00:01:03 -07:00
Dylan Conway
41388204b9 update webkit (#19238) 2025-04-23 23:21:22 -07:00
Alistair Smith
98c66605e5 types: declare Shell as a type (allows for assignment) (#19169) 2025-04-23 23:19:53 -07:00
chloe caruso
be65720f71 introduce basic devserver stress testing, fix two crashes (#19237) 2025-04-23 22:24:39 -07:00
31483 changed files with 190992 additions and 307925 deletions

78
.agent/agent.mjs Normal file
View File

@@ -0,0 +1,78 @@
import { spawnSync } from "node:child_process";
import { readFileSync, existsSync } from "node:fs";
import { parseArgs } from "node:util";
const { positionals, values } = parseArgs({
allowPositionals: true,
options: {
help: {
type: "boolean",
short: "h",
default: false,
},
interactive: {
type: "boolean",
short: "i",
default: false,
},
},
});
if (values.help || positionals.length === 0) {
console.log("Usage: node agent.mjs <prompt_name> [extra_args...]");
console.log("Example: node agent.mjs triage fix bug in authentication");
console.log("Options:");
console.log(" -h, --help Show this help message");
console.log(" -i, --interactive Run in interactive mode");
process.exit(0);
}
const promptName = positionals[0].toUpperCase();
const promptFile = `.agent/${promptName}.md`;
const extraArgs = positionals.slice(1);
if (!existsSync(promptFile)) {
console.error(`Error: Prompt file "${promptFile}" not found`);
console.error(`Available prompts should be named like: .agent/triage.md, .agent/debug.md, etc.`);
process.exit(1);
}
try {
let prompt = readFileSync(promptFile, "utf-8");
const githubEnvs = Object.entries(process.env)
.filter(([key]) => key.startsWith("GITHUB_"))
.sort(([a], [b]) => a.localeCompare(b));
if (githubEnvs.length > 0) {
const githubContext = `## GitHub Environment\n\n${githubEnvs
.map(([key, value]) => `**${key}**: \`${value}\``)
.join("\n")}\n\n---\n\n`;
prompt = githubContext + prompt;
}
if (extraArgs.length > 0) {
const extraArgsContext = `\n\n## Additional Arguments\n\n${extraArgs.join(" ")}\n\n---\n\n`;
prompt = prompt + extraArgsContext;
}
const claudeArgs = [prompt, "--allowedTools=Edit,Write,Replace,Search", "--output-format=json"];
if (!values.interactive) {
claudeArgs.unshift("--print");
}
const { status, error } = spawnSync("claude", claudeArgs, {
stdio: "inherit",
encoding: "utf-8",
});
if (error) {
console.error("Error running claude:", error);
process.exit(1);
}
process.exit(status || 0);
} catch (error) {
console.error(`Error reading prompt file "${promptFile}":`, error);
process.exit(1);
}

View File

@@ -35,7 +35,7 @@ import {
* @typedef {"musl"} Abi
* @typedef {"debian" | "ubuntu" | "alpine" | "amazonlinux"} Distro
* @typedef {"latest" | "previous" | "oldest" | "eol"} Tier
* @typedef {"release" | "assert" | "debug"} Profile
* @typedef {"release" | "assert" | "debug" | "asan"} Profile
*/
/**
@@ -107,6 +107,7 @@ const buildPlatforms = [
{ os: "linux", arch: "aarch64", distro: "amazonlinux", release: "2023", features: ["docker"] },
{ os: "linux", arch: "x64", distro: "amazonlinux", release: "2023", features: ["docker"] },
{ os: "linux", arch: "x64", baseline: true, distro: "amazonlinux", release: "2023", features: ["docker"] },
{ os: "linux", arch: "x64", profile: "asan", distro: "amazonlinux", release: "2023", features: ["docker"] },
{ os: "linux", arch: "aarch64", abi: "musl", distro: "alpine", release: "3.21" },
{ os: "linux", arch: "x64", abi: "musl", distro: "alpine", release: "3.21" },
{ os: "linux", arch: "x64", abi: "musl", baseline: true, distro: "alpine", release: "3.21" },
@@ -125,14 +126,12 @@ const testPlatforms = [
{ os: "linux", arch: "aarch64", distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "x64", distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "x64", baseline: true, distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "x64", profile: "asan", distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "aarch64", distro: "ubuntu", release: "24.04", tier: "latest" },
{ os: "linux", arch: "aarch64", distro: "ubuntu", release: "22.04", tier: "previous" },
{ os: "linux", arch: "aarch64", distro: "ubuntu", release: "20.04", tier: "oldest" },
{ os: "linux", arch: "x64", distro: "ubuntu", release: "24.04", tier: "latest" },
{ os: "linux", arch: "x64", distro: "ubuntu", release: "22.04", tier: "previous" },
{ os: "linux", arch: "x64", distro: "ubuntu", release: "20.04", tier: "oldest" },
{ os: "linux", arch: "x64", baseline: true, distro: "ubuntu", release: "24.04", tier: "latest" },
{ os: "linux", arch: "x64", baseline: true, distro: "ubuntu", release: "22.04", tier: "previous" },
{ os: "linux", arch: "x64", baseline: true, distro: "ubuntu", release: "20.04", tier: "oldest" },
{ os: "linux", arch: "aarch64", abi: "musl", distro: "alpine", release: "3.21", tier: "latest" },
{ os: "linux", arch: "x64", abi: "musl", distro: "alpine", release: "3.21", tier: "latest" },
@@ -229,13 +228,7 @@ function getRetry(limit = 0) {
manual: {
permit_on_passed: true,
},
automatic: [
{ exit_status: 1, limit },
{ exit_status: -1, limit: 1 },
{ exit_status: 255, limit: 1 },
{ signal_reason: "cancel", limit: 1 },
{ signal_reason: "agent_stop", limit: 1 },
],
automatic: false,
};
}
@@ -316,6 +309,19 @@ function getCppAgent(platform, options) {
});
}
/**
* @returns {Platform}
*/
function getZigPlatform() {
return {
os: "linux",
arch: "aarch64",
abi: "musl",
distro: "alpine",
release: "3.21",
};
}
/**
* @param {Platform} platform
* @param {PipelineOptions} options
@@ -324,9 +330,14 @@ function getCppAgent(platform, options) {
function getZigAgent(platform, options) {
const { arch } = platform;
return {
queue: "build-zig",
};
// Uncomment to restore to using macOS on-prem for Zig.
// return {
// queue: "build-zig",
// };
return getEc2Agent(getZigPlatform(), options, {
instanceType: "r8g.large",
});
}
/**
@@ -379,30 +390,32 @@ function getTestAgent(platform, options) {
* @returns {Record<string, string | undefined>}
*/
function getBuildEnv(target, options) {
const { profile, baseline, abi } = target;
const release = !profile || profile === "release";
const { baseline, abi } = target;
const { canary } = options;
const revision = typeof canary === "number" ? canary : 1;
const isMusl = abi === "musl";
let CMAKE_BUILD_TYPE = release ? "Release" : profile === "debug" ? "Debug" : "RelWithDebInfo";
if (isMusl && release) {
CMAKE_BUILD_TYPE = "MinSizeRel";
}
return {
CMAKE_BUILD_TYPE,
ENABLE_BASELINE: baseline ? "ON" : "OFF",
ENABLE_CANARY: revision > 0 ? "ON" : "OFF",
CANARY_REVISION: revision,
ENABLE_ASSERTIONS: release ? "OFF" : "ON",
ENABLE_LOGS: release ? "OFF" : "ON",
ABI: isMusl ? "musl" : undefined,
ABI: abi === "musl" ? "musl" : undefined,
CMAKE_VERBOSE_MAKEFILE: "ON",
CMAKE_TLS_VERIFY: "0",
};
}
/**
* @param {Target} target
* @param {PipelineOptions} options
* @returns {string}
*/
function getBuildCommand(target, options) {
const { profile } = target;
const label = profile || "release";
return `bun run build:${label}`;
}
/**
* @param {Platform} platform
* @param {PipelineOptions} options
@@ -416,7 +429,7 @@ function getBuildVendorStep(platform, options) {
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform, options),
command: "bun run build:ci --target dependencies",
command: `${getBuildCommand(platform, options)} --target dependencies`,
};
}
@@ -426,6 +439,7 @@ function getBuildVendorStep(platform, options) {
* @returns {Step}
*/
function getBuildCppStep(platform, options) {
const command = getBuildCommand(platform, options);
return {
key: `${getTargetKey(platform)}-build-cpp`,
label: `${getTargetLabel(platform)} - build-cpp`,
@@ -436,7 +450,10 @@ function getBuildCppStep(platform, options) {
BUN_CPP_ONLY: "ON",
...getBuildEnv(platform, options),
},
command: "bun run build:ci --target bun",
// We used to build the C++ dependencies and bun in separate steps.
// However, as long as the zig build takes longer than both sequentially,
// it's cheaper to run them in the same step. Can be revisited in the future.
command: [`${command} --target bun`, `${command} --target dependencies`],
};
}
@@ -470,7 +487,7 @@ function getBuildZigStep(platform, options) {
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform, options),
command: `bun run build:ci --target bun-zig --toolchain ${toolchain}`,
command: `${getBuildCommand(platform, options)} --target bun-zig --toolchain ${toolchain}`,
timeout_in_minutes: 35,
};
}
@@ -484,11 +501,7 @@ function getLinkBunStep(platform, options) {
return {
key: `${getTargetKey(platform)}-build-bun`,
label: `${getTargetLabel(platform)} - build-bun`,
depends_on: [
`${getTargetKey(platform)}-build-vendor`,
`${getTargetKey(platform)}-build-cpp`,
`${getTargetKey(platform)}-build-zig`,
],
depends_on: [`${getTargetKey(platform)}-build-cpp`, `${getTargetKey(platform)}-build-zig`],
agents: getCppAgent(platform, options),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
@@ -496,7 +509,7 @@ function getLinkBunStep(platform, options) {
BUN_LINK_ONLY: "ON",
...getBuildEnv(platform, options),
},
command: "bun run build:ci --target bun",
command: `${getBuildCommand(platform, options)} --target bun`,
};
}
@@ -513,7 +526,7 @@ function getBuildBunStep(platform, options) {
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform, options),
command: "bun run build:ci",
command: getBuildCommand(platform, options),
};
}
@@ -532,7 +545,7 @@ function getBuildBunStep(platform, options) {
* @returns {Step}
*/
function getTestBunStep(platform, options, testOptions = {}) {
const { os } = platform;
const { os, profile } = platform;
const { buildId, unifiedTests, testFiles } = testOptions;
const args = [`--step=${getTargetKey(platform)}-build-bun`];
@@ -556,6 +569,7 @@ function getTestBunStep(platform, options, testOptions = {}) {
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
parallelism: unifiedTests ? undefined : os === "darwin" ? 2 : 10,
timeout_in_minutes: profile === "asan" ? 45 : 30,
command:
os === "windows"
? `node .\\scripts\\runner.node.mjs ${args.join(" ")}`
@@ -629,6 +643,7 @@ function getReleaseStep(buildPlatforms, options) {
}
/**
* @param {Platform[]} buildPlatforms
* @returns {Step}
*/
function getBenchmarkStep() {
@@ -636,10 +651,10 @@ function getBenchmarkStep() {
key: "benchmark",
label: "📊",
agents: {
queue: "build-zig",
queue: "build-image",
},
command: "bun .buildkite/scripts/upload-benchmark.ts",
depends_on: [`linux-x64-build-bun`],
depends_on: `linux-x64-build-bun`,
command: "node .buildkite/scripts/upload-benchmark.mjs",
};
}
@@ -729,7 +744,6 @@ function getBenchmarkStep() {
* @property {string | boolean} [buildImages]
* @property {string | boolean} [publishImages]
* @property {number} [canary]
* @property {Profile[]} [buildProfiles]
* @property {Platform[]} [buildPlatforms]
* @property {Platform[]} [testPlatforms]
* @property {string[]} [testFiles]
@@ -824,6 +838,10 @@ function getOptionsStep() {
label: `${getEmoji("assert")} Release with Assertions`,
value: "assert",
},
{
label: `${getEmoji("asan")} Release with ASAN`,
value: "asan",
},
{
label: `${getEmoji("debug")} Debug`,
value: "debug",
@@ -904,7 +922,7 @@ function getOptionsStep() {
{
key: "unified-builds",
select: "Do you want to build each platform in a single step?",
hint: "If true, builds will not be split into seperate steps (this will likely slow down the build)",
hint: "If true, builds will not be split into separate steps (this will likely slow down the build)",
required: false,
default: "false",
options: booleanOptions,
@@ -912,7 +930,7 @@ function getOptionsStep() {
{
key: "unified-tests",
select: "Do you want to run tests in a single step?",
hint: "If true, tests will not be split into seperate steps (this will be very slow)",
hint: "If true, tests will not be split into separate steps (this will be very slow)",
required: false,
default: "false",
options: booleanOptions,
@@ -946,8 +964,13 @@ async function getPipelineOptions() {
return;
}
let filteredBuildPlatforms = buildPlatforms;
if (isMainBranch()) {
filteredBuildPlatforms = buildPlatforms.filter(({ profile }) => profile !== "asan");
}
const canary = await getCanaryRevision();
const buildPlatformsMap = new Map(buildPlatforms.map(platform => [getTargetKey(platform), platform]));
const buildPlatformsMap = new Map(filteredBuildPlatforms.map(platform => [getTargetKey(platform), platform]));
const testPlatformsMap = new Map(testPlatforms.map(platform => [getPlatformKey(platform), platform]));
if (isManual) {
@@ -966,6 +989,7 @@ async function getPipelineOptions() {
?.map(item => item.trim())
?.filter(Boolean);
const buildProfiles = parseArray(options["build-profiles"]);
const buildPlatformKeys = parseArray(options["build-platforms"]);
const testPlatformKeys = parseArray(options["test-platforms"]);
return {
@@ -978,12 +1002,11 @@ async function getPipelineOptions() {
testFiles: parseArray(options["test-files"]),
unifiedBuilds: parseBoolean(options["unified-builds"]),
unifiedTests: parseBoolean(options["unified-tests"]),
buildProfiles: parseArray(options["build-profiles"]),
buildPlatforms: buildPlatformKeys?.length
? buildPlatformKeys.map(key => buildPlatformsMap.get(key))
? buildPlatformKeys.flatMap(key => buildProfiles.map(profile => ({ ...buildPlatformsMap.get(key), profile })))
: Array.from(buildPlatformsMap.values()),
testPlatforms: testPlatformKeys?.length
? testPlatformKeys.map(key => testPlatformsMap.get(key))
? testPlatformKeys.flatMap(key => buildProfiles.map(profile => ({ ...testPlatformsMap.get(key), profile })))
: Array.from(testPlatformsMap.values()),
dryRun: parseBoolean(options["dry-run"]),
};
@@ -1018,7 +1041,6 @@ async function getPipelineOptions() {
publishImages: parseOption(/\[(publish images?)\]/i),
buildPlatforms: Array.from(buildPlatformsMap.values()),
testPlatforms: Array.from(testPlatformsMap.values()),
buildProfiles: ["release"],
};
}
@@ -1041,7 +1063,7 @@ async function getPipeline(options = {}) {
return;
}
const { buildProfiles = [], buildPlatforms = [], testPlatforms = [], buildImages, publishImages } = options;
const { buildPlatforms = [], testPlatforms = [], buildImages, publishImages } = options;
const imagePlatforms = new Map(
buildImages || publishImages
? [...buildPlatforms, ...testPlatforms]
@@ -1076,29 +1098,33 @@ async function getPipeline(options = {}) {
}
}
if (!buildId) {
steps.push(
...buildPlatforms
.flatMap(platform => buildProfiles.map(profile => ({ ...platform, profile })))
.map(target => {
const imageKey = getImageKey(target);
const includeASAN = !isMainBranch();
return getStepWithDependsOn(
{
key: getTargetKey(target),
group: getTargetLabel(target),
steps: unifiedBuilds
? [getBuildBunStep(target, options)]
: [
getBuildVendorStep(target, options),
getBuildCppStep(target, options),
getBuildZigStep(target, options),
getLinkBunStep(target, options),
],
},
imagePlatforms.has(imageKey) ? `${imageKey}-build-image` : undefined,
);
}),
if (!buildId) {
const relevantBuildPlatforms = includeASAN
? buildPlatforms
: buildPlatforms.filter(({ profile }) => profile !== "asan");
steps.push(
...relevantBuildPlatforms.map(target => {
const imageKey = getImageKey(target);
const zigImageKey = getImageKey(getZigPlatform());
const dependsOn = imagePlatforms.has(zigImageKey) ? [`${zigImageKey}-build-image`] : [];
if (imagePlatforms.has(imageKey)) {
dependsOn.push(`${imageKey}-build-image`);
}
return getStepWithDependsOn(
{
key: getTargetKey(target),
group: getTargetLabel(target),
steps: unifiedBuilds
? [getBuildBunStep(target, options)]
: [getBuildCppStep(target, options), getBuildZigStep(target, options), getLinkBunStep(target, options)],
},
...dependsOn,
);
}),
);
}
@@ -1106,13 +1132,11 @@ async function getPipeline(options = {}) {
const { skipTests, forceTests, unifiedTests, testFiles } = options;
if (!skipTests || forceTests) {
steps.push(
...testPlatforms
.flatMap(platform => buildProfiles.map(profile => ({ ...platform, profile })))
.map(target => ({
key: getTargetKey(target),
group: getTargetLabel(target),
steps: [getTestBunStep(target, options, { unifiedTests, testFiles, buildId })],
})),
...testPlatforms.map(target => ({
key: getTargetKey(target),
group: getTargetLabel(target),
steps: [getTestBunStep(target, options, { unifiedTests, testFiles, buildId })],
})),
);
}
}
@@ -1120,7 +1144,6 @@ async function getPipeline(options = {}) {
if (isMainBranch()) {
steps.push(getReleaseStep(buildPlatforms, options));
}
steps.push(getBenchmarkStep());
/** @type {Map<string, GroupStep>} */

View File

@@ -0,0 +1,23 @@
Upgrade Bun's Webkit fork to the latest upstream version of Webkit.
To do that:
- cd vendor/WebKit
- git fetch upstream
- git merge upstream main
- Fix the merge conflicts
- cd ../../ (back to bun)
- make jsc-build (this will take about 7 minutes)
- While it compiles, in another task review the JSC commits between the last version of Webkit and the new version. Write up a summary of the webkit changes in a file called "webkit-changes.md"
- bun run build:local (build a build of Bun with the new Webkit, make sure it compiles)
- After making sure it compiles, run some code to make sure things work. something like ./build/debug-local/bun-debug --print '42' should be all you need
- cd vendor/WebKit
- git commit -am "Upgrade Webkit to the latest version"
- git push
- get the commit SHA in the vendor/WebKit directory of your new commit
- cd ../../ (back to bun)
- Update WEBKIT_VERSION in cmake/tools/SetupWebKit.cmake to the commit SHA of your new commit
- git checkout -b bun/webkit-upgrade-<commit-sha>
- commit + push (without adding the webkit-changes.md file)
- create PR titled "Upgrade Webkit to the <commit-sha>", paste your webkit-changes.md into the PR description
- delete the webkit-changes.md file

View File

@@ -1,27 +1,13 @@
---
description: How to build Bun
globs:
globs:
alwaysApply: false
---
# How to build Bun
## CMake
Run:
Bun is built using CMake, which you can find in `CMakeLists.txt` and in the `cmake/` directory.
* `CMakeLists.txt`
* `cmake/`
* `Globals.cmake` - macros and functions used by all the other files
* `Options.cmake` - build options for configuring the build (e.g. debug/release mode)
* `CompilerFlags.cmake` - compiler and linker flags used by all the targets
* `tools/` - setup scripts for various build tools (e.g. llvm, zig, webkit, rust, etc.)
* `targets/` - targets for bun and its dependencies (e.g. brotli, boringssl, libuv, etc.)
## How to
There are `package.json` scripts that make it easy to build Bun without calling CMake directly, for example:
```sh
bun run build # builds a debug build: `build/debug/bun-debug`
bun run build:release # builds a release build: `build/release/bun`
bun run build:assert # builds a release build with debug assertions: `build/assert/bun`
```bash
bun bd
```

View File

@@ -91,7 +91,7 @@ devTest("html file is watched", {
`files` holds the initial state, and the callback runs with the server running. `dev.fetch()` runs HTTP requests, while `dev.client()` opens a browser instance to the code.
Functions `dev.write` and `dev.patch` and `dev.delete` mutate the filesystem. Do not use `node:fs` APIs, as the dev server ones are hooked to wait for hot-reload, and all connected clients to recieve changes.
Functions `dev.write` and `dev.patch` and `dev.delete` mutate the filesystem. Do not use `node:fs` APIs, as the dev server ones are hooked to wait for hot-reload, and all connected clients to receive changes.
When a change performs a hard-reload, that must be explicitly annotated with `expectReload`. This tells `client-fixture.mjs` that the test is meant to reload the page once; All other hard reloads automatically fail the test.

View File

@@ -0,0 +1,203 @@
# Registering Functions, Objects, and Modules in Bun
This guide documents the process of adding new functionality to the Bun global object and runtime.
## Overview
Bun's architecture exposes functionality to JavaScript through a set of carefully registered functions, objects, and modules. Most core functionality is implemented in Zig, with JavaScript bindings that make these features accessible to users.
There are several key ways to expose functionality in Bun:
1. **Global Functions**: Direct methods on the `Bun` object (e.g., `Bun.serve()`)
2. **Getter Properties**: Lazily initialized properties on the `Bun` object (e.g., `Bun.sqlite`)
3. **Constructor Classes**: Classes available through the `Bun` object (e.g., `Bun.ValkeyClient`)
4. **Global Modules**: Modules that can be imported directly (e.g., `import {X} from "bun:*"`)
## The Registration Process
Adding new functionality to Bun involves several coordinated steps across multiple files:
### 1. Implement the Core Functionality in Zig
First, implement your feature in Zig, typically in its own directory in `src/`. Examples:
- `src/valkey/` for Redis/Valkey client
- `src/semver/` for SemVer functionality
- `src/smtp/` for SMTP client
### 2. Create JavaScript Bindings
Create bindings that expose your Zig functionality to JavaScript:
- Create a class definition file (e.g., `js_bindings.classes.ts`) to define the JavaScript interface
- Implement `JSYourFeature` struct in a file like `js_your_feature.zig`
Example from a class definition file:
```typescript
// Example from a .classes.ts file
import { define } from "../../codegen/class-definitions";
export default [
define({
name: "YourFeature",
construct: true,
finalize: true,
hasPendingActivity: true,
memoryCost: true,
klass: {},
JSType: "0b11101110",
proto: {
yourMethod: {
fn: "yourZigMethod",
length: 1,
},
property: {
getter: "getProperty",
},
},
values: ["cachedValues"],
}),
];
```
### 3. Register with BunObject in `src/bun.js/bindings/BunObject+exports.h`
Add an entry to the `FOR_EACH_GETTER` macro:
```c
// In BunObject+exports.h
#define FOR_EACH_GETTER(macro) \
macro(CSRF) \
macro(CryptoHasher) \
... \
macro(YourFeature) \
```
### 4. Create a Getter Function in `src/bun.js/api/BunObject.zig`
Implement a getter function in `BunObject.zig` that returns your feature:
```zig
// In BunObject.zig
pub const YourFeature = toJSGetter(Bun.getYourFeatureConstructor);
// In the exportAll() function:
@export(&BunObject.YourFeature, .{ .name = getterName("YourFeature") });
```
### 5. Implement the Getter Function in a Relevant Zig File
Implement the function that creates your object:
```zig
// In your main module file (e.g., src/your_feature/your_feature.zig)
pub fn getYourFeatureConstructor(globalThis: *JSC.JSGlobalObject, _: *JSC.JSObject) JSC.JSValue {
return JSC.API.YourFeature.getConstructor(globalThis);
}
```
### 6. Add to Build System
Ensure your files are included in the build system by adding them to the appropriate targets.
## Example: Adding a New Module
Here's a comprehensive example of adding a hypothetical SMTP module:
1. Create implementation files in `src/smtp/`:
- `index.zig`: Main entry point that exports everything
- `SmtpClient.zig`: Core SMTP client implementation
- `js_smtp.zig`: JavaScript bindings
- `js_bindings.classes.ts`: Class definition
2. Define your JS class in `js_bindings.classes.ts`:
```typescript
import { define } from "../../codegen/class-definitions";
export default [
define({
name: "EmailClient",
construct: true,
finalize: true,
hasPendingActivity: true,
configurable: false,
memoryCost: true,
klass: {},
JSType: "0b11101110",
proto: {
send: {
fn: "send",
length: 1,
},
verify: {
fn: "verify",
length: 0,
},
close: {
fn: "close",
length: 0,
},
},
values: ["connectionPromise"],
}),
];
```
3. Add getter to `BunObject+exports.h`:
```c
#define FOR_EACH_GETTER(macro) \
macro(CSRF) \
... \
macro(SMTP) \
```
4. Add getter function to `BunObject.zig`:
```zig
pub const SMTP = toJSGetter(Bun.getSmtpConstructor);
// In exportAll:
@export(&BunObject.SMTP, .{ .name = getterName("SMTP") });
```
5. Implement getter in your module:
```zig
pub fn getSmtpConstructor(globalThis: *JSC.JSGlobalObject, _: *JSC.JSObject) JSC.JSValue {
return JSC.API.JSEmailClient.getConstructor(globalThis);
}
```
## Best Practices
1. **Follow Naming Conventions**: Align your naming with existing patterns
2. **Reference Existing Modules**: Study similar modules like Valkey or S3Client for guidance
3. **Memory Management**: Be careful with memory management and reference counting
4. **Error Handling**: Use `bun.JSError!JSValue` for proper error propagation
5. **Documentation**: Add JSDoc comments to your JavaScript bindings
6. **Testing**: Add tests for your new functionality
## Common Gotchas
- Be sure to handle reference counting properly with `ref()`/`deref()`
- Always implement proper cleanup in `deinit()` and `finalize()`
- For network operations, manage socket lifetimes correctly
- Use `JSC.Codegen` correctly to generate necessary binding code
## Related Files
- `src/bun.js/bindings/BunObject+exports.h`: Registration of getters and functions
- `src/bun.js/api/BunObject.zig`: Implementation of getters and object creation
- `src/bun.js/api/BunObject.classes.ts`: Class definitions
- `.cursor/rules/zig-javascriptcore-classes.mdc`: More details on class bindings
## Additional Resources
For more detailed information on specific topics:
- See `zig-javascriptcore-classes.mdc` for details on creating JS class bindings
- Review existing modules like `valkey`, `sqlite`, or `s3` for real-world examples

View File

@@ -11,10 +11,10 @@ You'll find all of Bun's tests in the `test/` directory.
* `test/`
* `cli/` - CLI command tests, like `bun install` or `bun init`
* `js/` - JavaScript & TypeScript tests
* `bun/` - `Bun` APIs tests, seperated by category, for example: `glob/` for `Bun.Glob` tests
* `node/` - Node.js module tests, seperated by module, for example: `assert/` for `node:assert` tests
* `bun/` - `Bun` APIs tests, separated by category, for example: `glob/` for `Bun.Glob` tests
* `node/` - Node.js module tests, separated by module, for example: `assert/` for `node:assert` tests
* `test/` - Vendored Node.js tests, taken from the Node.js repository (does not conform to Bun's test style)
* `web/` - Web API tests, seperated by category, for example: `fetch/` for `Request` and `Response` tests
* `web/` - Web API tests, separated by category, for example: `fetch/` for `Request` and `Response` tests
* `third_party/` - npm package tests, to validate that basic usage works in Bun
* `napi/` - N-API tests
* `v8/` - V8 C++ API tests

View File

@@ -5,4 +5,6 @@
#
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
4ec410e0d7c5f6a712c323444edbf56b48d432d8 # make @import("bun") work in zig (#19096)
4ec410e0d7c5f6a712c323444edbf56b48d432d8 # make @import("bun") work in zig (#19096)
dedd433cbf2e2fe38e51bc166e08fbcc601ad42b # JSValue.undefined -> .jsUndefined()
6b4662ff55f58247cc2fd22e85b4f9805b0950a5 # JSValue.jsUndefined() -> .js_undefined

3
.gitattributes vendored
View File

@@ -52,3 +52,6 @@ test/js/node/test/fixtures linguist-vendored
test/js/node/test/common linguist-vendored
test/js/bun/css/files linguist-vendored
.vscode/*.json linguist-language=JSON-with-Comments
src/cli/init/tsconfig.default.json linguist-language=JSON-with-Comments

5
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,5 @@
# Project
/.github/CODEOWNERS @Jarred-Sumner
# Tests
/test/expectations.txt @Jarred-Sumner

View File

@@ -2,6 +2,7 @@ name: Prefilled crash report
description: Report a crash in Bun
labels:
- crash
- needs triage
body:
- type: markdown
attributes:

View File

@@ -1,41 +0,0 @@
name: clang-format
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
env:
BUN_VERSION: "1.2.0"
LLVM_VERSION: "19.1.7"
LLVM_VERSION_MAJOR: "19"
jobs:
clang-format:
name: clang-format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install LLVM
run: |
curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.LLVM_VERSION_MAJOR }} all
- name: Clang Format
env:
LLVM_VERSION: ${{ env.LLVM_VERSION }}
run: |
bun run clang-format
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run clang-format`"

View File

@@ -1,41 +0,0 @@
name: clang-tidy
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
env:
BUN_VERSION: "1.2.0"
LLVM_VERSION: "19.1.7"
LLVM_VERSION_MAJOR: "19"
jobs:
clang-tidy:
name: clang-tidy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install LLVM
run: |
curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.LLVM_VERSION_MAJOR }} all
- name: Clang Tidy
env:
LLVM_VERSION: ${{ env.LLVM_VERSION }}
run: |
bun run clang-tidy:diff
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run clang-tidy`"

35
.github/workflows/claude.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

58
.github/workflows/codex-test-sync.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Codex Test Sync
on:
pull_request:
types: [labeled, opened]
env:
BUN_VERSION: "1.2.15"
jobs:
sync-node-tests:
runs-on: ubuntu-latest
if: |
(github.event.action == 'labeled' && github.event.label.name == 'codex') ||
(github.event.action == 'opened' && contains(github.event.pull_request.labels.*.name, 'codex')) ||
contains(github.head_ref, 'codex')
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
test/js/node/test/parallel/**/*.{js,mjs,ts}
test/js/node/test/sequential/**/*.{js,mjs,ts}
- name: Sync tests
if: steps.changed-files.outputs.any_changed == 'true'
shell: bash
run: |
echo "Changed test files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
# Process each changed test file
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
# Extract test name from file path
test_name=$(basename "$file" | sed 's/\.[^.]*$//')
echo "Syncing test: $test_name"
bun node:test:cp "$test_name"
done
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Sync Node.js tests with upstream"

68
.github/workflows/format.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
name: format
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
env:
BUN_VERSION: "1.2.11"
LLVM_VERSION: "19.1.7"
LLVM_VERSION_MAJOR: "19"
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global core.autocrlf true
git config --global core.ignorecase true
git config --global core.precomposeUnicode true
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Setup Dependencies
run: |
bun install
- name: Install LLVM
run: |
curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.LLVM_VERSION_MAJOR }} all
- name: Setup Zig
uses: mlugg/setup-zig@v1
with:
version: 0.14.0
- name: Zig Format
run: |
bun scripts/zig-remove-unreferenced-top-level-decls.ts src/
zig fmt src
bun scripts/sortImports src
zig fmt src
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run zig-format`"
- name: Prettier Format
run: |
bun run prettier
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run prettier`"
- name: Clang Format
run: |
bun run clang-format
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run clang-format`"

41
.github/workflows/glob-sources.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Glob Sources
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
env:
BUN_VERSION: "1.2.11"
jobs:
glob-sources:
name: Glob Sources
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global core.autocrlf true
git config --global core.ignorecase true
git config --global core.precomposeUnicode true
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Setup Dependencies
run: |
bun install
- name: Glob sources
run: bun scripts/glob-sources.mjs
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun scripts/glob-sources.mjs`"

View File

@@ -69,7 +69,6 @@ jobs:
shell: bash
run: |
LABELS=$(bun scripts/read-issue.ts)
echo "labels=$LABELS" >> $GITHUB_OUTPUT
bun scripts/is-outdated.ts
if [[ -f "is-outdated.txt" ]]; then
@@ -77,12 +76,19 @@ jobs:
fi
if [[ -f "outdated.txt" ]]; then
echo "oudated=$(cat outdated.txt)" >> $GITHUB_OUTPUT
echo "outdated=$(cat outdated.txt)" >> $GITHUB_OUTPUT
fi
if [[ -f "is-very-outdated.txt" ]]; then
echo "is-very-outdated=true" >> $GITHUB_OUTPUT
LABELS="$LABELS,old-version"
else
echo "is-very-outdated=false" >> $GITHUB_OUTPUT
fi
echo "latest=$(cat LATEST)" >> $GITHUB_OUTPUT
rm -rf is-outdated.txt outdated.txt latest.txt
echo "labels=$LABELS" >> $GITHUB_OUTPUT
rm -rf is-outdated.txt outdated.txt latest.txt is-very-outdated.txt
- name: Generate comment text with Sentry Link
if: github.event.label.name == 'crash'
# ignore if fail
@@ -102,7 +108,14 @@ jobs:
if [[ -f "sentry-id.txt" ]]; then
echo "sentry-id=$(cat sentry-id.txt)" >> $GITHUB_OUTPUT
fi
- name: Remove old labels
uses: actions-cool/issues-helper@v3
if: github.event.label.name == 'crash' && steps.add-labels.outputs.is-very-outdated == 'false'
with:
actions: "remove-labels"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: old-version
- name: Add labels
uses: actions-cool/issues-helper@v3
if: github.event.label.name == 'crash'
@@ -119,7 +132,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
@${{ github.event.issue.user.login }}, the latest version of Bun is v${{ steps.add-labels.outputs.latest }}, but this crash was reported on Bun v${{ steps.add-labels.outputs.oudated }}.
@${{ github.event.issue.user.login }}, the latest version of Bun is v${{ steps.add-labels.outputs.latest }}, but this crash was reported on Bun v${{ steps.add-labels.outputs.outdated }}.
Are you able to reproduce this crash on the latest version of Bun?
@@ -134,7 +147,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
@${{ github.event.issue.user.login }}, thank you for reporting this crash. The latest version of Bun is v${{ steps.add-labels.outputs.latest }}, but this crash was reported on Bun v${{ steps.add-labels.outputs.oudated }}.
@${{ github.event.issue.user.login }}, thank you for reporting this crash. The latest version of Bun is v${{ steps.add-labels.outputs.latest }}, but this crash was reported on Bun v${{ steps.add-labels.outputs.outdated }}.
Are you able to reproduce this crash on the latest version of Bun?

View File

@@ -1,37 +0,0 @@
name: prettier-format
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
env:
BUN_VERSION: "1.2.0"
jobs:
prettier-format:
name: prettier-format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Setup Dependencies
run: |
bun install
- name: Prettier Format
run: |
bun run prettier:diff
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run prettier:extra`"

View File

@@ -50,12 +50,12 @@ jobs:
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/c-ares/c-ares/git/ref/tags/$LATEST_TAG" | jq -r '.object.sha')
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/c-ares/c-ares/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1
fi
LATEST_SHA=$(curl -sL "https://api.github.com/repos/c-ares/c-ares/git/ref/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
LATEST_SHA=$(curl -sL "https://api.github.com/repos/c-ares/c-ares/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
exit 1

View File

@@ -50,7 +50,7 @@ jobs:
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/libarchive/libarchive/git/ref/tags/$LATEST_TAG" | jq -r '.object.sha')
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/libarchive/libarchive/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1

View File

@@ -50,7 +50,7 @@ jobs:
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/ebiggers/libdeflate/git/ref/tags/$LATEST_TAG" | jq -r '.object.sha')
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/ebiggers/libdeflate/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1

View File

@@ -50,7 +50,7 @@ jobs:
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/ref/tags/$LATEST_TAG" | jq -r '.object.sha')
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1

View File

@@ -50,7 +50,7 @@ jobs:
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/ref/tags/$LATEST_TAG" | jq -r '.object.sha')
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1

99
.github/workflows/update-zstd.yml vendored Normal file
View File

@@ -0,0 +1,99 @@
name: Update zstd
on:
schedule:
- cron: "0 1 * * 0"
workflow_dispatch:
jobs:
check-update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Check zstd version
id: check-version
run: |
set -euo pipefail
# Extract the commit hash from the line after COMMIT
CURRENT_VERSION=$(awk '/[[:space:]]*COMMIT[[:space:]]*$/{getline; gsub(/^[[:space:]]+|[[:space:]]+$/,"",$0); print}' cmake/targets/CloneZstd.cmake)
if [ -z "$CURRENT_VERSION" ]; then
echo "Error: Could not find COMMIT line in CloneZstd.cmake"
exit 1
fi
# Validate that it looks like a git hash
if ! [[ $CURRENT_VERSION =~ ^[0-9a-f]{40}$ ]]; then
echo "Error: Invalid git hash format in CloneZstd.cmake"
echo "Found: $CURRENT_VERSION"
echo "Expected: 40 character hexadecimal string"
exit 1
fi
echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
LATEST_RELEASE=$(curl -sL https://api.github.com/repos/facebook/zstd/releases/latest)
if [ -z "$LATEST_RELEASE" ]; then
echo "Error: Failed to fetch latest release from GitHub API"
exit 1
fi
LATEST_TAG=$(echo "$LATEST_RELEASE" | jq -r '.tag_name')
if [ -z "$LATEST_TAG" ] || [ "$LATEST_TAG" = "null" ]; then
echo "Error: Could not extract tag name from GitHub API response"
exit 1
fi
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/facebook/zstd/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
exit 1
fi
LATEST_SHA=$(curl -sL "https://api.github.com/repos/facebook/zstd/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
exit 1
fi
if ! [[ $LATEST_SHA =~ ^[0-9a-f]{40}$ ]]; then
echo "Error: Invalid SHA format received from GitHub"
echo "Found: $LATEST_SHA"
echo "Expected: 40 character hexadecimal string"
exit 1
fi
echo "latest=$LATEST_SHA" >> $GITHUB_OUTPUT
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Update version if needed
if: success() && steps.check-version.outputs.current != steps.check-version.outputs.latest
run: |
set -euo pipefail
# Handle multi-line format where COMMIT and its value are on separate lines
sed -i -E '/[[:space:]]*COMMIT[[:space:]]*$/{n;s/[[:space:]]*([0-9a-f]+)[[:space:]]*$/ ${{ steps.check-version.outputs.latest }}/}' cmake/targets/CloneZstd.cmake
- name: Create Pull Request
if: success() && steps.check-version.outputs.current != steps.check-version.outputs.latest
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: |
cmake/targets/CloneZstd.cmake
commit-message: "deps: update zstd to ${{ steps.check-version.outputs.tag }} (${{ steps.check-version.outputs.latest }})"
title: "deps: update zstd to ${{ steps.check-version.outputs.tag }}"
delete-branch: true
branch: deps/update-zstd-${{ github.run_number }}
body: |
## What does this PR do?
Updates zstd to version ${{ steps.check-version.outputs.tag }}
Compare: https://github.com/facebook/zstd/compare/${{ steps.check-version.outputs.current }}...${{ steps.check-version.outputs.latest }}
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-zstd.yml)

View File

@@ -1,34 +0,0 @@
name: zig-format
permissions:
contents: write
on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
env:
BUN_VERSION: "1.2.0"
jobs:
zig-format:
name: zig-format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Zig Format
run: |
bun run zig-format:diff
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run zig-format`"

View File

@@ -1,16 +1 @@
# Tell LLDB what to do when the debugged process receives SIGPWR: pass it through to the process
# (-p), but do not stop the process (-s) or notify the user (-n).
#
# JSC's garbage collector sends this signal (as configured by Bun WebKit in
# Thread::initializePlatformThreading() in ThreadingPOSIX.cpp) to the JS thread to suspend or resume
# it. So stopping the process would just create noise when debugging any long-running script.
process handle -p true -s false -n false SIGPWR
command script import misctools/lldb/lldb_pretty_printers.py
type category enable zig.lang
type category enable zig.std
command script import misctools/lldb/lldb_webkit.py
command script delete btjs
command alias btjs p {printf("gathering btjs trace...\n");printf("%s\n", (char*)dumpBtjsTrace())}
command source -C -s true -e true misctools/lldb/init.lldb

338
.vscode/launch.json generated vendored
View File

@@ -5,6 +5,9 @@
// - FORCE_COLOR=1 forces colors in the terminal
// - "${workspaceFolder}/test" is the cwd for `bun test` so it matches CI, we should fix this later
// - "cppvsdbg" is used instead of "lldb" on Windows, because "lldb" is too slow
// - Seeing WebKit files requires `vendor/WebKit` to exist and have code from the right commit.
// Run `bun sync-webkit-source` to ensure that folder is at the right commit. If you haven't
// cloned it at all, that script will suggest how.
"version": "0.2.0",
"configurations": [
// bun test [file]
@@ -13,7 +16,7 @@
"request": "launch",
"name": "bun test [file]",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -21,14 +24,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] --only",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "--only", "${file}"],
"args": ["test", "--timeout=3600000", "--only", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -36,20 +46,35 @@
"BUN_DEBUG_jest": "1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"name": "Attach",
"request": "attach",
"pid": "${command:pickMyProcess}",
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] (fast)",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -57,14 +82,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "0",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] (verbose)",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "0",
@@ -72,14 +104,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] --watch",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "--watch", "${file}"],
"args": ["test", "--timeout=3600000", "--watch", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -87,14 +126,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] --hot",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "--hot", "${file}"],
"args": ["test", "--timeout=3600000", "--hot", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -102,14 +148,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [file] --inspect",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -118,7 +171,14 @@
"BUN_INSPECT": "ws://localhost:0/?wait=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -130,7 +190,7 @@
"request": "launch",
"name": "bun test [file] --inspect-brk",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -139,7 +199,14 @@
"BUN_INSPECT": "ws://localhost:0/?break=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -160,7 +227,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -178,7 +252,14 @@
"GOMAXPROCS": "1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -192,7 +273,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -202,14 +290,18 @@
"args": ["run", "--watch", "${file}"],
"cwd": "${fileDirname}",
"env": {
// "BUN_DEBUG_DEBUGGER": "1",
// "BUN_DEBUG_INTERNAL_DEBUGGER": "1",
"BUN_DEBUG_QUIET_LOGS": "1",
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
// "BUN_INSPECT": "ws+unix:///var/folders/jk/8fzl9l5119598vsqrmphsw7m0000gn/T/tl15npi7qtf.sock?report=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -223,7 +315,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -239,7 +338,14 @@
"BUN_INSPECT": "ws://localhost:0/?wait=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -260,7 +366,14 @@
"BUN_INSPECT": "ws://localhost:0/?break=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -273,7 +386,7 @@
"request": "launch",
"name": "bun test [...]",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -281,14 +394,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [...] (fast)",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -296,14 +416,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "0",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [...] (verbose)",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -311,14 +438,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [...] --watch",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "--watch", "${input:testName}"],
"args": ["test", "--timeout=3600000", "--watch", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -326,14 +460,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [...] --hot",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "--hot", "${input:testName}"],
"args": ["test", "--timeout=3600000", "--hot", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -341,14 +482,21 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
"request": "launch",
"name": "bun test [...] --inspect",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -357,7 +505,14 @@
"BUN_INSPECT": "ws://localhost:0/?wait=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -369,7 +524,7 @@
"request": "launch",
"name": "bun test [...] --inspect-brk",
"program": "${workspaceFolder}/build/debug/bun-debug",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
@@ -378,7 +533,14 @@
"BUN_INSPECT": "ws://localhost:0/?break=1",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -398,7 +560,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
// bun test [*]
{
@@ -413,7 +582,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -427,7 +603,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "0",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -442,7 +625,14 @@
"BUN_INSPECT": "ws://localhost:0/",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
"serverReadyAction": {
"pattern": "https://debug.bun.sh/#localhost:([0-9]+)/",
"uriFormat": "https://debug.bun.sh/#ws://localhost:%s/",
@@ -461,7 +651,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
{
"type": "lldb",
@@ -475,7 +672,14 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
"console": "internalConsole",
// Don't pause when the GC runs while the debugger is open.
"sourceMap": {
// macOS
"/Users/runner/work/_temp/webkit-release/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/Users/runner/work/_temp/webkit-release/WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
// linux
"/webkitbuild/vendor/WebKit": "${workspaceFolder}/vendor/WebKit",
"/webkitbuild/.WTF/Headers": "${workspaceFolder}/vendor/WebKit/Source/WTF",
},
},
// Windows: bun test [file]
{
@@ -486,7 +690,7 @@
"request": "launch",
"name": "Windows: bun test [file]",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -511,7 +715,7 @@
"request": "launch",
"name": "Windows: bun test --only [file]",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "--only", "${file}"],
"args": ["test", "--timeout=3600000", "--only", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -536,7 +740,7 @@
"request": "launch",
"name": "Windows: bun test [file] (fast)",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -561,7 +765,7 @@
"request": "launch",
"name": "Windows: bun test [file] (verbose)",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -586,7 +790,7 @@
"request": "launch",
"name": "Windows: bun test [file] --inspect",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -620,7 +824,7 @@
"request": "launch",
"name": "Windows: bun test [file] --inspect-brk",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${file}"],
"args": ["test", "--timeout=3600000", "${file}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -787,7 +991,7 @@
"request": "launch",
"name": "Windows: bun test [...]",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -812,7 +1016,7 @@
"request": "launch",
"name": "Windows: bun test [...] (fast)",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -837,7 +1041,7 @@
"request": "launch",
"name": "Windows: bun test [...] (verbose)",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -862,7 +1066,7 @@
"request": "launch",
"name": "Windows: bun test [...] --watch",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "--watch", "${input:testName}"],
"args": ["test", "--timeout=3600000", "--watch", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -887,7 +1091,7 @@
"request": "launch",
"name": "Windows: bun test [...] --hot",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "--hot", "${input:testName}"],
"args": ["test", "--timeout=3600000", "--hot", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -912,7 +1116,7 @@
"request": "launch",
"name": "Windows: bun test [...] --inspect",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -946,7 +1150,7 @@
"request": "launch",
"name": "Windows: bun test [...] --inspect-brk",
"program": "${workspaceFolder}/build/debug/bun-debug.exe",
"args": ["test", "${input:testName}"],
"args": ["test", "--timeout=3600000", "${input:testName}"],
"cwd": "${workspaceFolder}",
"environment": [
{
@@ -1113,6 +1317,17 @@
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
},
{
"type": "bun",
"name": "[JS] bun run [file]",
"runtime": "${workspaceFolder}/build/debug/bun-debug",
"runtimeArgs": ["run", "${file}"],
"cwd": "${workspaceFolder}",
"env": {
"BUN_DEBUG_QUIET_LOGS": "1",
"BUN_GARBAGE_COLLECTOR_LEVEL": "2",
},
},
{
"type": "midas-rr",
"request": "attach",
@@ -1122,6 +1337,11 @@
"handle SIGPWR nostop noprint pass",
"source ${workspaceFolder}/misctools/gdb/std_gdb_pretty_printers.py",
"source ${workspaceFolder}/misctools/gdb/zig_gdb_pretty_printers.py",
"set substitute-path /webkitbuild/vendor/WebKit ${workspaceFolder}/vendor/WebKit",
"set substitute-path /webkitbuild/.WTF/Headers ${workspaceFolder}/vendor/WebKit/Source/WTF",
// uncomment if you like
// "set disassembly-flavor intel",
"set print asm-demangle",
],
},
],

View File

@@ -43,6 +43,9 @@
"editor.tabSize": 4,
"editor.useTabStops": false,
"editor.defaultFormatter": "ziglang.vscode-zig",
"editor.codeActionsOnSave": {
"source.organizeImports": "never",
},
},
// lldb
@@ -136,9 +139,6 @@
"**/*.xcscheme": true,
"**/*.xcodeproj": true,
"**/*.i": true,
// uws WebSocket.cpp conflicts with webcore WebSocket.cpp
"packages/bun-uws/fuzzing": true,
},
"files.associations": {
"*.css": "tailwindcss",

36
AGENTS.md Normal file
View File

@@ -0,0 +1,36 @@
## bun tests
**IMPORTANT**: use the `bun bd` command instead of the `bun` command. For example:
✅ Good
```sh
bun bd test internal/ban-words.test.ts
bun bd ./foo.ts
```
The `bun bd` command runs the DEBUG build. If you forget to run the debug build, your changes will not be reflected..
### Run a file
To run a file, you can use the `bun bd <file-path>` command.
```sh
bun bd ./foo.ts
```
### Run tests
To run a single test, you need to use the `bun bd test <test-name>` command.
```sh
bun bd test internal/ban-words.test.ts
```
You must ALWAYS make sure to pass a file path to the `bun bd test <file-path>` command. DO NOT try to run ALL the tests at once unless you're in a specific subdirectory.
### Run a Node.js test
```sh
bun bd --silent node:test test-fs-link
```

237
CLAUDE.md Normal file
View File

@@ -0,0 +1,237 @@
This is the Bun repository - an all-in-one JavaScript runtime & toolkit designed for speed, with a bundler, test runner, and Node.js-compatible package manager. It's written primarily in Zig with C++ for JavaScriptCore integration, powered by WebKit's JavaScriptCore engine.
## Building and Running Bun
### Build Commands
- **Build debug version**: `bun bd` or `bun run build:debug`
- Creates a debug build at `./build/debug/bun-debug`
- Compilation takes ~2.5 minutes
- **Run tests with your debug build**: `bun bd test <test-file>`
- **CRITICAL**: Never use `bun test` directly - it won't include your changes
- **Run any command with debug build**: `bun bd <command>`
### Other Build Variants
- `bun run build:release` - Release build
Address sanitizer is enabled by default in debug builds of Bun.
## Testing
### Running Tests
- **Single test file**: `bun bd test test/js/bun/http/serve.test.ts`
- **Fuzzy match test file**: `bun bd test http/serve.test.ts`
- **With filter**: `bun bd test test/js/bun/http/serve.test.ts -t "should handle"`
### Test Organization
- `test/js/bun/` - Bun-specific API tests (http, crypto, ffi, shell, etc.)
- `test/js/node/` - Node.js compatibility tests
- `test/js/web/` - Web API tests (fetch, WebSocket, streams, etc.)
- `test/cli/` - CLI command tests (install, run, test, etc.)
- `test/regression/issue/` - Regression tests (create one per bug fix)
- `test/bundler/` - Bundler and transpiler tests
- `test/integration/` - End-to-end integration tests
- `test/napi/` - N-API compatibility tests
- `test/v8/` - V8 C++ API compatibility tests
### Writing Tests
Tests use Bun's Jest-compatible test runner with proper test fixtures:
```typescript
import { test, expect } from "bun:test";
import { bunEnv, bunExe, tempDirWithFiles } from "harness";
test("my feature", async () => {
// Create temp directory with test files
const dir = tempDirWithFiles("test-prefix", {
"index.js": `console.log("hello");`,
});
// Spawn Bun process
await using proc = Bun.spawn({
cmd: [bunExe(), "index.js"],
env: bunEnv,
cwd: dir,
});
const [stdout, stderr, exitCode] = await Promise.all([
new Response(proc.stdout).text(),
new Response(proc.stderr).text(),
proc.exited,
]);
expect(exitCode).toBe(0);
expect(stdout).toBe("hello\n");
});
```
## Code Architecture
### Language Structure
- **Zig code** (`src/*.zig`): Core runtime, JavaScript bindings, package manager
- **C++ code** (`src/bun.js/bindings/*.cpp`): JavaScriptCore bindings, Web APIs
- **TypeScript** (`src/js/`): Built-in JavaScript modules with special syntax (see JavaScript Modules section)
- **Generated code**: Many files are auto-generated from `.classes.ts` and other sources
### Core Source Organization
#### Runtime Core (`src/`)
- `bun.zig` - Main entry point
- `cli.zig` - CLI command orchestration
- `js_parser.zig`, `js_lexer.zig`, `js_printer.zig` - JavaScript parsing/printing
- `transpiler.zig` - Wrapper around js_parser with sourcemap support
- `resolver/` - Module resolution system
- `allocators/` - Custom memory allocators for performance
#### JavaScript Runtime (`src/bun.js/`)
- `bindings/` - C++ JavaScriptCore bindings
- Generated classes from `.classes.ts` files
- Manual bindings for complex APIs
- `api/` - Bun-specific APIs
- `server.zig` - HTTP server implementation
- `FFI.zig` - Foreign Function Interface
- `crypto.zig` - Cryptographic operations
- `glob.zig` - File pattern matching
- `node/` - Node.js compatibility layer
- Module implementations (fs, path, crypto, etc.)
- Process and Buffer APIs
- `webcore/` - Web API implementations
- `fetch.zig` - Fetch API
- `streams.zig` - Web Streams
- `Blob.zig`, `Response.zig`, `Request.zig`
- `event_loop/` - Event loop and task management
#### Build Tools & Package Manager
- `src/bundler/` - JavaScript bundler
- Advanced tree-shaking
- CSS processing
- HTML handling
- `src/install/` - Package manager
- `lockfile/` - Lockfile handling
- `npm.zig` - npm registry client
- `lifecycle_script_runner.zig` - Package scripts
#### Other Key Components
- `src/shell/` - Cross-platform shell implementation
- `src/css/` - CSS parser and processor
- `src/http/` - HTTP client implementation
- `websocket_client/` - WebSocket client (including deflate support)
- `src/sql/` - SQL database integrations
- `src/bake/` - Server-side rendering framework
### JavaScript Class Implementation (C++)
When implementing JavaScript classes in C++:
1. Create three classes if there's a public constructor:
- `class Foo : public JSC::JSDestructibleObject` (if has C++ fields)
- `class FooPrototype : public JSC::JSNonFinalObject`
- `class FooConstructor : public JSC::InternalFunction`
2. Define properties using HashTableValue arrays
3. Add iso subspaces for classes with C++ fields
4. Cache structures in ZigGlobalObject
## Development Workflow
### Code Formatting
- `bun run prettier` - Format JS/TS files
- `bun run zig-format` - Format Zig files
- `bun run clang-format` - Format C++ files
### Watching for Changes
- `bun run watch` - Incremental Zig compilation with error checking
- `bun run watch-windows` - Windows-specific watch mode
### Code Generation
Code generation happens automatically as part of the build process. The main scripts are:
- `src/codegen/generate-classes.ts` - Generates Zig & C++ bindings from `*.classes.ts` files
- `src/codegen/generate-jssink.ts` - Generates stream-related classes
- `src/codegen/bundle-modules.ts` - Bundles built-in modules like `node:fs`
- `src/codegen/bundle-functions.ts` - Bundles global functions like `ReadableStream`
In development, bundled modules can be reloaded without rebuilding Zig by running `bun run build`.
## JavaScript Modules (`src/js/`)
Built-in JavaScript modules use special syntax and are organized as:
- `node/` - Node.js compatibility modules (`node:fs`, `node:path`, etc.)
- `bun/` - Bun-specific modules (`bun:ffi`, `bun:sqlite`, etc.)
- `thirdparty/` - NPM modules we replace (like `ws`)
- `internal/` - Internal modules not exposed to users
- `builtins/` - Core JavaScript builtins (streams, console, etc.)
### Special Syntax in Built-in Modules
1. **`$` prefix** - Access to private properties and JSC intrinsics:
```js
const arr = $Array.from(...); // Private global
map.$set(...); // Private method
const arr2 = $newArrayWithSize(5); // JSC intrinsic
```
2. **`require()`** - Must use string literals, resolved at compile time:
```js
const fs = require("fs"); // Directly loads by numeric ID
```
3. **Debug helpers**:
- `$debug()` - Like console.log but stripped in release builds
- `$assert()` - Assertions stripped in release builds
- `if($debug) {}` - Check if debug env var is set
4. **Platform detection**: `process.platform` and `process.arch` are inlined and dead-code eliminated
5. **Export syntax**: Use `export default` which gets converted to a return statement:
```js
export default {
readFile,
writeFile,
};
```
Note: These are NOT ES modules. The preprocessor converts `$` to `@` (JSC's actual syntax) and handles the special functions.
## Important Development Notes
1. **Never use `bun test` or `bun <file>` directly** - always use `bun bd test` or `bun bd <command>`. `bun bd` compiles & runs the debug build.
2. **Use `await using`** for proper resource cleanup with Bun APIs (Bun.spawn, Bun.serve, Bun.connect, etc.)
3. **Follow existing code style** - check neighboring files for patterns
4. **Create regression tests** in `test/regression/issue/` when fixing bugs
5. **Use absolute paths** - Always use absolute paths in file operations
6. **Avoid shell commands** - Don't use `find` or `grep` in tests; use Bun's Glob and built-in tools
7. **Memory management** - In Zig code, be careful with allocators and use defer for cleanup
8. **Cross-platform** - Test on macOS, Linux, and Windows when making platform-specific changes
9. **Debug builds** - Use `BUN_DEBUG_QUIET_LOGS=1` to disable debug logging, or `BUN_DEBUG_<scope>=1` to enable specific scopes
10. **Transpiled source** - Find transpiled files in `/tmp/bun-debug-src/` for debugging
## Key APIs and Features
### Bun-Specific APIs
- **Bun.serve()** - High-performance HTTP server
- **Bun.spawn()** - Process spawning with better performance than Node.js
- **Bun.file()** - Fast file I/O operations
- **Bun.write()** - Unified API for writing to files, stdout, etc.
- **Bun.$ (Shell)** - Cross-platform shell scripting
- **Bun.SQLite** - Native SQLite integration
- **Bun.FFI** - Call native libraries from JavaScript
- **Bun.Glob** - Fast file pattern matching

View File

@@ -144,6 +144,14 @@ $ bun bd test foo.test.ts
$ bun bd ./foo.ts
```
Bun generally takes about 2.5 minutes to compile a debug build when there are Zig changes. If your development workflow is "change one line, save, rebuild", you will spend too much time waiting for the build to finish. Instead:
- Batch up your changes
- Ensure zls is running with incremental watching for LSP errors (if you use VSCode and install Zig and run `bun run build` once to download Zig, this should just work)
- Prefer using the debugger ("CodeLLDB" in VSCode) to step through the code.
- Use debug logs. `BUN_DEBUG_<scope>=1` will enable debug logging for the corresponding `Output.scoped(.<scope>, false)` logs. You can also set `BUN_DEBUG_QUIET_LOGS=1` to disable all debug logging that isn't explicitly enabled. To dump debug lgos into a file, `BUN_DEBUG=<path-to-file>.log`. Debug logs are aggressively removed in release builds.
- src/js/\*\*.ts changes are pretty much instant to rebuild. C++ changes are a bit slower, but still much faster than the Zig code (Zig is one compilation unit, C++ is many).
## Code generation scripts
Several code generation scripts are used during Bun's build process. These are run automatically when changes are made to certain files.
@@ -179,6 +187,7 @@ To run a release build from a pull request, you can use the `bun-pr` npm package
bunx bun-pr <pr-number>
bunx bun-pr <branch-name>
bunx bun-pr "https://github.com/oven-sh/bun/pull/1234566"
bunx bun-pr --asan <pr-number> # Linux x64 only
```
This will download the release build from the pull request and add it to `$PATH` as `bun-${pr-number}`. You can then run the build with `bun-${pr-number}`.
@@ -189,24 +198,18 @@ bun-1234566 --version
This works by downloading the release build from the GitHub Actions artifacts on the linked pull request. You may need the `gh` CLI installed to authenticate with GitHub.
## Valgrind
## AddressSanitizer
On Linux, valgrind can help find memory issues.
[AddressSanitizer](https://en.wikipedia.org/wiki/AddressSanitizer) helps find memory issues, and is enabled by default in debug builds of Bun on Linux and macOS. This includes the Zig code and all dependencies. It makes the Zig code take about 2x longer to build, if that's stopping you from being productive you can disable it by setting `-Denable_asan=$<IF:$<BOOL:${ENABLE_ASAN}>,true,false>` to `-Denable_asan=false` in the `cmake/targets/BuildBun.cmake` file, but generally we recommend batching your changes up between builds.
Keep in mind:
- JavaScriptCore doesn't support valgrind. It will report spurious errors.
- Valgrind is slow
- Mimalloc will sometimes cause spurious errors when debug build is enabled
You'll need a very recent version of Valgrind due to DWARF 5 debug symbols. You may need to manually compile Valgrind instead of using it from your Linux package manager.
`--fair-sched=try` is necessary if running multithreaded code in Bun (such as the bundler). Otherwise it will hang.
To build a release build with Address Sanitizer, run:
```bash
$ valgrind --fair-sched=try --track-origins=yes bun-debug <args>
$ bun run build:release:asan
```
In CI, we run our test suite with at least one target that is built with Address Sanitizer.
## Building WebKit locally + Debug mode of JSC
WebKit is not cloned by default (to save time and disk space). To clone and build WebKit locally, run:
@@ -222,6 +225,9 @@ $ git -C vendor/WebKit checkout <commit_hash>
# Optionally, you can use `make jsc` for a release build
$ make jsc-debug && rm vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
# After an initial run of `make jsc-debug`, you can rebuild JSC with:
$ cmake --build vendor/WebKit/WebKitBuild/Debug --target jsc && rm vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
# Build bun with the local JSC build
$ bun run build:local
```

2
LATEST
View File

@@ -1 +1 @@
1.2.10
1.2.17

View File

@@ -482,7 +482,7 @@ STATIC_MUSL_FLAG ?=
WRAP_SYMBOLS_ON_LINUX =
ifeq ($(OS_NAME), linux)
WRAP_SYMBOLS_ON_LINUX = -Wl,--wrap=fcntl -Wl,--wrap=fcntl64 -Wl,--wrap=stat64 -Wl,--wrap=pow -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=log2 \
WRAP_SYMBOLS_ON_LINUX = -Wl,--wrap=fcntl -Wl,--wrap=fcntl64 -Wl,--wrap=stat64 -Wl,--wrap=pow -Wl,--wrap=exp -Wl,--wrap=exp2 -Wl,--wrap=log -Wl,--wrap=log2 \
-Wl,--wrap=lstat \
-Wl,--wrap=stat \
-Wl,--wrap=fstat \
@@ -1183,6 +1183,8 @@ jsc-copy-headers:
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/SymbolObject.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/SymbolObject.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/JSGenerator.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/JSGenerator.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/UnlinkedFunctionCodeBlock.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/UnlinkedFunctionCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/GlobalCodeBlock.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/GlobalCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/ProgramCodeBlock.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/ProgramCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/AggregateError.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/AggregateError.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/API/JSWeakValue.h $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/JSWeakValue.h
find $(WEBKIT_RELEASE_DIR)/JavaScriptCore/Headers/JavaScriptCore/ -name "*.h" -exec cp {} $(WEBKIT_RELEASE_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/ \;
@@ -1234,6 +1236,8 @@ jsc-copy-headers-debug:
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/SymbolObject.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/SymbolObject.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/JSGenerator.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/JSGenerator.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/UnlinkedFunctionCodeBlock.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/UnlinkedFunctionCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/GlobalCodeBlock.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/GlobalCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/bytecode/ProgramCodeBlock.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/ProgramCodeBlock.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/runtime/AggregateError.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/AggregateError.h
cp $(WEBKIT_DIR)/Source/JavaScriptCore/API/JSWeakValue.h $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/JSWeakValue.h
find $(WEBKIT_DEBUG_DIR)/JavaScriptCore/Headers/JavaScriptCore/ -name "*.h" -exec cp {} $(WEBKIT_DEBUG_DIR)/JavaScriptCore/PrivateHeaders/JavaScriptCore/ \;
@@ -1392,7 +1396,7 @@ jsc-build-linux-compile-build-debug:
cmake --build $(WEBKIT_DEBUG_DIR) --config Debug --target jsc
jsc-build-mac: jsc-force-fastjit jsc-build-mac-compile jsc-build-copy
jsc-build-mac: jsc-force-fastjit jsc-build-mac-compile
jsc-build-mac-debug: jsc-force-fastjit jsc-build-mac-compile-debug
jsc-build-linux: jsc-build-linux-compile-config jsc-build-linux-compile-build jsc-build-copy

264
README.md
View File

@@ -47,6 +47,8 @@ Bun supports Linux (x64 & arm64), macOS (x64 & Apple Silicon) and Windows (x64).
> **Linux users** — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
> **x64 users** — if you see "illegal instruction" or similar errors, check our [CPU requirements](https://bun.sh/docs/installation#cpu-requirements-and-baseline-builds)
```sh
# with install script (recommended)
curl -fsSL https://bun.sh/install | bash
@@ -96,10 +98,14 @@ bun upgrade --canary
- [`bun init`](https://bun.sh/docs/cli/init)
- [`bun create`](https://bun.sh/docs/cli/bun-create)
- CLI
- [`bun upgrade`](https://bun.sh/docs/cli/bun-upgrade)
- Runtime
- [`bun run`](https://bun.sh/docs/cli/run)
- [File types](https://bun.sh/docs/runtime/loaders)
- [File types (Loaders)](https://bun.sh/docs/runtime/loaders)
- [TypeScript](https://bun.sh/docs/runtime/typescript)
- [JSX](https://bun.sh/docs/runtime/jsx)
- [Environment variables](https://bun.sh/docs/runtime/env)
@@ -108,12 +114,12 @@ bun upgrade --canary
- [Node.js compatibility](https://bun.sh/docs/runtime/nodejs-apis)
- [Single-file executable](https://bun.sh/docs/bundler/executables)
- [Plugins](https://bun.sh/docs/runtime/plugins)
- [Watch mode](https://bun.sh/docs/runtime/hot)
- [Watch mode / Hot Reloading](https://bun.sh/docs/runtime/hot)
- [Module resolution](https://bun.sh/docs/runtime/modules)
- [Auto-install](https://bun.sh/docs/runtime/autoimport)
- [bunfig.toml](https://bun.sh/docs/runtime/bunfig)
- [Debugger](https://bun.sh/docs/runtime/debugger)
- [Framework API](https://bun.sh/docs/runtime/framework)
- [$ Shell](https://bun.sh/docs/runtime/shell)
- Package manager
@@ -122,7 +128,12 @@ bun upgrade --canary
- [`bun remove`](https://bun.sh/docs/cli/remove)
- [`bun update`](https://bun.sh/docs/cli/update)
- [`bun link`](https://bun.sh/docs/cli/link)
- [`bun unlink`](https://bun.sh/docs/cli/unlink)
- [`bun pm`](https://bun.sh/docs/cli/pm)
- [`bun outdated`](https://bun.sh/docs/cli/outdated)
- [`bun publish`](https://bun.sh/docs/cli/publish)
- [`bun patch`](https://bun.sh/docs/install/patch)
- [`bun patch-commit`](https://bun.sh/docs/cli/patch-commit)
- [Global cache](https://bun.sh/docs/install/cache)
- [Workspaces](https://bun.sh/docs/install/workspaces)
- [Lifecycle scripts](https://bun.sh/docs/install/lifecycle)
@@ -130,6 +141,7 @@ bun upgrade --canary
- [Lockfile](https://bun.sh/docs/install/lockfile)
- [Scopes and registries](https://bun.sh/docs/install/registries)
- [Overrides and resolutions](https://bun.sh/docs/install/overrides)
- [`.npmrc`](https://bun.sh/docs/install/npmrc)
- Bundler
@@ -138,6 +150,11 @@ bun upgrade --canary
- [Plugins](https://bun.sh/docs/bundler/plugins)
- [Macros](https://bun.sh/docs/bundler/macros)
- [vs esbuild](https://bun.sh/docs/bundler/vs-esbuild)
- [Single-file executable](https://bun.sh/docs/bundler/executables)
- [CSS](https://bun.sh/docs/bundler/css)
- [HTML](https://bun.sh/docs/bundler/html)
- [Hot Module Replacement (HMR)](https://bun.sh/docs/bundler/hmr)
- [Full-stack with HTML imports](https://bun.sh/docs/bundler/fullstack)
- Test runner
@@ -150,6 +167,10 @@ bun upgrade --canary
- [Dates and times](https://bun.sh/docs/test/time)
- [DOM testing](https://bun.sh/docs/test/dom)
- [Code coverage](https://bun.sh/docs/test/coverage)
- [Configuration](https://bun.sh/docs/test/configuration)
- [Discovery](https://bun.sh/docs/test/discovery)
- [Reporters](https://bun.sh/docs/test/reporters)
- [Runtime Behavior](https://bun.sh/docs/test/runtime-behavior)
- Package runner
@@ -157,219 +178,235 @@ bun upgrade --canary
- API
- [HTTP server](https://bun.sh/docs/api/http)
- [HTTP server (`Bun.serve`)](https://bun.sh/docs/api/http)
- [WebSockets](https://bun.sh/docs/api/websockets)
- [Workers](https://bun.sh/docs/api/workers)
- [Binary data](https://bun.sh/docs/api/binary-data)
- [Streams](https://bun.sh/docs/api/streams)
- [File I/O](https://bun.sh/docs/api/file-io)
- [File I/O (`Bun.file`)](https://bun.sh/docs/api/file-io)
- [import.meta](https://bun.sh/docs/api/import-meta)
- [SQLite](https://bun.sh/docs/api/sqlite)
- [SQLite (`bun:sqlite`)](https://bun.sh/docs/api/sqlite)
- [PostgreSQL (`Bun.sql`)](https://bun.sh/docs/api/sql)
- [Redis (`Bun.redis`)](https://bun.sh/docs/api/redis)
- [S3 Client (`Bun.s3`)](https://bun.sh/docs/api/s3)
- [FileSystemRouter](https://bun.sh/docs/api/file-system-router)
- [TCP sockets](https://bun.sh/docs/api/tcp)
- [UDP sockets](https://bun.sh/docs/api/udp)
- [Globals](https://bun.sh/docs/api/globals)
- [$ Shell](https://bun.sh/docs/runtime/shell)
- [Child processes](https://bun.sh/docs/api/spawn)
- [Transpiler](https://bun.sh/docs/api/transpiler)
- [Child processes (spawn)](https://bun.sh/docs/api/spawn)
- [Transpiler (`Bun.Transpiler`)](https://bun.sh/docs/api/transpiler)
- [Hashing](https://bun.sh/docs/api/hashing)
- [Colors (`Bun.color`)](https://bun.sh/docs/api/color)
- [Console](https://bun.sh/docs/api/console)
- [FFI](https://bun.sh/docs/api/ffi)
- [FFI (`bun:ffi`)](https://bun.sh/docs/api/ffi)
- [C Compiler (`bun:ffi` cc)](https://bun.sh/docs/api/cc)
- [HTMLRewriter](https://bun.sh/docs/api/html-rewriter)
- [Testing](https://bun.sh/docs/api/test)
- [Testing (`bun:test`)](https://bun.sh/docs/api/test)
- [Cookies (`Bun.Cookie`)](https://bun.sh/docs/api/cookie)
- [Utils](https://bun.sh/docs/api/utils)
- [Node-API](https://bun.sh/docs/api/node-api)
- [Glob](https://bun.sh/docs/api/glob)
- [Semver](https://bun.sh/docs/api/semver)
- Project
- [Roadmap](https://bun.sh/docs/project/roadmap)
- [Benchmarking](https://bun.sh/docs/project/benchmarking)
- [Contributing](https://bun.sh/docs/project/contributing)
- [Building Windows](https://bun.sh/docs/project/building-windows)
- [License](https://bun.sh/docs/project/licensing)
- [Glob (`Bun.Glob`)](https://bun.sh/docs/api/glob)
- [Semver (`Bun.semver`)](https://bun.sh/docs/api/semver)
- [DNS](https://bun.sh/docs/api/dns)
- [fetch API extensions](https://bun.sh/docs/api/fetch)
## Guides
- Binary
- [Convert a Blob to a DataView](https://bun.sh/guides/binary/blob-to-dataview)
- [Convert a Blob to a ReadableStream](https://bun.sh/guides/binary/blob-to-stream)
- [Convert a Blob to a string](https://bun.sh/guides/binary/blob-to-string)
- [Convert a Blob to a Uint8Array](https://bun.sh/guides/binary/blob-to-typedarray)
- [Convert a Blob to an ArrayBuffer](https://bun.sh/guides/binary/blob-to-arraybuffer)
- [Convert a Buffer to a blob](https://bun.sh/guides/binary/buffer-to-blob)
- [Convert a Buffer to a ReadableStream](https://bun.sh/guides/binary/buffer-to-readablestream)
- [Convert a Blob to a DataView](https://bun.sh/guides/binary/blob-to-dataview)
- [Convert a Buffer to a string](https://bun.sh/guides/binary/buffer-to-string)
- [Convert a Buffer to a Uint8Array](https://bun.sh/guides/binary/buffer-to-typedarray)
- [Convert a Buffer to an ArrayBuffer](https://bun.sh/guides/binary/buffer-to-arraybuffer)
- [Convert a Blob to a ReadableStream](https://bun.sh/guides/binary/blob-to-stream)
- [Convert a Blob to a Uint8Array](https://bun.sh/guides/binary/blob-to-typedarray)
- [Convert a DataView to a string](https://bun.sh/guides/binary/dataview-to-string)
- [Convert a Uint8Array to a Blob](https://bun.sh/guides/binary/typedarray-to-blob)
- [Convert a Uint8Array to a Buffer](https://bun.sh/guides/binary/typedarray-to-buffer)
- [Convert a Uint8Array to a DataView](https://bun.sh/guides/binary/typedarray-to-dataview)
- [Convert a Uint8Array to a ReadableStream](https://bun.sh/guides/binary/typedarray-to-readablestream)
- [Convert a Uint8Array to a string](https://bun.sh/guides/binary/typedarray-to-string)
- [Convert a Uint8Array to an ArrayBuffer](https://bun.sh/guides/binary/typedarray-to-arraybuffer)
- [Convert a Blob to an ArrayBuffer](https://bun.sh/guides/binary/blob-to-arraybuffer)
- [Convert an ArrayBuffer to a Blob](https://bun.sh/guides/binary/arraybuffer-to-blob)
- [Convert a Buffer to a Uint8Array](https://bun.sh/guides/binary/buffer-to-typedarray)
- [Convert a Uint8Array to a Buffer](https://bun.sh/guides/binary/typedarray-to-buffer)
- [Convert a Uint8Array to a string](https://bun.sh/guides/binary/typedarray-to-string)
- [Convert a Buffer to an ArrayBuffer](https://bun.sh/guides/binary/buffer-to-arraybuffer)
- [Convert an ArrayBuffer to a Buffer](https://bun.sh/guides/binary/arraybuffer-to-buffer)
- [Convert an ArrayBuffer to a string](https://bun.sh/guides/binary/arraybuffer-to-string)
- [Convert a Uint8Array to a DataView](https://bun.sh/guides/binary/typedarray-to-dataview)
- [Convert a Buffer to a ReadableStream](https://bun.sh/guides/binary/buffer-to-readablestream)
- [Convert a Uint8Array to an ArrayBuffer](https://bun.sh/guides/binary/typedarray-to-arraybuffer)
- [Convert an ArrayBuffer to a Uint8Array](https://bun.sh/guides/binary/arraybuffer-to-typedarray)
- [Convert an ArrayBuffer to an array of numbers](https://bun.sh/guides/binary/arraybuffer-to-array)
- [Convert a Uint8Array to a ReadableStream](https://bun.sh/guides/binary/typedarray-to-readablestream)
- Ecosystem
- [Build a frontend using Vite and Bun](https://bun.sh/guides/ecosystem/vite)
- [Build an app with Astro and Bun](https://bun.sh/guides/ecosystem/astro)
- [Build an app with Next.js and Bun](https://bun.sh/guides/ecosystem/nextjs)
- [Use React and JSX](https://bun.sh/guides/ecosystem/react)
- [Use EdgeDB with Bun](https://bun.sh/guides/ecosystem/edgedb)
- [Use Prisma with Bun](https://bun.sh/guides/ecosystem/prisma)
- [Add Sentry to a Bun app](https://bun.sh/guides/ecosystem/sentry)
- [Create a Discord bot](https://bun.sh/guides/ecosystem/discordjs)
- [Run Bun as a daemon with PM2](https://bun.sh/guides/ecosystem/pm2)
- [Use Drizzle ORM with Bun](https://bun.sh/guides/ecosystem/drizzle)
- [Build an app with Nuxt and Bun](https://bun.sh/guides/ecosystem/nuxt)
- [Build an app with Qwik and Bun](https://bun.sh/guides/ecosystem/qwik)
- [Build an app with Astro and Bun](https://bun.sh/guides/ecosystem/astro)
- [Build an app with Remix and Bun](https://bun.sh/guides/ecosystem/remix)
- [Build an app with SolidStart and Bun](https://bun.sh/guides/ecosystem/solidstart)
- [Build an app with SvelteKit and Bun](https://bun.sh/guides/ecosystem/sveltekit)
- [Build an HTTP server using Elysia and Bun](https://bun.sh/guides/ecosystem/elysia)
- [Build an HTTP server using Express and Bun](https://bun.sh/guides/ecosystem/express)
- [Build a frontend using Vite and Bun](https://bun.sh/guides/ecosystem/vite)
- [Build an app with Next.js and Bun](https://bun.sh/guides/ecosystem/nextjs)
- [Run Bun as a daemon with systemd](https://bun.sh/guides/ecosystem/systemd)
- [Deploy a Bun application on Render](https://bun.sh/guides/ecosystem/render)
- [Build an HTTP server using Hono and Bun](https://bun.sh/guides/ecosystem/hono)
- [Build an app with SvelteKit and Bun](https://bun.sh/guides/ecosystem/sveltekit)
- [Build an app with SolidStart and Bun](https://bun.sh/guides/ecosystem/solidstart)
- [Build an HTTP server using Elysia and Bun](https://bun.sh/guides/ecosystem/elysia)
- [Build an HTTP server using StricJS and Bun](https://bun.sh/guides/ecosystem/stric)
- [Containerize a Bun application with Docker](https://bun.sh/guides/ecosystem/docker)
- [Create a Discord bot](https://bun.sh/guides/ecosystem/discordjs)
- [Deploy a Bun application on Render](https://bun.sh/guides/ecosystem/render)
- [Read and write data to MongoDB using Mongoose and Bun](https://bun.sh/guides/ecosystem/mongoose)
- [Run Bun as a daemon with PM2](https://bun.sh/guides/ecosystem/pm2)
- [Run Bun as a daemon with systemd](https://bun.sh/guides/ecosystem/systemd)
- [Build an HTTP server using Express and Bun](https://bun.sh/guides/ecosystem/express)
- [Use Neon Postgres through Drizzle ORM](https://bun.sh/guides/ecosystem/neon-drizzle)
- [Server-side render (SSR) a React component](https://bun.sh/guides/ecosystem/ssr-react)
- [Use Drizzle ORM with Bun](https://bun.sh/guides/ecosystem/drizzle)
- [Use EdgeDB with Bun](https://bun.sh/guides/ecosystem/edgedb)
- [Read and write data to MongoDB using Mongoose and Bun](https://bun.sh/guides/ecosystem/mongoose)
- [Use Neon's Serverless Postgres with Bun](https://bun.sh/guides/ecosystem/neon-serverless-postgres)
- [Use Prisma with Bun](https://bun.sh/guides/ecosystem/prisma)
- [Use React and JSX](https://bun.sh/guides/ecosystem/react)
- [Add Sentry to a Bun app](https://bun.sh/guides/ecosystem/sentry)
- HTMLRewriter
- [Extract links from a webpage using HTMLRewriter](https://bun.sh/guides/html-rewriter/extract-links)
- [Extract social share images and Open Graph tags](https://bun.sh/guides/html-rewriter/extract-social-meta)
- HTTP
- [Common HTTP server usage](https://bun.sh/guides/http/server)
- [Configure TLS on an HTTP server](https://bun.sh/guides/http/tls)
- [fetch with unix domain sockets in Bun](https://bun.sh/guides/http/fetch-unix)
- [Hot reload an HTTP server](https://bun.sh/guides/http/hot)
- [Proxy HTTP requests using fetch()](https://bun.sh/guides/http/proxy)
- [Common HTTP server usage](https://bun.sh/guides/http/server)
- [Write a simple HTTP server](https://bun.sh/guides/http/simple)
- [Configure TLS on an HTTP server](https://bun.sh/guides/http/tls)
- [Send an HTTP request using fetch](https://bun.sh/guides/http/fetch)
- [Proxy HTTP requests using fetch()](https://bun.sh/guides/http/proxy)
- [Start a cluster of HTTP servers](https://bun.sh/guides/http/cluster)
- [Stream a file as an HTTP Response](https://bun.sh/guides/http/stream-file)
- [fetch with unix domain sockets in Bun](https://bun.sh/guides/http/fetch-unix)
- [Upload files via HTTP using FormData](https://bun.sh/guides/http/file-uploads)
- [Streaming HTTP Server with Async Iterators](https://bun.sh/guides/http/stream-iterator)
- [Streaming HTTP Server with Node.js Streams](https://bun.sh/guides/http/stream-node-streams-in-bun)
- [Upload files via HTTP using FormData](https://bun.sh/guides/http/file-uploads)
- [Write a simple HTTP server](https://bun.sh/guides/http/simple)
- Install
- [Add a dependency](https://bun.sh/guides/install/add)
- [Add a development dependency](https://bun.sh/guides/install/add-dev)
- [Add a Git dependency](https://bun.sh/guides/install/add-git)
- [Add a peer dependency](https://bun.sh/guides/install/add-peer)
- [Add a tarball dependency](https://bun.sh/guides/install/add-tarball)
- [Add a trusted dependency](https://bun.sh/guides/install/trusted)
- [Add a development dependency](https://bun.sh/guides/install/add-dev)
- [Add a tarball dependency](https://bun.sh/guides/install/add-tarball)
- [Add an optional dependency](https://bun.sh/guides/install/add-optional)
- [Configure a private registry for an organization scope with bun install](https://bun.sh/guides/install/registry-scope)
- [Configure git to diff Bun's lockb lockfile](https://bun.sh/guides/install/git-diff-bun-lockfile)
- [Generate a yarn-compatible lockfile](https://bun.sh/guides/install/yarnlock)
- [Configuring a monorepo using workspaces](https://bun.sh/guides/install/workspaces)
- [Generate a human-readable lockfile](https://bun.sh/guides/install/yarnlock)
- [Install a package under a different name](https://bun.sh/guides/install/npm-alias)
- [Install dependencies with Bun in GitHub Actions](https://bun.sh/guides/install/cicd)
- [Using bun install with Artifactory](https://bun.sh/guides/install/jfrog-artifactory)
- [Configure git to diff Bun's lockb lockfile](https://bun.sh/guides/install/git-diff-bun-lockfile)
- [Override the default npm registry for bun install](https://bun.sh/guides/install/custom-registry)
- [Using bun install with an Azure Artifacts npm registry](https://bun.sh/guides/install/azure-artifacts)
- [Using bun install with Artifactory](https://bun.sh/guides/install/jfrog-artifactory)
- [Migrate from npm install to bun install](https://bun.sh/guides/install/from-npm-install-to-bun-install)
- [Configure a private registry for an organization scope with bun install](https://bun.sh/guides/install/registry-scope)
- Process
- [Get the process uptime in nanoseconds](https://bun.sh/guides/process/nanoseconds)
- [Read from stdin](https://bun.sh/guides/process/stdin)
- [Listen for CTRL+C](https://bun.sh/guides/process/ctrl-c)
- [Spawn a child process](https://bun.sh/guides/process/spawn)
- [Listen to OS signals](https://bun.sh/guides/process/os-signals)
- [Parse command-line arguments](https://bun.sh/guides/process/argv)
- [Read from stdin](https://bun.sh/guides/process/stdin)
- [Read stderr from a child process](https://bun.sh/guides/process/spawn-stderr)
- [Read stdout from a child process](https://bun.sh/guides/process/spawn-stdout)
- [Spawn a child process](https://bun.sh/guides/process/spawn)
- [Get the process uptime in nanoseconds](https://bun.sh/guides/process/nanoseconds)
- [Spawn a child process and communicate using IPC](https://bun.sh/guides/process/ipc)
- Read file
- [Read a JSON file](https://bun.sh/guides/read-file/json)
- [Check if a file exists](https://bun.sh/guides/read-file/exists)
- [Get the MIME type of a file](https://bun.sh/guides/read-file/mime)
- [Read a file as a ReadableStream](https://bun.sh/guides/read-file/stream)
- [Read a file as a string](https://bun.sh/guides/read-file/string)
- [Read a file to a Buffer](https://bun.sh/guides/read-file/buffer)
- [Get the MIME type of a file](https://bun.sh/guides/read-file/mime)
- [Watch a directory for changes](https://bun.sh/guides/read-file/watch)
- [Read a file as a ReadableStream](https://bun.sh/guides/read-file/stream)
- [Read a file to a Uint8Array](https://bun.sh/guides/read-file/uint8array)
- [Read a file to an ArrayBuffer](https://bun.sh/guides/read-file/arraybuffer)
- [Read a JSON file](https://bun.sh/guides/read-file/json)
- [Watch a directory for changes](https://bun.sh/guides/read-file/watch)
- Runtime
- [Debugging Bun with the VS Code extension](https://bun.sh/guides/runtime/vscode-debugger)
- [Debugging Bun with the web debugger](https://bun.sh/guides/runtime/web-debugger)
- [Define and replace static globals & constants](https://bun.sh/guides/runtime/define-constant)
- [Delete files](https://bun.sh/guides/runtime/delete-file)
- [Run a Shell Command](https://bun.sh/guides/runtime/shell)
- [Import a JSON file](https://bun.sh/guides/runtime/import-json)
- [Import a TOML file](https://bun.sh/guides/runtime/import-toml)
- [Import HTML file as text](https://bun.sh/guides/runtime/import-html)
- [Install and run Bun in GitHub Actions](https://bun.sh/guides/runtime/cicd)
- [Install TypeScript declarations for Bun](https://bun.sh/guides/runtime/typescript)
- [Re-map import paths](https://bun.sh/guides/runtime/tsconfig-paths)
- [Read environment variables](https://bun.sh/guides/runtime/read-env)
- [Run a Shell Command](https://bun.sh/guides/runtime/shell)
- [Set a time zone in Bun](https://bun.sh/guides/runtime/timezone)
- [Set environment variables](https://bun.sh/guides/runtime/set-env)
- [Re-map import paths](https://bun.sh/guides/runtime/tsconfig-paths)
- [Delete directories](https://bun.sh/guides/runtime/delete-directory)
- [Read environment variables](https://bun.sh/guides/runtime/read-env)
- [Import a HTML file as text](https://bun.sh/guides/runtime/import-html)
- [Install and run Bun in GitHub Actions](https://bun.sh/guides/runtime/cicd)
- [Debugging Bun with the web debugger](https://bun.sh/guides/runtime/web-debugger)
- [Install TypeScript declarations for Bun](https://bun.sh/guides/runtime/typescript)
- [Debugging Bun with the VS Code extension](https://bun.sh/guides/runtime/vscode-debugger)
- [Inspect memory usage using V8 heap snapshots](https://bun.sh/guides/runtime/heap-snapshot)
- [Define and replace static globals & constants](https://bun.sh/guides/runtime/define-constant)
- [Codesign a single-file JavaScript executable on macOS](https://bun.sh/guides/runtime/codesign-macos-executable)
- Streams
- [Convert a Node.js Readable to a Blob](https://bun.sh/guides/streams/node-readable-to-blob)
- [Convert a Node.js Readable to a string](https://bun.sh/guides/streams/node-readable-to-string)
- [Convert a Node.js Readable to an ArrayBuffer](https://bun.sh/guides/streams/node-readable-to-arraybuffer)
- [Convert a Node.js Readable to JSON](https://bun.sh/guides/streams/node-readable-to-json)
- [Convert a ReadableStream to JSON](https://bun.sh/guides/streams/to-json)
- [Convert a ReadableStream to a Blob](https://bun.sh/guides/streams/to-blob)
- [Convert a ReadableStream to a Buffer](https://bun.sh/guides/streams/to-buffer)
- [Convert a ReadableStream to a string](https://bun.sh/guides/streams/to-string)
- [Convert a ReadableStream to a Uint8Array](https://bun.sh/guides/streams/to-typedarray)
- [Convert a ReadableStream to an array of chunks](https://bun.sh/guides/streams/to-array)
- [Convert a Node.js Readable to JSON](https://bun.sh/guides/streams/node-readable-to-json)
- [Convert a ReadableStream to an ArrayBuffer](https://bun.sh/guides/streams/to-arraybuffer)
- [Convert a ReadableStream to JSON](https://bun.sh/guides/streams/to-json)
- [Convert a Node.js Readable to a Blob](https://bun.sh/guides/streams/node-readable-to-blob)
- [Convert a Node.js Readable to a string](https://bun.sh/guides/streams/node-readable-to-string)
- [Convert a Node.js Readable to an Uint8Array](https://bun.sh/guides/streams/node-readable-to-uint8array)
- [Convert a Node.js Readable to an ArrayBuffer](https://bun.sh/guides/streams/node-readable-to-arraybuffer)
- Test
- [Bail early with the Bun test runner](https://bun.sh/guides/test/bail)
- [Generate code coverage reports with the Bun test runner](https://bun.sh/guides/test/coverage)
- [Mark a test as a "todo" with the Bun test runner](https://bun.sh/guides/test/todo-tests)
- [Migrate from Jest to Bun's test runner](https://bun.sh/guides/test/migrate-from-jest)
- [Mock functions in `bun test`](https://bun.sh/guides/test/mock-functions)
- [Re-run tests multiple times with the Bun test runner](https://bun.sh/guides/test/rerun-each)
- [Run tests in watch mode with Bun](https://bun.sh/guides/test/watch-mode)
- [Run your tests with the Bun test runner](https://bun.sh/guides/test/run-tests)
- [Set a code coverage threshold with the Bun test runner](https://bun.sh/guides/test/coverage-threshold)
- [Set a per-test timeout with the Bun test runner](https://bun.sh/guides/test/timeout)
- [Set the system time in Bun's test runner](https://bun.sh/guides/test/mock-clock)
- [Skip tests with the Bun test runner](https://bun.sh/guides/test/skip-tests)
- [Spy on methods in `bun test`](https://bun.sh/guides/test/spy-on)
- [Update snapshots in `bun test`](https://bun.sh/guides/test/update-snapshots)
- [Bail early with the Bun test runner](https://bun.sh/guides/test/bail)
- [Mock functions in `bun test`](https://bun.sh/guides/test/mock-functions)
- [Run tests in watch mode with Bun](https://bun.sh/guides/test/watch-mode)
- [Use snapshot testing in `bun test`](https://bun.sh/guides/test/snapshot)
- [Skip tests with the Bun test runner](https://bun.sh/guides/test/skip-tests)
- [Using Testing Library with Bun](https://bun.sh/guides/test/testing-library)
- [Update snapshots in `bun test`](https://bun.sh/guides/test/update-snapshots)
- [Run your tests with the Bun test runner](https://bun.sh/guides/test/run-tests)
- [Set the system time in Bun's test runner](https://bun.sh/guides/test/mock-clock)
- [Set a per-test timeout with the Bun test runner](https://bun.sh/guides/test/timeout)
- [Migrate from Jest to Bun's test runner](https://bun.sh/guides/test/migrate-from-jest)
- [Write browser DOM tests with Bun and happy-dom](https://bun.sh/guides/test/happy-dom)
- [Mark a test as a "todo" with the Bun test runner](https://bun.sh/guides/test/todo-tests)
- [Re-run tests multiple times with the Bun test runner](https://bun.sh/guides/test/rerun-each)
- [Generate code coverage reports with the Bun test runner](https://bun.sh/guides/test/coverage)
- [import, require, and test Svelte components with bun test](https://bun.sh/guides/test/svelte-test)
- [Set a code coverage threshold with the Bun test runner](https://bun.sh/guides/test/coverage-threshold)
- Util
- [Check if the current file is the entrypoint](https://bun.sh/guides/util/entrypoint)
- [Generate a UUID](https://bun.sh/guides/util/javascript-uuid)
- [Hash a password](https://bun.sh/guides/util/hash-a-password)
- [Escape an HTML string](https://bun.sh/guides/util/escape-html)
- [Get the current Bun version](https://bun.sh/guides/util/version)
- [Encode and decode base64 strings](https://bun.sh/guides/util/base64)
- [Compress and decompress data with gzip](https://bun.sh/guides/util/gzip)
- [Sleep for a fixed number of milliseconds](https://bun.sh/guides/util/sleep)
- [Detect when code is executed with Bun](https://bun.sh/guides/util/detect-bun)
- [Check if two objects are deeply equal](https://bun.sh/guides/util/deep-equals)
- [Compress and decompress data with DEFLATE](https://bun.sh/guides/util/deflate)
- [Compress and decompress data with gzip](https://bun.sh/guides/util/gzip)
- [Get the absolute path to the current entrypoint](https://bun.sh/guides/util/main)
- [Get the directory of the current file](https://bun.sh/guides/util/import-meta-dir)
- [Check if the current file is the entrypoint](https://bun.sh/guides/util/entrypoint)
- [Get the file name of the current file](https://bun.sh/guides/util/import-meta-file)
- [Convert a file URL to an absolute path](https://bun.sh/guides/util/file-url-to-path)
- [Convert an absolute path to a file URL](https://bun.sh/guides/util/path-to-file-url)
- [Detect when code is executed with Bun](https://bun.sh/guides/util/detect-bun)
- [Encode and decode base64 strings](https://bun.sh/guides/util/base64)
- [Escape an HTML string](https://bun.sh/guides/util/escape-html)
- [Get the absolute path of the current file](https://bun.sh/guides/util/import-meta-path)
- [Get the absolute path to the current entrypoint](https://bun.sh/guides/util/main)
- [Get the current Bun version](https://bun.sh/guides/util/version)
- [Get the directory of the current file](https://bun.sh/guides/util/import-meta-dir)
- [Get the file name of the current file](https://bun.sh/guides/util/import-meta-file)
- [Get the path to an executable bin file](https://bun.sh/guides/util/which-path-to-executable-bin)
- [Hash a password](https://bun.sh/guides/util/hash-a-password)
- [Sleep for a fixed number of milliseconds](https://bun.sh/guides/util/sleep)
- WebSocket
@@ -379,16 +416,17 @@ bun upgrade --canary
- [Set per-socket contextual data on a WebSocket](https://bun.sh/guides/websocket/context)
- Write file
- [Append content to a file](https://bun.sh/guides/write-file/append)
- [Copy a file to another location](https://bun.sh/guides/write-file/file-cp)
- [Delete a file](https://bun.sh/guides/write-file/unlink)
- [Write a Blob to a file](https://bun.sh/guides/write-file/blob)
- [Write a file incrementally](https://bun.sh/guides/write-file/filesink)
- [Write a file to stdout](https://bun.sh/guides/write-file/cat)
- [Write a ReadableStream to a file](https://bun.sh/guides/write-file/stream)
- [Write a Response to a file](https://bun.sh/guides/write-file/response)
- [Write a string to a file](https://bun.sh/guides/write-file/basic)
- [Write to stdout](https://bun.sh/guides/write-file/stdout)
- [Write a file to stdout](https://bun.sh/guides/write-file/cat)
- [Write a Blob to a file](https://bun.sh/guides/write-file/blob)
- [Write a string to a file](https://bun.sh/guides/write-file/basic)
- [Append content to a file](https://bun.sh/guides/write-file/append)
- [Write a file incrementally](https://bun.sh/guides/write-file/filesink)
- [Write a Response to a file](https://bun.sh/guides/write-file/response)
- [Copy a file to another location](https://bun.sh/guides/write-file/file-cp)
- [Write a ReadableStream to a file](https://bun.sh/guides/write-file/stream)
## Contributing

View File

@@ -3,7 +3,7 @@
// Enable latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

View File

@@ -1,5 +0,0 @@
bun
next
src/*.mov
src/*.blob

View File

@@ -1,77 +0,0 @@
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 -Doptimize=ReleaseFast ../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 -Doptimize=ReleaseFast ../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

View File

@@ -1,62 +0,0 @@
# 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 inaccurate.
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)

View File

@@ -1,114 +0,0 @@
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;
}),
);

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

File diff suppressed because it is too large Load Diff

View File

@@ -1,218 +0,0 @@
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: [8192 + 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 = @as(u64, @truncate((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 = 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 = @as(u64, @truncate(@as(u128, @intCast(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] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[0][0] + 1) % 256))) * 0.8)));
counters[counter].color_values[1] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[0][1] + 1) % 256))) * 0.8)));
counters[counter].color_values[2] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((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] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[1][0] + 1) % 256))) * 0.8)));
counters[counter].color_values[7] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[1][1] + 1) % 256))) * 0.8)));
counters[counter].color_values[8] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((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] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[2][0] + 1) % 256))) * 0.8)));
counters[counter].color_values[13] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[2][1] + 1) % 256))) * 0.8)));
counters[counter].color_values[14] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((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] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[3][0] + 1) % 256))) * 0.8)));
counters[counter].color_values[19] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((colors[3][1] + 1) % 256))) * 0.8)));
counters[counter].color_values[20] = @as(u32, @intFromFloat(std.math.round(@as(f64, @floatFromInt(((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, 0..) |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 =
\\
;

File diff suppressed because it is too large Load Diff

View File

@@ -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"
/>
<link rel="stylesheet" href="src/index.css" />
<script async src="src/index.tsx" type="module"></script>
</head>
<body>
<div id="reactroot"></div>
</body>
</html>

View File

@@ -1,2 +0,0 @@
import React from "react";
export { React };

View File

@@ -1,6 +0,0 @@
/// <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.

View File

@@ -1,5 +0,0 @@
module.exports = {
experimental: {
swcLoader: true,
},
};

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,11 +0,0 @@
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%)

View File

@@ -1,43 +0,0 @@
{
"name": "simple-react",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@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": "^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",
"url": "^0.11.0",
"wipwipwipwip-next-donotuse": "4.0.0"
},
"parcel": "parceldist/index.js",
"targets": {
"parcel": {
"outputFormat": "esmodule",
"sourceMap": false,
"optimize": false,
"engines": {
"chrome": "last 1 version"
}
}
},
"devDependencies": {
"@microsoft/fetch-event-source": "^2.0.1",
"@snowpack/plugin-react-refresh": "^2.5.0",
"typescript": "^4.3.4"
}
}

View File

@@ -1,13 +0,0 @@
// @ts-nocheck
import "../src/index.css";
import App from "next/app";
class MyApp extends App {
render() {
const { Component, pageProps } = this.props;
return <Component {...pageProps} />;
}
}
export default MyApp;

View File

@@ -1,13 +0,0 @@
import { Main } from "src/main";
export function IndexPage() {
return (
<Main
productName={
// @ts-ignore
typeof location !== "undefined" ? location.search.substring(1) : ""
}
/>
);
}
export default IndexPage;

View File

@@ -1 +0,0 @@
export { default as React } from "react";

View File

@@ -1,99 +0,0 @@
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) + "%)",
);

View File

@@ -1,83 +0,0 @@
#!/usr/bin/env 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"

View File

@@ -1,14 +0,0 @@
: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;
}

View File

@@ -1,23 +0,0 @@
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;
}
`}
/>
);
}

View File

@@ -1,22 +0,0 @@
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;
} `}
/>
);
}

View File

@@ -1,248 +0,0 @@
@import "./colors.css";
:root {
--heading-font: "Space Mono", system-ui;
--body-font: "IBM Plex Sans", system-ui;
--color-brand: #02ff00;
--color-brand-muted: rgb(2, 150, 0);
--padding-horizontal: 90px;
--page-background: black;
--page-background-alpha: rgba(0, 0, 0, 0.8);
--result__background-color: black;
--result__primary-color: var(--color-brand);
--result__foreground-color: white;
--result__muted-color: rgb(165, 165, 165);
--card-width: 352px;
--page-width: 1152px;
--snippets_container-background-unfocused: #171717;
--snippets_container-background-focused: #0017e9;
--snippets_container-background: var(
--snippets_container-background-unfocused
);
--snippets_container-muted-color: rgb(153, 153, 153);
}
body {
color: white;
margin: 0;
padding: 0;
font-family: var(--body-font);
background-color: var(--page-background);
color: var(--result__muted-color);
display: flex;
flex-direction: column;
height: 100%;
}
.Subtitle {
text-align: center;
font-size: 4em;
margin: 0;
padding: 0;
margin-bottom: 0.25em;
align-items: center;
display: flex;
flex-direction: row;
}
#reactroot,
#__next,
body,
html {
height: 100%;
}
.Title {
color: var(--color-brand);
font-family: var(--heading-font);
font-weight: 700;
margin-top: 48px;
font-size: 48px;
text-transform: capitalize;
text-align: center;
}
.Description {
text-align: center;
}
.main {
display: flex;
flex-direction: column;
height: 100%;
}
header,
.main {
width: 650px;
margin: 0 auto;
}
section {
width: 650px;
}
header {
margin-bottom: 48px;
}
footer {
flex-shrink: 0;
}
#reactroot,
#__next {
display: flex;
flex-direction: column;
justify-content: center;
}
section {
height: 300px;
display: flex;
flex-direction: column;
}
.ran,
.timer {
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-left: 10px solid red;
border-right: 10px solid pink;
border-top: 10px solid yellow;
border-bottom: 10px solid orange;
border-radius: 4px;
height: 92px;
}
.ProgressBar {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
background-color: var(--color-brand);
transform-origin: top left;
border-radius: 4px;
transform: scaleX(var(--progress-bar, 0%));
}
.Bundler-container {
background-color: var(--snippets_container-background-focused);
font-size: 64px;
font-weight: bold;
color: white;
left: 0;
right: 0;
padding: 0.8em 0.8em;
}
.Bundler-updateRate {
font-size: 0.8em;
font-weight: normal;
display: flex;
color: var(--result__muted-color);
}
.interval:before {
content: var(--interval, "16");
}
.highlight {
margin-left: 0.5ch;
color: white;
}
.timer:after {
content: var(--timestamp);
font-variant-numeric: tabular-nums;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
display: inline;
font-weight: 500;
color: white;
width: 100%;
}
.SectionLabel {
font-weight: 300;
font-family: var(--heading-font);
text-align: center;
width: 100%;
font-weight: 700;
margin-top: 24px;
}
.FooterLabel {
margin-top: 0;
margin-bottom: 12px;
}
.Spinner-container {
--spinner-muted: rgb(0, 255, 0);
--spinner-primary: rgb(0, 60, 255);
width: 96px;
height: 96px;
border-radius: 50%;
background-color: var(--page-background);
border-top: 1.1em solid var(--spinner-muted);
border-right: 1.1em solid var(--spinner-muted);
border-bottom: 1.1em solid var(--spinner-muted);
border-left: 1.1em solid var(--spinner-primary);
transform: rotate(var(--spinner-rotate, 12deg));
}
.Spinners {
display: grid;
grid-auto-flow: column;
justify-content: space-between;
width: 100%;
}
.Spinner-1.Spinner-container {
--spinner-muted: var(--spinner-1-muted);
--spinner-primary: var(--spinner-1-primary);
}
.Spinner-2.Spinner-container {
--spinner-muted: var(--spinner-2-muted);
--spinner-primary: var(--spinner-2-primary);
}
.Spinner-3.Spinner-container {
--spinner-muted: var(--spinner-3-muted);
--spinner-primary: var(--spinner-3-primary);
}
.Spinner-4.Spinner-container {
--spinner-muted: var(--spinner-4-muted);
--spinner-primary: var(--spinner-4-primary);
}

View File

@@ -1,21 +0,0 @@
import ReactDOM from "react-dom";
import { Main } from "./main";
const Base = () => {
const name = typeof location !== "undefined" ? decodeURIComponent(location.search.substring(1)) : null;
return <Main productName={name} />;
};
function startReact() {
ReactDOM.hydrate(<Base />, document.querySelector("#reactroot"));
}
if (typeof window !== "undefined") {
globalThis.addEventListener("DOMContentLoaded", () => {
startReact();
});
startReact();
}
export { Base };

View File

@@ -1,56 +0,0 @@
export const Main = (props: { productName: string; cssInJS?: string }) => {
return (
<>
<header>
<div className="Title">CSS HMR Stress Test!</div>
<p className="Description">
This page visually tests how quickly a bundler can update {props.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">
Ran: <span className="timer"></span>
</span>
</p>
<div className="ProgressBar-container">
<div className="ProgressBar"></div>
</div>
<div className="SectionLabel">The progress bar should move from left to right smoothly.</div>
</section>
<section>
<div className="Spinners">
<div className="Spinner-container Spinner-1">
<div className="Spinner"></div>
</div>
<div className="Spinner-container Spinner-2">
<div className="Spinner"></div>
</div>
<div className="Spinner-container Spinner-3">
<div className="Spinner"></div>
</div>
<div className="Spinner-container Spinner-4">
<div className="Spinner"></div>
</div>
</div>
<div className="SectionLabel">The spinners should rotate &amp; change color smoothly.</div>
</section>
</main>
<footer>
<div className="SectionLabel FooterLabel">There are no CSS animations on this page.</div>
<div className="Bundler-container">
<div className="Bundler">{props.productName}</div>
<div className="Bundler-updateRate">{props.cssInJS ? "CSS-in-JS framework: " + props.cssInJS : ""}</div>
</div>
</footer>
</>
);
};

View File

@@ -1,178 +0,0 @@
{
"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
}
}

View File

@@ -1,8 +0,0 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "react-jsx",
"paths": {}
}
}

View File

@@ -1,5 +0,0 @@
import reactRefresh from "@vitejs/plugin-react-refresh";
export default {
plugins: [reactRefresh()],
};

View File

@@ -1,15 +0,0 @@
# 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.

View File

@@ -3,7 +3,7 @@
// Enable latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

View File

@@ -50,6 +50,10 @@ bench("murmur64v2 (short)", () => {
Bun.hash.murmur64v2(shortStr);
});
bench("rapidhash (short)", () => {
Bun.hash.rapidhash(shortStr);
});
bench("wyhash (128 KB)", () => {
Bun.hash.wyhash(longStr);
});
@@ -94,4 +98,8 @@ bench("murmur64v2 (128 KB)", () => {
Bun.hash.murmur64v2(longStr);
});
bench("rapidhash (128 KB)", () => {
Bun.hash.rapidhash(longStr);
});
run();

View File

@@ -8,9 +8,9 @@ for (let builtin of builtinModules) {
path,
`
const builtin = ${JSON.stringify(builtin)};
const now = require("perf_hooks").performance.now();
const now = performance.now();
require(builtin);
const end = require("perf_hooks").performance.now();
const end = performance.now();
process.stdout.write(JSON.stringify({builtin, time: end - now}) + "\\n");
`,
);

View File

@@ -0,0 +1 @@
modules

View File

@@ -0,0 +1,48 @@
# Hot Reload Files Stress Test
This is a stress test for Bun's hot reloading functionality, designed to test performance with a high number of interdependent files.
## What It Does
- Generates 1000 interconnected TypeScript modules
- Each module imports 2 other modules
- Uses IPC (Inter-Process Communication) to detect reloads
- Performs 1,000 hot reloads and tracks memory usage
- Reports statistics about hot reload performance
## Usage
```bash
./run-stress-test.sh
```
This will:
1. Generate 1000 interconnected modules
2. Run the stress test that performs 10,000 hot reloads
3. Report complete performance statistics
## How The Test Works
The test utilizes Node.js's child_process fork API for communication:
1. The main process (stress-test.ts) creates a child process running Bun with hot reloading
2. The modules communicate with the parent process via IPC when they're reloaded
3. After detecting a successful reload, the parent modifies another file
4. This continues for 1,000 iterations
5. Memory usage is tracked throughout the process
## Architecture
- **generate.ts**: Creates 1000 interconnected modules with IPC signaling
- **stress-test.ts**: Controls the test, forks Bun, and tracks metrics
- **run-stress-test.sh**: Script to run the entire test from scratch
## Performance Metrics
The test reports:
- Total number of hot reloads completed
- Time taken to complete all reloads
- Average time per reload
- Initial and final RSS memory usage

View File

@@ -0,0 +1,166 @@
import { mkdir, writeFile } from "fs/promises";
import { join } from "path";
const MODULES_DIR = join(process.cwd(), "modules");
const NUM_MODULES = 1000;
// Create the modules directory if it doesn't exist
async function ensureModulesDir() {
try {
await mkdir(MODULES_DIR, { recursive: true });
console.log(`Created directory: ${MODULES_DIR}`);
} catch (err) {
if ((err as NodeJS.ErrnoException).code !== "EEXIST") {
throw err;
}
}
}
const html = `
<!DOCTYPE html>
<html>
<head>
<title>Hot Reload Stress Test</title>
<script src="./client_1.js"></script>
</head>
<body>
<h1>Hot Reload Stress Test</h1>
</body>
</html>
`;
// Generate the HTTP server file (the last file)
async function generateServerFile() {
const content = `
// File: module_${NUM_MODULES}.ts
console.log("Server module loaded");
import html from './index.html';
// Create a server to prove things are running
const server = Bun.serve({
port: 0,
routes: {
"/": html,
},
fetch() {
return new Response("Hot reload stress test server running");
},
});
if (process.send) {
process.send({
type: "server-started",
url: server.url.href,
});
}
console.log(\`Server started on http://localhost:\${server.port}\`);
// Print RSS memory usage
const rss = process.memoryUsage().rss / 1024 / 1024;
console.log(\`RSS Memory: \${rss.toFixed(2)} MB\`);
`;
await writeFile(join(MODULES_DIR, `module_${NUM_MODULES}.ts`), content);
}
// Generate interconnected module files
async function generateModuleFiles() {
// Generate modules 1 through NUM_MODULES-1
for (let i = 1; i < NUM_MODULES; i++) {
// Each module imports 2 other modules (except for the ones near the end that need to import the server)
const importIdx1 = Math.min(i + 1, NUM_MODULES);
const importIdx2 = Math.min(i + 2, NUM_MODULES);
const content = `
// File: module_${i}.ts
import "./module_${importIdx1}";
import "./module_${importIdx2}";
// This value will be changed during hot reload stress testing
export const value${i} = {
moduleId: ${i},
timestamp: \`\${new Date().toISOString()}\`,
counter: 0
};
`;
await writeFile(join(MODULES_DIR, `module_${i}.ts`), content);
if (i % 100 === 0) {
console.log(`Generated ${i} modules`);
}
}
}
// Generate the entry point file
async function generateEntryPoint() {
const content = `
if (!globalThis.hasLoadedOnce) {
globalThis.hasLoadedOnce = true;
console.log("Starting hot-reload stress test...");
// Print RSS memory usage
const rss = process.memoryUsage().rss / 1024 / 1024;
console.log(\`RSS Memory: \${rss.toFixed(2)} MB\`);
// Signal when the entry point is loaded
if (process.send && process.env.HOT_RELOAD_TEST === "true") {
process.send({
type: 'test-started',
rss: rss.toFixed(2)
});
}
// Print memory usage periodically
setInterval(() => {
const rss = process.memoryUsage().rss / 1024 / 1024;
console.log(\`[MEMORY] RSS: \${rss.toFixed(2)} MB at \${new Date().toISOString()}\`);
// Also send via IPC if available
if (process.send && process.env.HOT_RELOAD_TEST === "true") {
process.send({
type: 'memory-update',
rss: rss.toFixed(2),
time: Date.now()
});
}
}, 5000);
}
await import("./module_1");
process.send({
type: "module-reloaded",
rss: (process.memoryUsage.rss() / 1024 / 1024) | 0,
});
`;
await writeFile(join(MODULES_DIR, "index.ts"), content);
}
async function generateClientFile() {
const content = `
// File: client_1.js
console.log("Client module loaded");
`;
await writeFile(join(MODULES_DIR, "client_1.js"), content);
await writeFile(join(MODULES_DIR, "index.html"), html);
console.log("Generated client module");
}
await ensureModulesDir();
console.log("Generating server module...");
await generateServerFile();
console.log("Generating client module...");
await generateClientFile();
console.log("Generating interconnected modules...");
await generateModuleFiles();
console.log("Generating entry point...");
await generateEntryPoint();
console.log("Generation complete!");
console.log("Run with: HOT_RELOAD_TEST=true RELOAD_ID=initial bun --hot modules/index.ts");

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Clean up modules directory
rm -rf modules
# Generate the module files
echo "Generating 1000 module files..."
bun generate.ts
# Run the stress test
echo "Running stress test for 1000 reloads..."
bun stress-test.ts
# All done - the stress test manages the child process internally

View File

@@ -0,0 +1,161 @@
import { Subprocess } from "bun";
import { readFile, writeFile } from "fs/promises";
import { join } from "path";
const MODULES_DIR = join(process.cwd(), "modules");
const NUM_MODULES = 1000;
const TOTAL_RELOADS = 1000;
// Tracking metrics
let completedReloads = 0;
let startTime = 0;
let lastRss = 0;
// Function to write modified files
async function modifyFile(moduleNum: number, reloadId: string): Promise<void> {
const modulePath = join(MODULES_DIR, `module_${moduleNum}.ts`);
try {
// Read the current file content
const content = await readFile(modulePath, "utf8");
// Create a new timestamp
const timestamp = new Date().toISOString();
// Replace the timestamp and counter
const newContent = content.replace(
/export const value\d+ = \{[\s\S]*?\};/,
`export const value${moduleNum} = {
moduleId: ${moduleNum},
timestamp: "${timestamp}",
// comment ${completedReloads}!
counter: ${completedReloads + 1}
};
`,
);
// Write the modified content back to the file
await writeFile(modulePath, newContent);
console.count("Modify");
return;
} catch (error) {
console.error(`Error modifying module_${moduleNum}.ts:`, error);
throw error;
}
}
// Get a random number between min and max (inclusive)
function getRandomInt(min: number, max: number): number {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Start the child process with Bun's hot reloading
function startBunProcess() {
// Start the Bun process with hot reloading enabled
const child = Bun.spawn({
cmd: [process.execPath, "--hot", "--no-clear-screen", "./modules/index.ts"],
stdio: ["inherit", "inherit", "inherit"],
env: {
...process.env,
HOT_RELOAD_TEST: "true",
RELOAD_ID: "initial",
},
ipc(message, subprocess) {
if (message.type === "test-started") {
console.log(`Test started with initial RSS: ${message.rss} MB`);
lastRss = parseFloat(message.rss);
startNextReload();
} else if (message.type === "module-reloaded") {
const { rss } = message;
lastRss = parseFloat(rss);
// Check if this is the current reload we're waiting for
completedReloads++;
console.log(`[${completedReloads}/${TOTAL_RELOADS}] Module reloaded - RSS: ${rss} MB`);
// Start the next reload or finish
if (completedReloads < TOTAL_RELOADS) {
startNextReload();
} else {
finishTest();
}
} else if (message.type === "memory-update") {
// Periodic memory updates from the child process
lastRss = parseFloat(message.rss);
} else if (message.type === "server-started") {
fetch(message.url).then(res => {
res.text().then(text => {
console.count("Request completed");
});
});
}
},
});
return child;
}
// Start the next reload
async function startNextReload() {
const nextReloadNum = completedReloads + 1;
if (nextReloadNum > TOTAL_RELOADS) return;
try {
// Generate a unique reload ID for this reload
const reloadId = `reload-${nextReloadNum}`;
// Set the reload ID in the environment for the child process
process.env.RELOAD_ID = reloadId;
// Pick a random module to modify
const moduleNum = getRandomInt(1, NUM_MODULES - 1);
// Modify the file to trigger a hot reload
await modifyFile(moduleNum, reloadId);
} catch (error) {
console.error(`Error during reload #${nextReloadNum}:`, error);
// Try the next reload immediately
startNextReload();
}
}
// Finish the test and print statistics
function finishTest() {
const endTime = Date.now();
const duration = (endTime - startTime) / 1000;
console.log(`\nStress test complete!`);
console.log(`Performed ${completedReloads} hot reloads in ${duration.toFixed(2)} seconds`);
console.log(`Average: ${((duration / completedReloads) * 1000).toFixed(2)} ms per reload`);
console.log(`Final RSS: ${lastRss.toFixed(2)} MB`);
// Kill the child process and exit immediately
if (childProcess) {
childProcess.kill();
}
process.exit(0);
}
// Run the stress test
let childProcess: Subprocess | null = null;
async function runStressTest() {
console.log(`Starting stress test - will perform ${TOTAL_RELOADS} hot reloads`);
startTime = Date.now();
// Start the Bun process with hot reloading
childProcess = startBunProcess();
}
// Start the stress test
runStressTest();
// Handle process termination
process.on("SIGINT", () => {
console.log("\nTest interrupted by user");
if (childProcess) {
childProcess.kill();
}
process.exit(1);
});

View File

@@ -63,6 +63,7 @@ const BunBuildOptions = struct {
/// `./build/codegen` or equivalent
codegen_path: []const u8,
no_llvm: bool,
override_no_export_cpp_apis: bool,
cached_options_module: ?*Module = null,
windows_shim: ?WindowsShim = null,
@@ -92,8 +93,10 @@ const BunBuildOptions = struct {
opts.addOption([:0]const u8, "sha", b.allocator.dupeZ(u8, this.sha) catch @panic("OOM"));
opts.addOption(bool, "baseline", this.isBaseline());
opts.addOption(bool, "enable_logs", this.enable_logs);
opts.addOption(bool, "enable_asan", this.enable_asan);
opts.addOption([]const u8, "reported_nodejs_version", b.fmt("{}", .{this.reported_nodejs_version}));
opts.addOption(bool, "zig_self_hosted_backend", this.no_llvm);
opts.addOption(bool, "override_no_export_cpp_apis", this.override_no_export_cpp_apis);
const mod = opts.createModule();
this.cached_options_module = mod;
@@ -205,6 +208,7 @@ pub fn build(b: *Build) !void {
const obj_format = b.option(ObjectFormat, "obj_format", "Output file for object files") orelse .obj;
const no_llvm = b.option(bool, "no_llvm", "Experiment with Zig self hosted backends. No stability guaranteed") orelse false;
const override_no_export_cpp_apis = b.option(bool, "override-no-export-cpp-apis", "Override the default export_cpp_apis logic to disable exports") orelse false;
var build_options = BunBuildOptions{
.target = target,
@@ -216,6 +220,7 @@ pub fn build(b: *Build) !void {
.codegen_path = codegen_path,
.codegen_embed = codegen_embed,
.no_llvm = no_llvm,
.override_no_export_cpp_apis = override_no_export_cpp_apis,
.version = try Version.parse(bun_version),
.canary_revision = canary: {
@@ -385,6 +390,12 @@ pub fn build(b: *Build) !void {
.{ .os = .windows, .arch = .x86_64 },
}, &.{ .Debug, .ReleaseFast });
}
{
const step = b.step("check-windows-debug", "Check for semantic analysis errors on Windows");
addMultiCheck(b, step, build_options, &.{
.{ .os = .windows, .arch = .x86_64 },
}, &.{.Debug});
}
{
const step = b.step("check-macos", "Check for semantic analysis errors on Windows");
addMultiCheck(b, step, build_options, &.{
@@ -392,6 +403,13 @@ pub fn build(b: *Build) !void {
.{ .os = .mac, .arch = .aarch64 },
}, &.{ .Debug, .ReleaseFast });
}
{
const step = b.step("check-macos-debug", "Check for semantic analysis errors on Windows");
addMultiCheck(b, step, build_options, &.{
.{ .os = .mac, .arch = .x86_64 },
.{ .os = .mac, .arch = .aarch64 },
}, &.{.Debug});
}
{
const step = b.step("check-linux", "Check for semantic analysis errors on Windows");
addMultiCheck(b, step, build_options, &.{
@@ -399,6 +417,13 @@ pub fn build(b: *Build) !void {
.{ .os = .linux, .arch = .aarch64 },
}, &.{ .Debug, .ReleaseFast });
}
{
const step = b.step("check-linux-debug", "Check for semantic analysis errors on Windows");
addMultiCheck(b, step, build_options, &.{
.{ .os = .linux, .arch = .x86_64 },
.{ .os = .linux, .arch = .aarch64 },
}, &.{.Debug});
}
// zig build translate-c-headers
{
@@ -475,6 +500,7 @@ fn addMultiCheck(
.codegen_path = root_build_options.codegen_path,
.no_llvm = root_build_options.no_llvm,
.enable_asan = root_build_options.enable_asan,
.override_no_export_cpp_apis = root_build_options.override_no_export_cpp_apis,
};
var obj = addBunObject(b, &options);
@@ -507,6 +533,8 @@ fn getTranslateC(b: *Build, initial_target: std.Build.ResolvedTarget, optimize:
translate_c.defineCMacroRaw(b.fmt("{s}={d}", .{ str, @intFromBool(value) }));
}
translate_c.addIncludePath(b.path("vendor/zstd/lib"));
if (target.result.os.tag == .windows) {
// translate-c is unable to translate the unsuffixed windows functions
// like `SetCurrentDirectory` since they are defined with an odd macro

948
bun.lock

File diff suppressed because it is too large Load Diff

View File

@@ -88,7 +88,7 @@ endif()
if(UNIX)
register_compiler_flags(
DESCRIPTION "Enable debug symbols"
-g3 ${DEBUG}
-g3 -gz=zstd ${DEBUG}
-g1 ${RELEASE}
)

View File

@@ -425,6 +425,11 @@ function(register_command)
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} rm -r ${CACHE_PATH})
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} gzip -1 libbun-profile.a)
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} buildkite-agent artifact upload libbun-profile.a.gz)
elseif(filename STREQUAL "libbun-asan.a")
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} rm -r ${BUILD_PATH}/codegen)
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} rm -r ${CACHE_PATH})
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} gzip -1 libbun-asan.a)
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} buildkite-agent artifact upload libbun-asan.a.gz)
else()
list(APPEND CMD_COMMANDS COMMAND ${CMAKE_COMMAND} -E chdir ${BUILD_PATH} buildkite-agent artifact upload ${filename})
endif()

View File

@@ -91,7 +91,19 @@ endif()
optionx(CANARY_REVISION STRING "The canary revision of the build" DEFAULT ${DEFAULT_CANARY_REVISION})
if(RELEASE AND LINUX AND CI)
if(LINUX)
optionx(ENABLE_VALGRIND BOOL "If Valgrind support should be enabled" DEFAULT OFF)
endif()
if(DEBUG AND APPLE AND ARCH STREQUAL "aarch64")
set(DEFAULT_ASAN ON)
else()
set(DEFAULT_ASAN OFF)
endif()
optionx(ENABLE_ASAN BOOL "If ASAN support should be enabled" DEFAULT ${DEFAULT_ASAN})
if(RELEASE AND LINUX AND CI AND NOT ENABLE_ASSERTIONS AND NOT ENABLE_ASAN)
set(DEFAULT_LTO ON)
else()
set(DEFAULT_LTO OFF)
@@ -99,16 +111,10 @@ endif()
optionx(ENABLE_LTO BOOL "If LTO (link-time optimization) should be used" DEFAULT ${DEFAULT_LTO})
if(LINUX)
optionx(ENABLE_VALGRIND BOOL "If Valgrind support should be enabled" DEFAULT OFF)
if(ENABLE_ASAN AND ENABLE_LTO)
message(WARNING "ASAN and LTO are not supported together, disabling LTO")
setx(ENABLE_LTO OFF)
endif()
if(DEBUG AND APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64")
optionx(ENABLE_ASAN BOOL "If ASAN support should be enabled" DEFAULT ON)
else()
optionx(ENABLE_ASAN BOOL "If ASAN support should be enabled" DEFAULT OFF)
endif()
optionx(ENABLE_PRETTIER BOOL "If prettier should be ran" DEFAULT OFF)
if(USE_VALGRIND AND NOT USE_BASELINE)
message(WARNING "If valgrind is enabled, baseline must also be enabled")

69
cmake/Sources.json Normal file
View File

@@ -0,0 +1,69 @@
[
{
"output": "BunErrorSources.txt",
"paths": ["packages/bun-error/*.{json,ts,tsx,css}", "packages/bun-error/img/*"]
},
{
"output": "NodeFallbacksSources.txt",
"paths": ["src/node-fallbacks/*.js"]
},
{
"output": "ZigGeneratedClassesSources.txt",
"paths": ["src/bun.js/*.classes.ts", "src/bun.js/{api,node,test,webcore}/*.classes.ts"]
},
{
"output": "JavaScriptSources.txt",
"paths": ["src/js/**/*.{js,ts}"]
},
{
"output": "JavaScriptCodegenSources.txt",
"paths": ["src/codegen/*.ts"]
},
{
"output": "BakeRuntimeSources.txt",
"paths": ["src/bake/*.ts", "src/bake/*/*.{ts,css}"],
"exclude": ["src/bake/generated.ts"]
},
{
"output": "BindgenSources.txt",
"paths": ["src/**/*.bind.ts"]
},
{
"output": "ZigSources.txt",
"paths": ["src/**/*.zig"]
},
{
"output": "CxxSources.txt",
"paths": [
"src/io/*.cpp",
"src/bun.js/modules/*.cpp",
"src/bun.js/bindings/*.cpp",
"src/bun.js/bindings/webcore/*.cpp",
"src/bun.js/bindings/sqlite/*.cpp",
"src/bun.js/bindings/webcrypto/*.cpp",
"src/bun.js/bindings/webcrypto/*/*.cpp",
"src/bun.js/bindings/node/*.cpp",
"src/bun.js/bindings/node/crypto/*.cpp",
"src/bun.js/bindings/node/http/*.cpp",
"src/bun.js/bindings/v8/*.cpp",
"src/bun.js/bindings/v8/shim/*.cpp",
"src/bake/*.cpp",
"src/deps/*.cpp",
"src/vm/*.cpp",
"packages/bun-usockets/src/crypto/*.cpp"
]
},
{
"output": "CSources.txt",
"paths": [
"packages/bun-usockets/src/*.c",
"packages/bun-usockets/src/eventing/*.c",
"packages/bun-usockets/src/internal/*.c",
"packages/bun-usockets/src/crypto/*.c",
"src/bun.js/bindings/uv-posix-polyfills.c",
"src/bun.js/bindings/uv-posix-stubs.c",
"src/*.c",
"src/bun.js/bindings/node/http/llhttp/*.c"
]
}
]

View File

@@ -0,0 +1,35 @@
# Function to convert relative paths from a file to absolute paths
# Usage: absolute_sources(OUTPUT_VAR INPUT_FILE [BASE_DIR])
# OUTPUT_VAR: Variable name to store the resulting absolute paths
# INPUT_FILE: File containing relative paths (one per line)
# BASE_DIR: Optional base directory for resolving paths (defaults to CMAKE_CURRENT_SOURCE_DIR)
function(absolute_sources OUTPUT_VAR INPUT_FILE)
# Check if a custom base directory was provided
if(${ARGC} GREATER 2)
set(BASE_DIR ${ARGV2})
else()
set(BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()
# Read the file containing relative paths
file(STRINGS "${INPUT_FILE}" RELATIVE_PATHS)
# Create a list to store absolute paths
set(RESULT_LIST "")
# Convert each relative path to absolute
foreach(REL_PATH ${RELATIVE_PATHS})
# Skip empty lines
if(NOT "${REL_PATH}" STREQUAL "")
# Construct the absolute path
get_filename_component(ABS_PATH "${BASE_DIR}/${REL_PATH}" ABSOLUTE)
list(APPEND RESULT_LIST ${ABS_PATH})
endif()
endforeach()
# Set the output variable in the parent scope
set(${OUTPUT_VAR} ${RESULT_LIST} PARENT_SCOPE)
# Tell CMake that the configuration depends on this file
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${INPUT_FILE}")
endfunction()

View File

@@ -0,0 +1,23 @@
src/bake/bake.bind.ts
src/bake/bake.d.ts
src/bake/bake.private.d.ts
src/bake/bun-framework-react/index.ts
src/bake/client/css-reloader.ts
src/bake/client/data-view.ts
src/bake/client/error-serialization.ts
src/bake/client/inspect.ts
src/bake/client/JavaScriptSyntaxHighlighter.css
src/bake/client/JavaScriptSyntaxHighlighter.ts
src/bake/client/overlay.css
src/bake/client/overlay.ts
src/bake/client/stack-trace.ts
src/bake/client/websocket.ts
src/bake/debug.ts
src/bake/DevServer.bind.ts
src/bake/enums.ts
src/bake/hmr-module.ts
src/bake/hmr-runtime-client.ts
src/bake/hmr-runtime-error.ts
src/bake/hmr-runtime-server.ts
src/bake/server/stack-trace-stub.ts
src/bake/shared.ts

View File

@@ -0,0 +1,7 @@
src/bake/bake.bind.ts
src/bake/DevServer.bind.ts
src/bun.js/api/BunObject.bind.ts
src/bun.js/bindgen_test.bind.ts
src/bun.js/bindings/NodeModuleModule.bind.ts
src/bun.js/node/node_os.bind.ts
src/fmt.bind.ts

View File

@@ -0,0 +1,12 @@
packages/bun-error/bun-error.css
packages/bun-error/img/close.png
packages/bun-error/img/error.png
packages/bun-error/img/powered-by.png
packages/bun-error/img/powered-by.webp
packages/bun-error/index.tsx
packages/bun-error/markdown.ts
packages/bun-error/package.json
packages/bun-error/runtime-error.ts
packages/bun-error/sourcemap.ts
packages/bun-error/stack-trace-parser.ts
packages/bun-error/tsconfig.json

View File

@@ -0,0 +1,15 @@
packages/bun-usockets/src/bsd.c
packages/bun-usockets/src/context.c
packages/bun-usockets/src/crypto/openssl.c
packages/bun-usockets/src/eventing/epoll_kqueue.c
packages/bun-usockets/src/eventing/libuv.c
packages/bun-usockets/src/loop.c
packages/bun-usockets/src/quic.c
packages/bun-usockets/src/socket.c
packages/bun-usockets/src/udp.c
src/asan-config.c
src/bun.js/bindings/node/http/llhttp/api.c
src/bun.js/bindings/node/http/llhttp/http.c
src/bun.js/bindings/node/http/llhttp/llhttp.c
src/bun.js/bindings/uv-posix-polyfills.c
src/bun.js/bindings/uv-posix-stubs.c

View File

@@ -0,0 +1,489 @@
packages/bun-usockets/src/crypto/root_certs.cpp
packages/bun-usockets/src/crypto/sni_tree.cpp
src/bake/BakeGlobalObject.cpp
src/bake/BakeProduction.cpp
src/bake/BakeSourceProvider.cpp
src/bun.js/bindings/ActiveDOMCallback.cpp
src/bun.js/bindings/AsymmetricKeyValue.cpp
src/bun.js/bindings/AsyncContextFrame.cpp
src/bun.js/bindings/Base64Helpers.cpp
src/bun.js/bindings/bindings.cpp
src/bun.js/bindings/blob.cpp
src/bun.js/bindings/bun-simdutf.cpp
src/bun.js/bindings/bun-spawn.cpp
src/bun.js/bindings/BunClientData.cpp
src/bun.js/bindings/BunCommonStrings.cpp
src/bun.js/bindings/BunDebugger.cpp
src/bun.js/bindings/BunGCOutputConstraint.cpp
src/bun.js/bindings/BunGlobalScope.cpp
src/bun.js/bindings/BunHttp2CommonStrings.cpp
src/bun.js/bindings/BunInjectedScriptHost.cpp
src/bun.js/bindings/BunInspector.cpp
src/bun.js/bindings/BunJSCEventLoop.cpp
src/bun.js/bindings/BunObject.cpp
src/bun.js/bindings/BunPlugin.cpp
src/bun.js/bindings/BunProcess.cpp
src/bun.js/bindings/BunString.cpp
src/bun.js/bindings/BunWorkerGlobalScope.cpp
src/bun.js/bindings/c-bindings.cpp
src/bun.js/bindings/CallSite.cpp
src/bun.js/bindings/CallSitePrototype.cpp
src/bun.js/bindings/CatchScopeBinding.cpp
src/bun.js/bindings/CodeCoverage.cpp
src/bun.js/bindings/ConsoleObject.cpp
src/bun.js/bindings/Cookie.cpp
src/bun.js/bindings/CookieMap.cpp
src/bun.js/bindings/coroutine.cpp
src/bun.js/bindings/CPUFeatures.cpp
src/bun.js/bindings/decodeURIComponentSIMD.cpp
src/bun.js/bindings/DOMException.cpp
src/bun.js/bindings/DOMFormData.cpp
src/bun.js/bindings/DOMURL.cpp
src/bun.js/bindings/DOMWrapperWorld.cpp
src/bun.js/bindings/DoubleFormatter.cpp
src/bun.js/bindings/EncodeURIComponent.cpp
src/bun.js/bindings/ErrorCode.cpp
src/bun.js/bindings/ErrorStackFrame.cpp
src/bun.js/bindings/ErrorStackTrace.cpp
src/bun.js/bindings/EventLoopTaskNoContext.cpp
src/bun.js/bindings/ExposeNodeModuleGlobals.cpp
src/bun.js/bindings/ffi.cpp
src/bun.js/bindings/helpers.cpp
src/bun.js/bindings/highway_strings.cpp
src/bun.js/bindings/HTMLEntryPoint.cpp
src/bun.js/bindings/ImportMetaObject.cpp
src/bun.js/bindings/inlines.cpp
src/bun.js/bindings/InspectorBunFrontendDevServerAgent.cpp
src/bun.js/bindings/InspectorHTTPServerAgent.cpp
src/bun.js/bindings/InspectorLifecycleAgent.cpp
src/bun.js/bindings/InspectorTestReporterAgent.cpp
src/bun.js/bindings/InternalForTesting.cpp
src/bun.js/bindings/InternalModuleRegistry.cpp
src/bun.js/bindings/IPC.cpp
src/bun.js/bindings/isBuiltinModule.cpp
src/bun.js/bindings/JS2Native.cpp
src/bun.js/bindings/JSBigIntBinding.cpp
src/bun.js/bindings/JSBuffer.cpp
src/bun.js/bindings/JSBufferEncodingType.cpp
src/bun.js/bindings/JSBufferList.cpp
src/bun.js/bindings/JSBundlerPlugin.cpp
src/bun.js/bindings/JSBunRequest.cpp
src/bun.js/bindings/JSCommonJSExtensions.cpp
src/bun.js/bindings/JSCommonJSModule.cpp
src/bun.js/bindings/JSCTaskScheduler.cpp
src/bun.js/bindings/JSCTestingHelpers.cpp
src/bun.js/bindings/JSDOMExceptionHandling.cpp
src/bun.js/bindings/JSDOMFile.cpp
src/bun.js/bindings/JSDOMGlobalObject.cpp
src/bun.js/bindings/JSDOMWrapper.cpp
src/bun.js/bindings/JSDOMWrapperCache.cpp
src/bun.js/bindings/JSEnvironmentVariableMap.cpp
src/bun.js/bindings/JSFFIFunction.cpp
src/bun.js/bindings/JSMockFunction.cpp
src/bun.js/bindings/JSNextTickQueue.cpp
src/bun.js/bindings/JSNodePerformanceHooksHistogram.cpp
src/bun.js/bindings/JSNodePerformanceHooksHistogramConstructor.cpp
src/bun.js/bindings/JSNodePerformanceHooksHistogramPrototype.cpp
src/bun.js/bindings/JSPropertyIterator.cpp
src/bun.js/bindings/JSS3File.cpp
src/bun.js/bindings/JSSocketAddressDTO.cpp
src/bun.js/bindings/JSStringDecoder.cpp
src/bun.js/bindings/JSWrappingFunction.cpp
src/bun.js/bindings/JSX509Certificate.cpp
src/bun.js/bindings/JSX509CertificateConstructor.cpp
src/bun.js/bindings/JSX509CertificatePrototype.cpp
src/bun.js/bindings/linux_perf_tracing.cpp
src/bun.js/bindings/MarkingConstraint.cpp
src/bun.js/bindings/ModuleLoader.cpp
src/bun.js/bindings/napi_external.cpp
src/bun.js/bindings/napi_finalizer.cpp
src/bun.js/bindings/napi_handle_scope.cpp
src/bun.js/bindings/napi_type_tag.cpp
src/bun.js/bindings/napi.cpp
src/bun.js/bindings/NapiClass.cpp
src/bun.js/bindings/NapiRef.cpp
src/bun.js/bindings/NapiWeakValue.cpp
src/bun.js/bindings/ncrpyto_engine.cpp
src/bun.js/bindings/ncrypto.cpp
src/bun.js/bindings/node/crypto/CryptoDhJob.cpp
src/bun.js/bindings/node/crypto/CryptoGenDhKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoGenDsaKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoGenEcKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoGenKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoGenNidKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoGenRsaKeyPair.cpp
src/bun.js/bindings/node/crypto/CryptoHkdf.cpp
src/bun.js/bindings/node/crypto/CryptoKeygen.cpp
src/bun.js/bindings/node/crypto/CryptoKeys.cpp
src/bun.js/bindings/node/crypto/CryptoPrimes.cpp
src/bun.js/bindings/node/crypto/CryptoSignJob.cpp
src/bun.js/bindings/node/crypto/CryptoUtil.cpp
src/bun.js/bindings/node/crypto/JSCipher.cpp
src/bun.js/bindings/node/crypto/JSCipherConstructor.cpp
src/bun.js/bindings/node/crypto/JSCipherPrototype.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellman.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellmanConstructor.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellmanGroup.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellmanGroupConstructor.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellmanGroupPrototype.cpp
src/bun.js/bindings/node/crypto/JSDiffieHellmanPrototype.cpp
src/bun.js/bindings/node/crypto/JSECDH.cpp
src/bun.js/bindings/node/crypto/JSECDHConstructor.cpp
src/bun.js/bindings/node/crypto/JSECDHPrototype.cpp
src/bun.js/bindings/node/crypto/JSHash.cpp
src/bun.js/bindings/node/crypto/JSHmac.cpp
src/bun.js/bindings/node/crypto/JSKeyObject.cpp
src/bun.js/bindings/node/crypto/JSKeyObjectConstructor.cpp
src/bun.js/bindings/node/crypto/JSKeyObjectPrototype.cpp
src/bun.js/bindings/node/crypto/JSPrivateKeyObject.cpp
src/bun.js/bindings/node/crypto/JSPrivateKeyObjectConstructor.cpp
src/bun.js/bindings/node/crypto/JSPrivateKeyObjectPrototype.cpp
src/bun.js/bindings/node/crypto/JSPublicKeyObject.cpp
src/bun.js/bindings/node/crypto/JSPublicKeyObjectConstructor.cpp
src/bun.js/bindings/node/crypto/JSPublicKeyObjectPrototype.cpp
src/bun.js/bindings/node/crypto/JSSecretKeyObject.cpp
src/bun.js/bindings/node/crypto/JSSecretKeyObjectConstructor.cpp
src/bun.js/bindings/node/crypto/JSSecretKeyObjectPrototype.cpp
src/bun.js/bindings/node/crypto/JSSign.cpp
src/bun.js/bindings/node/crypto/JSVerify.cpp
src/bun.js/bindings/node/crypto/KeyObject.cpp
src/bun.js/bindings/node/crypto/node_crypto_binding.cpp
src/bun.js/bindings/node/http/JSConnectionsList.cpp
src/bun.js/bindings/node/http/JSConnectionsListConstructor.cpp
src/bun.js/bindings/node/http/JSConnectionsListPrototype.cpp
src/bun.js/bindings/node/http/JSHTTPParser.cpp
src/bun.js/bindings/node/http/JSHTTPParserConstructor.cpp
src/bun.js/bindings/node/http/JSHTTPParserPrototype.cpp
src/bun.js/bindings/node/http/NodeHTTPParser.cpp
src/bun.js/bindings/node/NodeTimers.cpp
src/bun.js/bindings/NodeAsyncHooks.cpp
src/bun.js/bindings/NodeDirent.cpp
src/bun.js/bindings/NodeFetch.cpp
src/bun.js/bindings/NodeFSStatBinding.cpp
src/bun.js/bindings/NodeFSStatFSBinding.cpp
src/bun.js/bindings/NodeHTTP.cpp
src/bun.js/bindings/NodeTimerObject.cpp
src/bun.js/bindings/NodeTLS.cpp
src/bun.js/bindings/NodeURL.cpp
src/bun.js/bindings/NodeValidator.cpp
src/bun.js/bindings/NodeVM.cpp
src/bun.js/bindings/NodeVMModule.cpp
src/bun.js/bindings/NodeVMScript.cpp
src/bun.js/bindings/NodeVMSourceTextModule.cpp
src/bun.js/bindings/NodeVMSyntheticModule.cpp
src/bun.js/bindings/NoOpForTesting.cpp
src/bun.js/bindings/ObjectBindings.cpp
src/bun.js/bindings/objects.cpp
src/bun.js/bindings/OsBinding.cpp
src/bun.js/bindings/Path.cpp
src/bun.js/bindings/ProcessBindingBuffer.cpp
src/bun.js/bindings/ProcessBindingConstants.cpp
src/bun.js/bindings/ProcessBindingFs.cpp
src/bun.js/bindings/ProcessBindingHTTPParser.cpp
src/bun.js/bindings/ProcessBindingNatives.cpp
src/bun.js/bindings/ProcessBindingTTYWrap.cpp
src/bun.js/bindings/ProcessBindingUV.cpp
src/bun.js/bindings/ProcessIdentifier.cpp
src/bun.js/bindings/RegularExpression.cpp
src/bun.js/bindings/S3Error.cpp
src/bun.js/bindings/ScriptExecutionContext.cpp
src/bun.js/bindings/Serialization.cpp
src/bun.js/bindings/ServerRouteList.cpp
src/bun.js/bindings/spawn.cpp
src/bun.js/bindings/SQLClient.cpp
src/bun.js/bindings/sqlite/JSSQLStatement.cpp
src/bun.js/bindings/Strong.cpp
src/bun.js/bindings/Uint8Array.cpp
src/bun.js/bindings/Undici.cpp
src/bun.js/bindings/URLDecomposition.cpp
src/bun.js/bindings/URLSearchParams.cpp
src/bun.js/bindings/UtilInspect.cpp
src/bun.js/bindings/v8/node.cpp
src/bun.js/bindings/v8/shim/Function.cpp
src/bun.js/bindings/v8/shim/FunctionTemplate.cpp
src/bun.js/bindings/v8/shim/GlobalInternals.cpp
src/bun.js/bindings/v8/shim/Handle.cpp
src/bun.js/bindings/v8/shim/HandleScopeBuffer.cpp
src/bun.js/bindings/v8/shim/InternalFieldObject.cpp
src/bun.js/bindings/v8/shim/Map.cpp
src/bun.js/bindings/v8/shim/ObjectTemplate.cpp
src/bun.js/bindings/v8/shim/Oddball.cpp
src/bun.js/bindings/v8/shim/TaggedPointer.cpp
src/bun.js/bindings/v8/v8_api_internal.cpp
src/bun.js/bindings/v8/v8_internal.cpp
src/bun.js/bindings/v8/V8Array.cpp
src/bun.js/bindings/v8/V8Boolean.cpp
src/bun.js/bindings/v8/V8Context.cpp
src/bun.js/bindings/v8/V8EscapableHandleScope.cpp
src/bun.js/bindings/v8/V8EscapableHandleScopeBase.cpp
src/bun.js/bindings/v8/V8External.cpp
src/bun.js/bindings/v8/V8Function.cpp
src/bun.js/bindings/v8/V8FunctionCallbackInfo.cpp
src/bun.js/bindings/v8/V8FunctionTemplate.cpp
src/bun.js/bindings/v8/V8HandleScope.cpp
src/bun.js/bindings/v8/V8Isolate.cpp
src/bun.js/bindings/v8/V8Local.cpp
src/bun.js/bindings/v8/V8Maybe.cpp
src/bun.js/bindings/v8/V8Number.cpp
src/bun.js/bindings/v8/V8Object.cpp
src/bun.js/bindings/v8/V8ObjectTemplate.cpp
src/bun.js/bindings/v8/V8String.cpp
src/bun.js/bindings/v8/V8Template.cpp
src/bun.js/bindings/v8/V8Value.cpp
src/bun.js/bindings/Weak.cpp
src/bun.js/bindings/webcore/AbortController.cpp
src/bun.js/bindings/webcore/AbortSignal.cpp
src/bun.js/bindings/webcore/ActiveDOMObject.cpp
src/bun.js/bindings/webcore/BroadcastChannel.cpp
src/bun.js/bindings/webcore/BunBroadcastChannelRegistry.cpp
src/bun.js/bindings/webcore/CloseEvent.cpp
src/bun.js/bindings/webcore/CommonAtomStrings.cpp
src/bun.js/bindings/webcore/ContextDestructionObserver.cpp
src/bun.js/bindings/webcore/CustomEvent.cpp
src/bun.js/bindings/webcore/CustomEventCustom.cpp
src/bun.js/bindings/webcore/DOMJITHelpers.cpp
src/bun.js/bindings/webcore/ErrorCallback.cpp
src/bun.js/bindings/webcore/ErrorEvent.cpp
src/bun.js/bindings/webcore/Event.cpp
src/bun.js/bindings/webcore/EventContext.cpp
src/bun.js/bindings/webcore/EventDispatcher.cpp
src/bun.js/bindings/webcore/EventEmitter.cpp
src/bun.js/bindings/webcore/EventFactory.cpp
src/bun.js/bindings/webcore/EventListenerMap.cpp
src/bun.js/bindings/webcore/EventNames.cpp
src/bun.js/bindings/webcore/EventPath.cpp
src/bun.js/bindings/webcore/EventTarget.cpp
src/bun.js/bindings/webcore/EventTargetConcrete.cpp
src/bun.js/bindings/webcore/EventTargetFactory.cpp
src/bun.js/bindings/webcore/FetchHeaders.cpp
src/bun.js/bindings/webcore/HeaderFieldTokenizer.cpp
src/bun.js/bindings/webcore/HTTPHeaderField.cpp
src/bun.js/bindings/webcore/HTTPHeaderIdentifiers.cpp
src/bun.js/bindings/webcore/HTTPHeaderMap.cpp
src/bun.js/bindings/webcore/HTTPHeaderNames.cpp
src/bun.js/bindings/webcore/HTTPHeaderStrings.cpp
src/bun.js/bindings/webcore/HTTPHeaderValues.cpp
src/bun.js/bindings/webcore/HTTPParsers.cpp
src/bun.js/bindings/webcore/IdentifierEventListenerMap.cpp
src/bun.js/bindings/webcore/InternalWritableStream.cpp
src/bun.js/bindings/webcore/JSAbortAlgorithm.cpp
src/bun.js/bindings/webcore/JSAbortController.cpp
src/bun.js/bindings/webcore/JSAbortSignal.cpp
src/bun.js/bindings/webcore/JSAbortSignalCustom.cpp
src/bun.js/bindings/webcore/JSAddEventListenerOptions.cpp
src/bun.js/bindings/webcore/JSBroadcastChannel.cpp
src/bun.js/bindings/webcore/JSByteLengthQueuingStrategy.cpp
src/bun.js/bindings/webcore/JSCallbackData.cpp
src/bun.js/bindings/webcore/JSCloseEvent.cpp
src/bun.js/bindings/webcore/JSCookie.cpp
src/bun.js/bindings/webcore/JSCookieMap.cpp
src/bun.js/bindings/webcore/JSCountQueuingStrategy.cpp
src/bun.js/bindings/webcore/JSCustomEvent.cpp
src/bun.js/bindings/webcore/JSDOMBindingInternalsBuiltins.cpp
src/bun.js/bindings/webcore/JSDOMBuiltinConstructorBase.cpp
src/bun.js/bindings/webcore/JSDOMConstructorBase.cpp
src/bun.js/bindings/webcore/JSDOMConvertDate.cpp
src/bun.js/bindings/webcore/JSDOMConvertNumbers.cpp
src/bun.js/bindings/webcore/JSDOMConvertStrings.cpp
src/bun.js/bindings/webcore/JSDOMConvertWebGL.cpp
src/bun.js/bindings/webcore/JSDOMException.cpp
src/bun.js/bindings/webcore/JSDOMFormData.cpp
src/bun.js/bindings/webcore/JSDOMGuardedObject.cpp
src/bun.js/bindings/webcore/JSDOMIterator.cpp
src/bun.js/bindings/webcore/JSDOMOperation.cpp
src/bun.js/bindings/webcore/JSDOMPromise.cpp
src/bun.js/bindings/webcore/JSDOMPromiseDeferred.cpp
src/bun.js/bindings/webcore/JSDOMURL.cpp
src/bun.js/bindings/webcore/JSErrorCallback.cpp
src/bun.js/bindings/webcore/JSErrorEvent.cpp
src/bun.js/bindings/webcore/JSErrorEventCustom.cpp
src/bun.js/bindings/webcore/JSErrorHandler.cpp
src/bun.js/bindings/webcore/JSEvent.cpp
src/bun.js/bindings/webcore/JSEventCustom.cpp
src/bun.js/bindings/webcore/JSEventDOMJIT.cpp
src/bun.js/bindings/webcore/JSEventEmitter.cpp
src/bun.js/bindings/webcore/JSEventEmitterCustom.cpp
src/bun.js/bindings/webcore/JSEventInit.cpp
src/bun.js/bindings/webcore/JSEventListener.cpp
src/bun.js/bindings/webcore/JSEventListenerOptions.cpp
src/bun.js/bindings/webcore/JSEventModifierInit.cpp
src/bun.js/bindings/webcore/JSEventTarget.cpp
src/bun.js/bindings/webcore/JSEventTargetCustom.cpp
src/bun.js/bindings/webcore/JSEventTargetNode.cpp
src/bun.js/bindings/webcore/JSFetchHeaders.cpp
src/bun.js/bindings/webcore/JSMessageChannel.cpp
src/bun.js/bindings/webcore/JSMessageChannelCustom.cpp
src/bun.js/bindings/webcore/JSMessageEvent.cpp
src/bun.js/bindings/webcore/JSMessageEventCustom.cpp
src/bun.js/bindings/webcore/JSMessagePort.cpp
src/bun.js/bindings/webcore/JSMessagePortCustom.cpp
src/bun.js/bindings/webcore/JSMIMEBindings.cpp
src/bun.js/bindings/webcore/JSMIMEParams.cpp
src/bun.js/bindings/webcore/JSMIMEType.cpp
src/bun.js/bindings/webcore/JSPerformance.cpp
src/bun.js/bindings/webcore/JSPerformanceEntry.cpp
src/bun.js/bindings/webcore/JSPerformanceEntryCustom.cpp
src/bun.js/bindings/webcore/JSPerformanceMark.cpp
src/bun.js/bindings/webcore/JSPerformanceMarkOptions.cpp
src/bun.js/bindings/webcore/JSPerformanceMeasure.cpp
src/bun.js/bindings/webcore/JSPerformanceMeasureOptions.cpp
src/bun.js/bindings/webcore/JSPerformanceObserver.cpp
src/bun.js/bindings/webcore/JSPerformanceObserverCallback.cpp
src/bun.js/bindings/webcore/JSPerformanceObserverCustom.cpp
src/bun.js/bindings/webcore/JSPerformanceObserverEntryList.cpp
src/bun.js/bindings/webcore/JSPerformanceResourceTiming.cpp
src/bun.js/bindings/webcore/JSPerformanceServerTiming.cpp
src/bun.js/bindings/webcore/JSPerformanceTiming.cpp
src/bun.js/bindings/webcore/JSReadableByteStreamController.cpp
src/bun.js/bindings/webcore/JSReadableStream.cpp
src/bun.js/bindings/webcore/JSReadableStreamBYOBReader.cpp
src/bun.js/bindings/webcore/JSReadableStreamBYOBRequest.cpp
src/bun.js/bindings/webcore/JSReadableStreamDefaultController.cpp
src/bun.js/bindings/webcore/JSReadableStreamDefaultReader.cpp
src/bun.js/bindings/webcore/JSReadableStreamSink.cpp
src/bun.js/bindings/webcore/JSReadableStreamSource.cpp
src/bun.js/bindings/webcore/JSReadableStreamSourceCustom.cpp
src/bun.js/bindings/webcore/JSStructuredSerializeOptions.cpp
src/bun.js/bindings/webcore/JSTextDecoderStream.cpp
src/bun.js/bindings/webcore/JSTextEncoder.cpp
src/bun.js/bindings/webcore/JSTextEncoderStream.cpp
src/bun.js/bindings/webcore/JSTransformStream.cpp
src/bun.js/bindings/webcore/JSTransformStreamDefaultController.cpp
src/bun.js/bindings/webcore/JSURLSearchParams.cpp
src/bun.js/bindings/webcore/JSWebSocket.cpp
src/bun.js/bindings/webcore/JSWorker.cpp
src/bun.js/bindings/webcore/JSWorkerOptions.cpp
src/bun.js/bindings/webcore/JSWritableStream.cpp
src/bun.js/bindings/webcore/JSWritableStreamDefaultController.cpp
src/bun.js/bindings/webcore/JSWritableStreamDefaultWriter.cpp
src/bun.js/bindings/webcore/JSWritableStreamSink.cpp
src/bun.js/bindings/webcore/MessageChannel.cpp
src/bun.js/bindings/webcore/MessageEvent.cpp
src/bun.js/bindings/webcore/MessagePort.cpp
src/bun.js/bindings/webcore/MessagePortChannel.cpp
src/bun.js/bindings/webcore/MessagePortChannelProvider.cpp
src/bun.js/bindings/webcore/MessagePortChannelProviderImpl.cpp
src/bun.js/bindings/webcore/MessagePortChannelRegistry.cpp
src/bun.js/bindings/webcore/NetworkLoadMetrics.cpp
src/bun.js/bindings/webcore/Performance.cpp
src/bun.js/bindings/webcore/PerformanceEntry.cpp
src/bun.js/bindings/webcore/PerformanceMark.cpp
src/bun.js/bindings/webcore/PerformanceMeasure.cpp
src/bun.js/bindings/webcore/PerformanceObserver.cpp
src/bun.js/bindings/webcore/PerformanceObserverEntryList.cpp
src/bun.js/bindings/webcore/PerformanceResourceTiming.cpp
src/bun.js/bindings/webcore/PerformanceServerTiming.cpp
src/bun.js/bindings/webcore/PerformanceTiming.cpp
src/bun.js/bindings/webcore/PerformanceUserTiming.cpp
src/bun.js/bindings/webcore/ReadableStream.cpp
src/bun.js/bindings/webcore/ReadableStreamDefaultController.cpp
src/bun.js/bindings/webcore/ReadableStreamSink.cpp
src/bun.js/bindings/webcore/ReadableStreamSource.cpp
src/bun.js/bindings/webcore/ResourceTiming.cpp
src/bun.js/bindings/webcore/RFC7230.cpp
src/bun.js/bindings/webcore/SerializedScriptValue.cpp
src/bun.js/bindings/webcore/ServerTiming.cpp
src/bun.js/bindings/webcore/ServerTimingParser.cpp
src/bun.js/bindings/webcore/StructuredClone.cpp
src/bun.js/bindings/webcore/TextEncoder.cpp
src/bun.js/bindings/webcore/WebCoreTypedArrayController.cpp
src/bun.js/bindings/webcore/WebSocket.cpp
src/bun.js/bindings/webcore/Worker.cpp
src/bun.js/bindings/webcore/WritableStream.cpp
src/bun.js/bindings/webcrypto/CommonCryptoDERUtilities.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithm.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CBC.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CBCOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CFB.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CFBOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CTR.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_CTROpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_GCM.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_GCMOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_KW.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmAES_KWOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmECDH.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmECDHOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmECDSA.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmECDSAOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmEd25519.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmHKDF.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmHKDFOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmHMAC.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmHMACOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmPBKDF2.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmPBKDF2OpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRegistry.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRegistryOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSA_OAEP.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSA_OAEPOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSA_PSS.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSA_PSSOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSAES_PKCS1_v1_5OpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmRSASSA_PKCS1_v1_5OpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmSHA1.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmSHA224.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmSHA256.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmSHA384.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmSHA512.cpp
src/bun.js/bindings/webcrypto/CryptoAlgorithmX25519.cpp
src/bun.js/bindings/webcrypto/CryptoDigest.cpp
src/bun.js/bindings/webcrypto/CryptoKey.cpp
src/bun.js/bindings/webcrypto/CryptoKeyAES.cpp
src/bun.js/bindings/webcrypto/CryptoKeyEC.cpp
src/bun.js/bindings/webcrypto/CryptoKeyECOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoKeyHMAC.cpp
src/bun.js/bindings/webcrypto/CryptoKeyOKP.cpp
src/bun.js/bindings/webcrypto/CryptoKeyOKPOpenSSL.cpp
src/bun.js/bindings/webcrypto/CryptoKeyRaw.cpp
src/bun.js/bindings/webcrypto/CryptoKeyRSA.cpp
src/bun.js/bindings/webcrypto/CryptoKeyRSAComponents.cpp
src/bun.js/bindings/webcrypto/CryptoKeyRSAOpenSSL.cpp
src/bun.js/bindings/webcrypto/JSAesCbcCfbParams.cpp
src/bun.js/bindings/webcrypto/JSAesCtrParams.cpp
src/bun.js/bindings/webcrypto/JSAesGcmParams.cpp
src/bun.js/bindings/webcrypto/JSAesKeyParams.cpp
src/bun.js/bindings/webcrypto/JSCryptoAesKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSCryptoAlgorithmParameters.cpp
src/bun.js/bindings/webcrypto/JSCryptoEcKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSCryptoHmacKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSCryptoKey.cpp
src/bun.js/bindings/webcrypto/JSCryptoKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSCryptoKeyPair.cpp
src/bun.js/bindings/webcrypto/JSCryptoKeyUsage.cpp
src/bun.js/bindings/webcrypto/JSCryptoRsaHashedKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSCryptoRsaKeyAlgorithm.cpp
src/bun.js/bindings/webcrypto/JSEcdhKeyDeriveParams.cpp
src/bun.js/bindings/webcrypto/JSEcdsaParams.cpp
src/bun.js/bindings/webcrypto/JSEcKeyParams.cpp
src/bun.js/bindings/webcrypto/JSHkdfParams.cpp
src/bun.js/bindings/webcrypto/JSHmacKeyParams.cpp
src/bun.js/bindings/webcrypto/JSJsonWebKey.cpp
src/bun.js/bindings/webcrypto/JSPbkdf2Params.cpp
src/bun.js/bindings/webcrypto/JSRsaHashedImportParams.cpp
src/bun.js/bindings/webcrypto/JSRsaHashedKeyGenParams.cpp
src/bun.js/bindings/webcrypto/JSRsaKeyGenParams.cpp
src/bun.js/bindings/webcrypto/JSRsaOaepParams.cpp
src/bun.js/bindings/webcrypto/JSRsaOtherPrimesInfo.cpp
src/bun.js/bindings/webcrypto/JSRsaPssParams.cpp
src/bun.js/bindings/webcrypto/JSSubtleCrypto.cpp
src/bun.js/bindings/webcrypto/JSX25519Params.cpp
src/bun.js/bindings/webcrypto/OpenSSLUtilities.cpp
src/bun.js/bindings/webcrypto/PhonyWorkQueue.cpp
src/bun.js/bindings/webcrypto/SerializedCryptoKeyWrapOpenSSL.cpp
src/bun.js/bindings/webcrypto/SubtleCrypto.cpp
src/bun.js/bindings/workaround-missing-symbols.cpp
src/bun.js/bindings/wtf-bindings.cpp
src/bun.js/bindings/ZigGeneratedCode.cpp
src/bun.js/bindings/ZigGlobalObject.cpp
src/bun.js/bindings/ZigSourceProvider.cpp
src/bun.js/modules/NodeModuleModule.cpp
src/bun.js/modules/NodeTTYModule.cpp
src/bun.js/modules/NodeUtilTypesModule.cpp
src/bun.js/modules/ObjectModule.cpp
src/deps/libuwsockets.cpp
src/io/io_darwin.cpp
src/vm/Semaphore.cpp
src/vm/SigintWatcher.cpp

View File

@@ -0,0 +1,18 @@
src/codegen/bake-codegen.ts
src/codegen/bindgen-lib-internal.ts
src/codegen/bindgen-lib.ts
src/codegen/bindgen.ts
src/codegen/buildTypeFlag.ts
src/codegen/builtin-parser.ts
src/codegen/bundle-functions.ts
src/codegen/bundle-modules.ts
src/codegen/class-definitions.ts
src/codegen/client-js.ts
src/codegen/create-hash-table.ts
src/codegen/generate-classes.ts
src/codegen/generate-js2native.ts
src/codegen/generate-jssink.ts
src/codegen/generate-node-errors.ts
src/codegen/helpers.ts
src/codegen/internal-module-registry-scanner.ts
src/codegen/replacements.ts

View File

@@ -0,0 +1,164 @@
src/js/builtins.d.ts
src/js/builtins/Bake.ts
src/js/builtins/BundlerPlugin.ts
src/js/builtins/ByteLengthQueuingStrategy.ts
src/js/builtins/CommonJS.ts
src/js/builtins/ConsoleObject.ts
src/js/builtins/CountQueuingStrategy.ts
src/js/builtins/Glob.ts
src/js/builtins/ImportMetaObject.ts
src/js/builtins/Ipc.ts
src/js/builtins/JSBufferConstructor.ts
src/js/builtins/JSBufferPrototype.ts
src/js/builtins/NodeModuleObject.ts
src/js/builtins/Peek.ts
src/js/builtins/ProcessObjectInternals.ts
src/js/builtins/ReadableByteStreamController.ts
src/js/builtins/ReadableByteStreamInternals.ts
src/js/builtins/ReadableStream.ts
src/js/builtins/ReadableStreamBYOBReader.ts
src/js/builtins/ReadableStreamBYOBRequest.ts
src/js/builtins/ReadableStreamDefaultController.ts
src/js/builtins/ReadableStreamDefaultReader.ts
src/js/builtins/ReadableStreamInternals.ts
src/js/builtins/shell.ts
src/js/builtins/StreamInternals.ts
src/js/builtins/TextDecoderStream.ts
src/js/builtins/TextEncoderStream.ts
src/js/builtins/TransformStream.ts
src/js/builtins/TransformStreamDefaultController.ts
src/js/builtins/TransformStreamInternals.ts
src/js/builtins/UtilInspect.ts
src/js/builtins/WritableStreamDefaultController.ts
src/js/builtins/WritableStreamDefaultWriter.ts
src/js/builtins/WritableStreamInternals.ts
src/js/bun/ffi.ts
src/js/bun/sql.ts
src/js/bun/sqlite.ts
src/js/internal-for-testing.ts
src/js/internal/abort_listener.ts
src/js/internal/assert/assertion_error.ts
src/js/internal/assert/calltracker.ts
src/js/internal/assert/myers_diff.ts
src/js/internal/assert/utils.ts
src/js/internal/buffer.ts
src/js/internal/cluster/child.ts
src/js/internal/cluster/isPrimary.ts
src/js/internal/cluster/primary.ts
src/js/internal/cluster/RoundRobinHandle.ts
src/js/internal/cluster/Worker.ts
src/js/internal/crypto/x509.ts
src/js/internal/debugger.ts
src/js/internal/errors.ts
src/js/internal/fifo.ts
src/js/internal/fixed_queue.ts
src/js/internal/freelist.ts
src/js/internal/fs/cp-sync.ts
src/js/internal/fs/cp.ts
src/js/internal/fs/glob.ts
src/js/internal/fs/streams.ts
src/js/internal/html.ts
src/js/internal/http.ts
src/js/internal/http/FakeSocket.ts
src/js/internal/linkedlist.ts
src/js/internal/primordials.js
src/js/internal/promisify.ts
src/js/internal/shared.ts
src/js/internal/stream.promises.ts
src/js/internal/stream.ts
src/js/internal/streams/add-abort-signal.ts
src/js/internal/streams/compose.ts
src/js/internal/streams/destroy.ts
src/js/internal/streams/duplex.ts
src/js/internal/streams/duplexify.ts
src/js/internal/streams/duplexpair.ts
src/js/internal/streams/end-of-stream.ts
src/js/internal/streams/from.ts
src/js/internal/streams/lazy_transform.ts
src/js/internal/streams/legacy.ts
src/js/internal/streams/native-readable.ts
src/js/internal/streams/operators.ts
src/js/internal/streams/passthrough.ts
src/js/internal/streams/pipeline.ts
src/js/internal/streams/readable.ts
src/js/internal/streams/state.ts
src/js/internal/streams/transform.ts
src/js/internal/streams/utils.ts
src/js/internal/streams/writable.ts
src/js/internal/timers.ts
src/js/internal/tls.ts
src/js/internal/tty.ts
src/js/internal/url.ts
src/js/internal/util/colors.ts
src/js/internal/util/inspect.d.ts
src/js/internal/util/inspect.js
src/js/internal/util/mime.ts
src/js/internal/validators.ts
src/js/internal/webstreams_adapters.ts
src/js/node/_http_agent.ts
src/js/node/_http_client.ts
src/js/node/_http_common.ts
src/js/node/_http_incoming.ts
src/js/node/_http_outgoing.ts
src/js/node/_http_server.ts
src/js/node/_stream_duplex.ts
src/js/node/_stream_passthrough.ts
src/js/node/_stream_readable.ts
src/js/node/_stream_transform.ts
src/js/node/_stream_wrap.ts
src/js/node/_stream_writable.ts
src/js/node/_tls_common.ts
src/js/node/assert.strict.ts
src/js/node/assert.ts
src/js/node/async_hooks.ts
src/js/node/child_process.ts
src/js/node/cluster.ts
src/js/node/console.ts
src/js/node/crypto.ts
src/js/node/dgram.ts
src/js/node/diagnostics_channel.ts
src/js/node/dns.promises.ts
src/js/node/dns.ts
src/js/node/domain.ts
src/js/node/events.ts
src/js/node/fs.promises.ts
src/js/node/fs.ts
src/js/node/http.ts
src/js/node/http2.ts
src/js/node/https.ts
src/js/node/inspector.ts
src/js/node/net.ts
src/js/node/os.ts
src/js/node/path.posix.ts
src/js/node/path.ts
src/js/node/path.win32.ts
src/js/node/perf_hooks.ts
src/js/node/punycode.ts
src/js/node/querystring.ts
src/js/node/readline.promises.ts
src/js/node/readline.ts
src/js/node/repl.ts
src/js/node/stream.consumers.ts
src/js/node/stream.promises.ts
src/js/node/stream.ts
src/js/node/stream.web.ts
src/js/node/test.ts
src/js/node/timers.promises.ts
src/js/node/timers.ts
src/js/node/tls.ts
src/js/node/trace_events.ts
src/js/node/tty.ts
src/js/node/url.ts
src/js/node/util.ts
src/js/node/v8.ts
src/js/node/vm.ts
src/js/node/wasi.ts
src/js/node/worker_threads.ts
src/js/node/zlib.ts
src/js/private.d.ts
src/js/thirdparty/isomorphic-fetch.ts
src/js/thirdparty/node-fetch.ts
src/js/thirdparty/undici.js
src/js/thirdparty/vercel_fetch.js
src/js/thirdparty/ws.js
src/js/wasi-runner.js

View File

@@ -0,0 +1,24 @@
src/node-fallbacks/assert.js
src/node-fallbacks/buffer.js
src/node-fallbacks/console.js
src/node-fallbacks/constants.js
src/node-fallbacks/crypto.js
src/node-fallbacks/domain.js
src/node-fallbacks/events.js
src/node-fallbacks/http.js
src/node-fallbacks/https.js
src/node-fallbacks/net.js
src/node-fallbacks/os.js
src/node-fallbacks/path.js
src/node-fallbacks/process.js
src/node-fallbacks/punycode.js
src/node-fallbacks/querystring.js
src/node-fallbacks/stream.js
src/node-fallbacks/string_decoder.js
src/node-fallbacks/sys.js
src/node-fallbacks/timers.js
src/node-fallbacks/timers.promises.js
src/node-fallbacks/tty.js
src/node-fallbacks/url.js
src/node-fallbacks/util.js
src/node-fallbacks/zlib.js

View File

@@ -0,0 +1,23 @@
src/bun.js/api/BunObject.classes.ts
src/bun.js/api/crypto.classes.ts
src/bun.js/api/ffi.classes.ts
src/bun.js/api/filesystem_router.classes.ts
src/bun.js/api/Glob.classes.ts
src/bun.js/api/h2.classes.ts
src/bun.js/api/html_rewriter.classes.ts
src/bun.js/api/JSBundler.classes.ts
src/bun.js/api/postgres.classes.ts
src/bun.js/api/S3Client.classes.ts
src/bun.js/api/S3Stat.classes.ts
src/bun.js/api/server.classes.ts
src/bun.js/api/Shell.classes.ts
src/bun.js/api/ShellArgs.classes.ts
src/bun.js/api/sockets.classes.ts
src/bun.js/api/streams.classes.ts
src/bun.js/api/valkey.classes.ts
src/bun.js/api/zlib.classes.ts
src/bun.js/node/node.classes.ts
src/bun.js/resolve_message.classes.ts
src/bun.js/test/jest.classes.ts
src/bun.js/webcore/encoding.classes.ts
src/bun.js/webcore/response.classes.ts

View File

@@ -0,0 +1,771 @@
src/allocators.zig
src/allocators/AllocationScope.zig
src/allocators/linux_memfd_allocator.zig
src/allocators/max_heap_allocator.zig
src/allocators/memory_allocator.zig
src/allocators/MemoryReportingAllocator.zig
src/allocators/mimalloc_arena.zig
src/allocators/mimalloc.zig
src/allocators/NullableAllocator.zig
src/analytics/analytics_schema.zig
src/analytics/analytics_thread.zig
src/api/schema.zig
src/ast/Ast.zig
src/ast/ASTMemoryAllocator.zig
src/ast/B.zig
src/ast/base.zig
src/ast/Binding.zig
src/ast/BundledAst.zig
src/ast/CharFreq.zig
src/ast/E.zig
src/ast/Expr.zig
src/ast/G.zig
src/ast/Macro.zig
src/ast/NewStore.zig
src/ast/Op.zig
src/ast/S.zig
src/ast/Scope.zig
src/ast/ServerComponentBoundary.zig
src/ast/Stmt.zig
src/ast/Symbol.zig
src/ast/TS.zig
src/ast/UseDirective.zig
src/async/posix_event_loop.zig
src/async/stub_event_loop.zig
src/async/windows_event_loop.zig
src/baby_list.zig
src/bake/bake.zig
src/bake/DevServer.zig
src/bake/FrameworkRouter.zig
src/bake/production.zig
src/base64/base64.zig
src/bit_set.zig
src/bits.zig
src/boringssl.zig
src/brotli.zig
src/btjs.zig
src/bun_js.zig
src/bun.js/api.zig
src/bun.js/api/bun/dns_resolver.zig
src/bun.js/api/bun/h2_frame_parser.zig
src/bun.js/api/bun/lshpack.zig
src/bun.js/api/bun/process.zig
src/bun.js/api/bun/socket.zig
src/bun.js/api/bun/socket/Handlers.zig
src/bun.js/api/bun/socket/Listener.zig
src/bun.js/api/bun/socket/SocketAddress.zig
src/bun.js/api/bun/socket/tls_socket_functions.zig
src/bun.js/api/bun/socket/WindowsNamedPipeContext.zig
src/bun.js/api/bun/spawn.zig
src/bun.js/api/bun/spawn/stdio.zig
src/bun.js/api/bun/ssl_wrapper.zig
src/bun.js/api/bun/subprocess.zig
src/bun.js/api/bun/udp_socket.zig
src/bun.js/api/bun/x509.zig
src/bun.js/api/BunObject.zig
src/bun.js/api/crypto.zig
src/bun.js/api/crypto/CryptoHasher.zig
src/bun.js/api/crypto/EVP.zig
src/bun.js/api/crypto/HMAC.zig
src/bun.js/api/crypto/PasswordObject.zig
src/bun.js/api/crypto/PBKDF2.zig
src/bun.js/api/ffi.zig
src/bun.js/api/FFIObject.zig
src/bun.js/api/filesystem_router.zig
src/bun.js/api/glob.zig
src/bun.js/api/HashObject.zig
src/bun.js/api/html_rewriter.zig
src/bun.js/api/JSBundler.zig
src/bun.js/api/JSTranspiler.zig
src/bun.js/api/server.zig
src/bun.js/api/server/AnyRequestContext.zig
src/bun.js/api/server/FileRoute.zig
src/bun.js/api/server/HTMLBundle.zig
src/bun.js/api/server/HTTPStatusText.zig
src/bun.js/api/server/InspectorBunFrontendDevServerAgent.zig
src/bun.js/api/server/NodeHTTPResponse.zig
src/bun.js/api/server/RequestContext.zig
src/bun.js/api/server/ServerConfig.zig
src/bun.js/api/server/ServerWebSocket.zig
src/bun.js/api/server/SSLConfig.zig
src/bun.js/api/server/StaticRoute.zig
src/bun.js/api/server/WebSocketServerContext.zig
src/bun.js/api/streams.classes.zig
src/bun.js/api/Timer.zig
src/bun.js/api/Timer/EventLoopTimer.zig
src/bun.js/api/Timer/ImmediateObject.zig
src/bun.js/api/Timer/TimeoutObject.zig
src/bun.js/api/Timer/TimerObjectInternals.zig
src/bun.js/api/TOMLObject.zig
src/bun.js/api/UnsafeObject.zig
src/bun.js/bindgen_test.zig
src/bun.js/bindings/AbortSignal.zig
src/bun.js/bindings/AnyPromise.zig
src/bun.js/bindings/bun-simdutf.zig
src/bun.js/bindings/CachedBytecode.zig
src/bun.js/bindings/CallFrame.zig
src/bun.js/bindings/CatchScope.zig
src/bun.js/bindings/codegen.zig
src/bun.js/bindings/CommonAbortReason.zig
src/bun.js/bindings/CommonStrings.zig
src/bun.js/bindings/CPUFeatures.zig
src/bun.js/bindings/CustomGetterSetter.zig
src/bun.js/bindings/DeferredError.zig
src/bun.js/bindings/DOMFormData.zig
src/bun.js/bindings/DOMURL.zig
src/bun.js/bindings/EncodedJSValue.zig
src/bun.js/bindings/Errorable.zig
src/bun.js/bindings/ErrorCode.zig
src/bun.js/bindings/EventType.zig
src/bun.js/bindings/Exception.zig
src/bun.js/bindings/FetchHeaders.zig
src/bun.js/bindings/FFI.zig
src/bun.js/bindings/generated_classes_list.zig
src/bun.js/bindings/GetterSetter.zig
src/bun.js/bindings/HTTPServerAgent.zig
src/bun.js/bindings/JSArray.zig
src/bun.js/bindings/JSArrayIterator.zig
src/bun.js/bindings/JSBigInt.zig
src/bun.js/bindings/JSCell.zig
src/bun.js/bindings/JSErrorCode.zig
src/bun.js/bindings/JSFunction.zig
src/bun.js/bindings/JSGlobalObject.zig
src/bun.js/bindings/JSInternalPromise.zig
src/bun.js/bindings/JSMap.zig
src/bun.js/bindings/JSModuleLoader.zig
src/bun.js/bindings/JSObject.zig
src/bun.js/bindings/JSPromise.zig
src/bun.js/bindings/JSPromiseRejectionOperation.zig
src/bun.js/bindings/JSPropertyIterator.zig
src/bun.js/bindings/JSRef.zig
src/bun.js/bindings/JSRuntimeType.zig
src/bun.js/bindings/JSString.zig
src/bun.js/bindings/JSType.zig
src/bun.js/bindings/JSUint8Array.zig
src/bun.js/bindings/JSValue.zig
src/bun.js/bindings/NodeModuleModule.zig
src/bun.js/bindings/RegularExpression.zig
src/bun.js/bindings/ResolvedSource.zig
src/bun.js/bindings/ScriptExecutionStatus.zig
src/bun.js/bindings/sizes.zig
src/bun.js/bindings/SourceProvider.zig
src/bun.js/bindings/SourceType.zig
src/bun.js/bindings/static_export.zig
src/bun.js/bindings/SystemError.zig
src/bun.js/bindings/URL.zig
src/bun.js/bindings/URLSearchParams.zig
src/bun.js/bindings/VM.zig
src/bun.js/bindings/WTF.zig
src/bun.js/bindings/ZigErrorType.zig
src/bun.js/bindings/ZigException.zig
src/bun.js/bindings/ZigStackFrame.zig
src/bun.js/bindings/ZigStackFrameCode.zig
src/bun.js/bindings/ZigStackFramePosition.zig
src/bun.js/bindings/ZigStackTrace.zig
src/bun.js/bindings/ZigString.zig
src/bun.js/BuildMessage.zig
src/bun.js/config.zig
src/bun.js/ConsoleObject.zig
src/bun.js/Counters.zig
src/bun.js/Debugger.zig
src/bun.js/event_loop.zig
src/bun.js/event_loop/AnyEventLoop.zig
src/bun.js/event_loop/AnyTask.zig
src/bun.js/event_loop/AnyTaskWithExtraContext.zig
src/bun.js/event_loop/ConcurrentPromiseTask.zig
src/bun.js/event_loop/ConcurrentTask.zig
src/bun.js/event_loop/CppTask.zig
src/bun.js/event_loop/DeferredTaskQueue.zig
src/bun.js/event_loop/EventLoopHandle.zig
src/bun.js/event_loop/GarbageCollectionController.zig
src/bun.js/event_loop/JSCScheduler.zig
src/bun.js/event_loop/ManagedTask.zig
src/bun.js/event_loop/MiniEventLoop.zig
src/bun.js/event_loop/PosixSignalHandle.zig
src/bun.js/event_loop/Task.zig
src/bun.js/event_loop/WorkTask.zig
src/bun.js/hot_reloader.zig
src/bun.js/ipc.zig
src/bun.js/javascript_core_c_api.zig
src/bun.js/jsc.zig
src/bun.js/jsc/array_buffer.zig
src/bun.js/jsc/dom_call.zig
src/bun.js/jsc/host_fn.zig
src/bun.js/jsc/RefString.zig
src/bun.js/ModuleLoader.zig
src/bun.js/node.zig
src/bun.js/node/assert/myers_diff.zig
src/bun.js/node/buffer.zig
src/bun.js/node/dir_iterator.zig
src/bun.js/node/fs_events.zig
src/bun.js/node/net/BlockList.zig
src/bun.js/node/node_assert_binding.zig
src/bun.js/node/node_assert.zig
src/bun.js/node/node_cluster_binding.zig
src/bun.js/node/node_crypto_binding.zig
src/bun.js/node/node_error_binding.zig
src/bun.js/node/node_fs_binding.zig
src/bun.js/node/node_fs_constant.zig
src/bun.js/node/node_fs_stat_watcher.zig
src/bun.js/node/node_fs_watcher.zig
src/bun.js/node/node_fs.zig
src/bun.js/node/node_http_binding.zig
src/bun.js/node/node_net_binding.zig
src/bun.js/node/node_os.zig
src/bun.js/node/node_process.zig
src/bun.js/node/node_util_binding.zig
src/bun.js/node/node_zlib_binding.zig
src/bun.js/node/nodejs_error_code.zig
src/bun.js/node/os/constants.zig
src/bun.js/node/path_watcher.zig
src/bun.js/node/path.zig
src/bun.js/node/Stat.zig
src/bun.js/node/StatFS.zig
src/bun.js/node/time_like.zig
src/bun.js/node/types.zig
src/bun.js/node/util/parse_args_utils.zig
src/bun.js/node/util/parse_args.zig
src/bun.js/node/util/validators.zig
src/bun.js/node/win_watcher.zig
src/bun.js/node/zlib/NativeBrotli.zig
src/bun.js/node/zlib/NativeZlib.zig
src/bun.js/node/zlib/NativeZstd.zig
src/bun.js/ProcessAutoKiller.zig
src/bun.js/rare_data.zig
src/bun.js/ResolveMessage.zig
src/bun.js/RuntimeTranspilerCache.zig
src/bun.js/SavedSourceMap.zig
src/bun.js/Strong.zig
src/bun.js/test/diff_format.zig
src/bun.js/test/expect.zig
src/bun.js/test/jest.zig
src/bun.js/test/pretty_format.zig
src/bun.js/test/snapshot.zig
src/bun.js/test/test.zig
src/bun.js/unbounded_queue.zig
src/bun.js/uuid.zig
src/bun.js/virtual_machine_exports.zig
src/bun.js/VirtualMachine.zig
src/bun.js/Weak.zig
src/bun.js/web_worker.zig
src/bun.js/webcore.zig
src/bun.js/webcore/ArrayBufferSink.zig
src/bun.js/webcore/AutoFlusher.zig
src/bun.js/webcore/Blob.zig
src/bun.js/webcore/blob/copy_file.zig
src/bun.js/webcore/blob/read_file.zig
src/bun.js/webcore/blob/Store.zig
src/bun.js/webcore/blob/write_file.zig
src/bun.js/webcore/Body.zig
src/bun.js/webcore/ByteBlobLoader.zig
src/bun.js/webcore/ByteStream.zig
src/bun.js/webcore/CookieMap.zig
src/bun.js/webcore/Crypto.zig
src/bun.js/webcore/encoding.zig
src/bun.js/webcore/EncodingLabel.zig
src/bun.js/webcore/fetch.zig
src/bun.js/webcore/FileReader.zig
src/bun.js/webcore/FileSink.zig
src/bun.js/webcore/ObjectURLRegistry.zig
src/bun.js/webcore/prompt.zig
src/bun.js/webcore/ReadableStream.zig
src/bun.js/webcore/Request.zig
src/bun.js/webcore/Response.zig
src/bun.js/webcore/S3Client.zig
src/bun.js/webcore/S3File.zig
src/bun.js/webcore/S3Stat.zig
src/bun.js/webcore/ScriptExecutionContext.zig
src/bun.js/webcore/Sink.zig
src/bun.js/webcore/streams.zig
src/bun.js/webcore/TextDecoder.zig
src/bun.js/webcore/TextEncoder.zig
src/bun.js/webcore/TextEncoderStreamEncoder.zig
src/bun.js/WTFTimer.zig
src/bun.zig
src/bundler/AstBuilder.zig
src/bundler/bundle_v2.zig
src/bundler/BundleThread.zig
src/bundler/Chunk.zig
src/bundler/DeferredBatchTask.zig
src/bundler/entry_points.zig
src/bundler/Graph.zig
src/bundler/HTMLImportManifest.zig
src/bundler/linker_context/computeChunks.zig
src/bundler/linker_context/computeCrossChunkDependencies.zig
src/bundler/linker_context/convertStmtsForChunk.zig
src/bundler/linker_context/convertStmtsForChunkForDevServer.zig
src/bundler/linker_context/doStep5.zig
src/bundler/linker_context/findAllImportedPartsInJSOrder.zig
src/bundler/linker_context/findImportedCSSFilesInJSOrder.zig
src/bundler/linker_context/findImportedFilesInCSSOrder.zig
src/bundler/linker_context/generateChunksInParallel.zig
src/bundler/linker_context/generateCodeForFileInChunkJS.zig
src/bundler/linker_context/generateCodeForLazyExport.zig
src/bundler/linker_context/generateCompileResultForCssChunk.zig
src/bundler/linker_context/generateCompileResultForHtmlChunk.zig
src/bundler/linker_context/generateCompileResultForJSChunk.zig
src/bundler/linker_context/postProcessCSSChunk.zig
src/bundler/linker_context/postProcessHTMLChunk.zig
src/bundler/linker_context/postProcessJSChunk.zig
src/bundler/linker_context/prepareCssAstsForChunk.zig
src/bundler/linker_context/renameSymbolsInChunk.zig
src/bundler/linker_context/scanImportsAndExports.zig
src/bundler/linker_context/writeOutputFilesToDisk.zig
src/bundler/LinkerContext.zig
src/bundler/LinkerGraph.zig
src/bundler/ParseTask.zig
src/bundler/ServerComponentParseTask.zig
src/bundler/ThreadPool.zig
src/bunfig.zig
src/cache.zig
src/ci_info.zig
src/cli.zig
src/cli/add_command.zig
src/cli/add_completions.zig
src/cli/Arguments.zig
src/cli/audit_command.zig
src/cli/build_command.zig
src/cli/bunx_command.zig
src/cli/colon_list_type.zig
src/cli/create_command.zig
src/cli/discord_command.zig
src/cli/exec_command.zig
src/cli/filter_arg.zig
src/cli/filter_run.zig
src/cli/init_command.zig
src/cli/install_command.zig
src/cli/install_completions_command.zig
src/cli/link_command.zig
src/cli/list-of-yarn-commands.zig
src/cli/outdated_command.zig
src/cli/pack_command.zig
src/cli/package_manager_command.zig
src/cli/patch_command.zig
src/cli/patch_commit_command.zig
src/cli/pm_trusted_command.zig
src/cli/pm_view_command.zig
src/cli/publish_command.zig
src/cli/remove_command.zig
src/cli/run_command.zig
src/cli/shell_completions.zig
src/cli/test_command.zig
src/cli/test/Scanner.zig
src/cli/unlink_command.zig
src/cli/update_command.zig
src/cli/upgrade_command.zig
src/codegen/process_windows_translate_c.zig
src/compile_target.zig
src/comptime_string_map.zig
src/copy_file.zig
src/crash_handler.zig
src/create/SourceFileProjectGenerator.zig
src/csrf.zig
src/css_scanner.zig
src/css/compat.zig
src/css/context.zig
src/css/css_internals.zig
src/css/css_modules.zig
src/css/css_parser.zig
src/css/declaration.zig
src/css/dependencies.zig
src/css/error.zig
src/css/generics.zig
src/css/logical.zig
src/css/media_query.zig
src/css/prefixes.zig
src/css/printer.zig
src/css/properties/align.zig
src/css/properties/animation.zig
src/css/properties/background.zig
src/css/properties/border_image.zig
src/css/properties/border_radius.zig
src/css/properties/border.zig
src/css/properties/box_shadow.zig
src/css/properties/contain.zig
src/css/properties/css_modules.zig
src/css/properties/custom.zig
src/css/properties/display.zig
src/css/properties/effects.zig
src/css/properties/flex.zig
src/css/properties/font.zig
src/css/properties/grid.zig
src/css/properties/list.zig
src/css/properties/margin_padding.zig
src/css/properties/masking.zig
src/css/properties/outline.zig
src/css/properties/overflow.zig
src/css/properties/position.zig
src/css/properties/prefix_handler.zig
src/css/properties/properties_generated.zig
src/css/properties/properties_impl.zig
src/css/properties/properties.zig
src/css/properties/shape.zig
src/css/properties/size.zig
src/css/properties/svg.zig
src/css/properties/text.zig
src/css/properties/transform.zig
src/css/properties/transition.zig
src/css/properties/ui.zig
src/css/rules/container.zig
src/css/rules/counter_style.zig
src/css/rules/custom_media.zig
src/css/rules/document.zig
src/css/rules/font_face.zig
src/css/rules/font_palette_values.zig
src/css/rules/import.zig
src/css/rules/keyframes.zig
src/css/rules/layer.zig
src/css/rules/media.zig
src/css/rules/namespace.zig
src/css/rules/nesting.zig
src/css/rules/page.zig
src/css/rules/property.zig
src/css/rules/rules.zig
src/css/rules/scope.zig
src/css/rules/starting_style.zig
src/css/rules/style.zig
src/css/rules/supports.zig
src/css/rules/tailwind.zig
src/css/rules/unknown.zig
src/css/rules/viewport.zig
src/css/selectors/builder.zig
src/css/selectors/parser.zig
src/css/selectors/selector.zig
src/css/small_list.zig
src/css/sourcemap.zig
src/css/targets.zig
src/css/values/alpha.zig
src/css/values/angle.zig
src/css/values/calc.zig
src/css/values/color_generated.zig
src/css/values/color_js.zig
src/css/values/color.zig
src/css/values/css_string.zig
src/css/values/easing.zig
src/css/values/gradient.zig
src/css/values/ident.zig
src/css/values/image.zig
src/css/values/length.zig
src/css/values/number.zig
src/css/values/percentage.zig
src/css/values/position.zig
src/css/values/ratio.zig
src/css/values/rect.zig
src/css/values/resolution.zig
src/css/values/size.zig
src/css/values/syntax.zig
src/css/values/time.zig
src/css/values/url.zig
src/css/values/values.zig
src/darwin.zig
src/defines-table.zig
src/defines.zig
src/deps/boringssl.translated.zig
src/deps/brotli_c.zig
src/deps/c_ares.zig
src/deps/diffz/DiffMatchPatch.zig
src/deps/libdeflate.zig
src/deps/libuv.zig
src/deps/lol-html.zig
src/deps/picohttp.zig
src/deps/picohttpparser.zig
src/deps/tcc.zig
src/deps/uws.zig
src/deps/uws/App.zig
src/deps/uws/BodyReaderMixin.zig
src/deps/uws/ConnectingSocket.zig
src/deps/uws/InternalLoopData.zig
src/deps/uws/ListenSocket.zig
src/deps/uws/Loop.zig
src/deps/uws/Request.zig
src/deps/uws/Response.zig
src/deps/uws/socket.zig
src/deps/uws/SocketContext.zig
src/deps/uws/Timer.zig
src/deps/uws/udp.zig
src/deps/uws/UpgradedDuplex.zig
src/deps/uws/us_socket_t.zig
src/deps/uws/WebSocket.zig
src/deps/uws/WindowsNamedPipe.zig
src/deps/zig-clap/clap.zig
src/deps/zig-clap/clap/args.zig
src/deps/zig-clap/clap/comptime.zig
src/deps/zig-clap/clap/streaming.zig
src/deps/zlib.posix.zig
src/deps/zlib.shared.zig
src/deps/zlib.win32.zig
src/deps/zstd.zig
src/dir.zig
src/dns.zig
src/env_loader.zig
src/env.zig
src/errno/darwin_errno.zig
src/errno/linux_errno.zig
src/errno/windows_errno.zig
src/exact_size_matcher.zig
src/fd.zig
src/feature_flags.zig
src/fmt.zig
src/fs.zig
src/fs/stat_hash.zig
src/futex.zig
src/generated_perf_trace_events.zig
src/generated_versions_list.zig
src/glob.zig
src/glob/GlobWalker.zig
src/glob/match.zig
src/Global.zig
src/grapheme.zig
src/heap_breakdown.zig
src/highway.zig
src/hive_array.zig
src/hmac.zig
src/HTMLScanner.zig
src/http.zig
src/http/header_builder.zig
src/http/method.zig
src/http/mime_type.zig
src/http/url_path.zig
src/http/websocket_client.zig
src/http/websocket_client/CppWebSocket.zig
src/http/websocket_client/WebSocketDeflate.zig
src/http/websocket_client/WebSocketUpgradeClient.zig
src/http/websocket_http_client.zig
src/http/websocket.zig
src/http/zlib.zig
src/identity_context.zig
src/import_record.zig
src/ini.zig
src/install/bin.zig
src/install/dependency.zig
src/install/ExternalSlice.zig
src/install/extract_tarball.zig
src/install/hoisted_install.zig
src/install/install_binding.zig
src/install/install.zig
src/install/integrity.zig
src/install/lifecycle_script_runner.zig
src/install/lockfile.zig
src/install/lockfile/Buffers.zig
src/install/lockfile/bun.lock.zig
src/install/lockfile/bun.lockb.zig
src/install/lockfile/CatalogMap.zig
src/install/lockfile/lockfile_json_stringify_for_debugging.zig
src/install/lockfile/OverrideMap.zig
src/install/lockfile/Package.zig
src/install/lockfile/Package/Meta.zig
src/install/lockfile/Package/Scripts.zig
src/install/lockfile/Package/WorkspaceMap.zig
src/install/lockfile/printer/tree_printer.zig
src/install/lockfile/printer/Yarn.zig
src/install/lockfile/Tree.zig
src/install/migration.zig
src/install/NetworkTask.zig
src/install/npm.zig
src/install/PackageInstall.zig
src/install/PackageInstaller.zig
src/install/PackageManager.zig
src/install/PackageManager/CommandLineArguments.zig
src/install/PackageManager/install_with_manager.zig
src/install/PackageManager/PackageJSONEditor.zig
src/install/PackageManager/PackageManagerDirectories.zig
src/install/PackageManager/PackageManagerEnqueue.zig
src/install/PackageManager/PackageManagerLifecycle.zig
src/install/PackageManager/PackageManagerOptions.zig
src/install/PackageManager/PackageManagerResolution.zig
src/install/PackageManager/patchPackage.zig
src/install/PackageManager/processDependencyList.zig
src/install/PackageManager/ProgressStrings.zig
src/install/PackageManager/runTasks.zig
src/install/PackageManager/updatePackageJSONAndInstall.zig
src/install/PackageManager/UpdateRequest.zig
src/install/PackageManager/WorkspacePackageJSONCache.zig
src/install/PackageManagerTask.zig
src/install/PackageManifestMap.zig
src/install/padding_checker.zig
src/install/patch_install.zig
src/install/repository.zig
src/install/resolution.zig
src/install/resolvers/folder_resolver.zig
src/install/versioned_url.zig
src/install/windows-shim/BinLinkingShim.zig
src/install/windows-shim/bun_shim_impl.zig
src/io/heap.zig
src/io/io.zig
src/io/MaxBuf.zig
src/io/openForWriting.zig
src/io/PipeReader.zig
src/io/pipes.zig
src/io/PipeWriter.zig
src/io/source.zig
src/js_ast.zig
src/js_lexer_tables.zig
src/js_lexer.zig
src/js_lexer/identifier.zig
src/js_parser.zig
src/js_printer.zig
src/jsc_stub.zig
src/json_parser.zig
src/libarchive/libarchive-bindings.zig
src/libarchive/libarchive.zig
src/linear_fifo.zig
src/linker.zig
src/linux.zig
src/logger.zig
src/macho.zig
src/main_test.zig
src/main_wasm.zig
src/main.zig
src/meta.zig
src/multi_array_list.zig
src/Mutex.zig
src/napi/napi.zig
src/node_fallbacks.zig
src/open.zig
src/options.zig
src/output.zig
src/OutputFile.zig
src/patch.zig
src/perf.zig
src/pool.zig
src/Progress.zig
src/ptr.zig
src/ptr/Cow.zig
src/ptr/CowSlice.zig
src/ptr/ref_count.zig
src/ptr/tagged_pointer.zig
src/ptr/weak_ptr.zig
src/renamer.zig
src/resolver/data_url.zig
src/resolver/dir_info.zig
src/resolver/package_json.zig
src/resolver/resolve_path.zig
src/resolver/resolver.zig
src/resolver/tsconfig_json.zig
src/result.zig
src/router.zig
src/runtime.zig
src/s3/acl.zig
src/s3/client.zig
src/s3/credentials.zig
src/s3/download_stream.zig
src/s3/error.zig
src/s3/list_objects.zig
src/s3/multipart_options.zig
src/s3/multipart.zig
src/s3/simple_request.zig
src/s3/storage_class.zig
src/semver.zig
src/semver/ExternalString.zig
src/semver/SemverObject.zig
src/semver/SemverQuery.zig
src/semver/SemverRange.zig
src/semver/SemverString.zig
src/semver/SlicedString.zig
src/semver/Version.zig
src/sha.zig
src/shell/AllocScope.zig
src/shell/braces.zig
src/shell/Builtin.zig
src/shell/builtin/basename.zig
src/shell/builtin/cat.zig
src/shell/builtin/cd.zig
src/shell/builtin/cp.zig
src/shell/builtin/dirname.zig
src/shell/builtin/echo.zig
src/shell/builtin/exit.zig
src/shell/builtin/export.zig
src/shell/builtin/false.zig
src/shell/builtin/ls.zig
src/shell/builtin/mkdir.zig
src/shell/builtin/mv.zig
src/shell/builtin/pwd.zig
src/shell/builtin/rm.zig
src/shell/builtin/seq.zig
src/shell/builtin/touch.zig
src/shell/builtin/true.zig
src/shell/builtin/which.zig
src/shell/builtin/yes.zig
src/shell/EnvMap.zig
src/shell/EnvStr.zig
src/shell/interpreter.zig
src/shell/IO.zig
src/shell/IOReader.zig
src/shell/IOWriter.zig
src/shell/ParsedShellScript.zig
src/shell/RefCountedStr.zig
src/shell/shell.zig
src/shell/states/Assigns.zig
src/shell/states/Async.zig
src/shell/states/Base.zig
src/shell/states/Binary.zig
src/shell/states/Cmd.zig
src/shell/states/CondExpr.zig
src/shell/states/Expansion.zig
src/shell/states/If.zig
src/shell/states/Pipeline.zig
src/shell/states/Script.zig
src/shell/states/Stmt.zig
src/shell/states/Subshell.zig
src/shell/subproc.zig
src/shell/util.zig
src/shell/Yield.zig
src/sourcemap/CodeCoverage.zig
src/sourcemap/LineOffsetTable.zig
src/sourcemap/sourcemap.zig
src/sourcemap/VLQ.zig
src/sql/DataCell.zig
src/sql/postgres.zig
src/sql/postgres/postgres_protocol.zig
src/sql/postgres/postgres_types.zig
src/StandaloneModuleGraph.zig
src/StaticHashMap.zig
src/string_immutable.zig
src/string_types.zig
src/string.zig
src/string/escapeHTML.zig
src/string/HashedString.zig
src/string/MutableString.zig
src/string/paths.zig
src/string/PathString.zig
src/string/SmolStr.zig
src/string/StringBuilder.zig
src/string/StringJoiner.zig
src/string/unicode.zig
src/string/visible.zig
src/string/WTFStringImpl.zig
src/sync.zig
src/sys_uv.zig
src/sys.zig
src/system_timer.zig
src/test/fixtures.zig
src/test/recover.zig
src/thread_pool.zig
src/tmp.zig
src/toml/toml_lexer.zig
src/toml/toml_parser.zig
src/tracy.zig
src/trait.zig
src/transpiler.zig
src/unit_test.zig
src/url.zig
src/util.zig
src/valkey/index.zig
src/valkey/js_valkey_functions.zig
src/valkey/js_valkey.zig
src/valkey/valkey_protocol.zig
src/valkey/valkey.zig
src/valkey/ValkeyCommand.zig
src/valkey/ValkeyContext.zig
src/walker_skippable.zig
src/Watcher.zig
src/watcher/INotifyWatcher.zig
src/watcher/KEventWatcher.zig
src/watcher/WindowsWatcher.zig
src/which_npm_client.zig
src/which.zig
src/windows.zig
src/work_pool.zig
src/workaround_missing_symbols.zig
src/wyhash.zig
src/zlib.zig

View File

@@ -1,8 +1,9 @@
include(PathUtils)
if(DEBUG)
set(bun bun-debug)
# elseif(ENABLE_SMOL)
# set(bun bun-smol-profile)
# set(bunStrip bun-smol)
elseif(ENABLE_ASAN)
set(bun bun-asan)
elseif(ENABLE_VALGRIND)
set(bun bun-valgrind)
elseif(ENABLE_ASSERTIONS)
@@ -41,17 +42,34 @@ else()
set(CONFIGURE_DEPENDS "")
endif()
# --- Dependencies ---
set(BUN_DEPENDENCIES
BoringSSL
Brotli
Cares
Highway
LibDeflate
LolHtml
Lshpack
Mimalloc
TinyCC
Zlib
LibArchive # must be loaded after zlib
HdrHistogram # must be loaded after zlib
Zstd
)
include(CloneZstd)
# foreach(dependency ${BUN_DEPENDENCIES})
# include(Clone${dependency})
# endforeach()
# --- Codegen ---
set(BUN_ERROR_SOURCE ${CWD}/packages/bun-error)
file(GLOB BUN_ERROR_SOURCES ${CONFIGURE_DEPENDS}
${BUN_ERROR_SOURCE}/*.json
${BUN_ERROR_SOURCE}/*.ts
${BUN_ERROR_SOURCE}/*.tsx
${BUN_ERROR_SOURCE}/*.css
${BUN_ERROR_SOURCE}/img/*
)
absolute_sources(BUN_ERROR_SOURCES ${CWD}/cmake/sources/BunErrorSources.txt)
set(BUN_ERROR_OUTPUT ${CODEGEN_PATH}/bun-error)
set(BUN_ERROR_OUTPUTS
@@ -140,9 +158,7 @@ register_command(
set(BUN_NODE_FALLBACKS_SOURCE ${CWD}/src/node-fallbacks)
file(GLOB BUN_NODE_FALLBACKS_SOURCES ${CONFIGURE_DEPENDS}
${BUN_NODE_FALLBACKS_SOURCE}/*.js
)
absolute_sources(BUN_NODE_FALLBACKS_SOURCES ${CWD}/cmake/sources/NodeFallbacksSources.txt)
set(BUN_NODE_FALLBACKS_OUTPUT ${CODEGEN_PATH}/node-fallbacks)
set(BUN_NODE_FALLBACKS_OUTPUTS)
@@ -168,14 +184,9 @@ register_command(
CWD
${BUN_NODE_FALLBACKS_SOURCE}
COMMAND
${BUN_EXECUTABLE} x
esbuild ${ESBUILD_ARGS}
${BUN_EXECUTABLE} run build-fallbacks
${BUN_NODE_FALLBACKS_OUTPUT}
${BUN_NODE_FALLBACKS_SOURCES}
--outdir=${BUN_NODE_FALLBACKS_OUTPUT}
--format=esm
--minify
--bundle
--platform=browser
SOURCES
${BUN_NODE_FALLBACKS_SOURCES}
${BUN_NODE_FALLBACKS_NODE_MODULES}
@@ -242,13 +253,7 @@ register_command(
set(BUN_ZIG_GENERATED_CLASSES_SCRIPT ${CWD}/src/codegen/generate-classes.ts)
file(GLOB BUN_ZIG_GENERATED_CLASSES_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/bun.js/*.classes.ts
${CWD}/src/bun.js/api/*.classes.ts
${CWD}/src/bun.js/node/*.classes.ts
${CWD}/src/bun.js/test/*.classes.ts
${CWD}/src/bun.js/webcore/*.classes.ts
)
absolute_sources(BUN_ZIG_GENERATED_CLASSES_SOURCES ${CWD}/cmake/sources/ZigGeneratedClassesSources.txt)
set(BUN_ZIG_GENERATED_CLASSES_OUTPUTS
${CODEGEN_PATH}/ZigGeneratedClasses.h
@@ -281,14 +286,8 @@ register_command(
set(BUN_JAVASCRIPT_CODEGEN_SCRIPT ${CWD}/src/codegen/bundle-modules.ts)
file(GLOB_RECURSE BUN_JAVASCRIPT_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/js/*.js
${CWD}/src/js/*.ts
)
file(GLOB BUN_JAVASCRIPT_CODEGEN_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/codegen/*.ts
)
absolute_sources(BUN_JAVASCRIPT_SOURCES ${CWD}/cmake/sources/JavaScriptSources.txt)
absolute_sources(BUN_JAVASCRIPT_CODEGEN_SOURCES ${CWD}/cmake/sources/JavaScriptCodegenSources.txt)
list(APPEND BUN_JAVASCRIPT_CODEGEN_SOURCES
${CWD}/src/bun.js/bindings/InternalModuleRegistry.cpp
@@ -330,11 +329,7 @@ register_command(
set(BUN_BAKE_RUNTIME_CODEGEN_SCRIPT ${CWD}/src/codegen/bake-codegen.ts)
file(GLOB_RECURSE BUN_BAKE_RUNTIME_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/bake/*.ts
${CWD}/src/bake/*/*.ts
${CWD}/src/bake/*/*.css
)
absolute_sources(BUN_BAKE_RUNTIME_SOURCES ${CWD}/cmake/sources/BakeRuntimeSources.txt)
list(APPEND BUN_BAKE_RUNTIME_CODEGEN_SOURCES
${CWD}/src/bun.js/bindings/InternalModuleRegistry.cpp
@@ -367,9 +362,7 @@ register_command(
set(BUN_BINDGEN_SCRIPT ${CWD}/src/codegen/bindgen.ts)
file(GLOB_RECURSE BUN_BINDGEN_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/**/*.bind.ts
)
absolute_sources(BUN_BINDGEN_SOURCES ${CWD}/cmake/sources/BindgenSources.txt)
set(BUN_BINDGEN_CPP_OUTPUTS
${CODEGEN_PATH}/GeneratedBindings.cpp
@@ -438,6 +431,7 @@ set(BUN_OBJECT_LUT_SOURCES
${CWD}/src/bun.js/bindings/ProcessBindingConstants.cpp
${CWD}/src/bun.js/bindings/ProcessBindingFs.cpp
${CWD}/src/bun.js/bindings/ProcessBindingNatives.cpp
${CWD}/src/bun.js/bindings/ProcessBindingHTTPParser.cpp
${CWD}/src/bun.js/modules/NodeModuleModule.cpp
${CODEGEN_PATH}/ZigGeneratedClasses.lut.txt
)
@@ -451,6 +445,7 @@ set(BUN_OBJECT_LUT_OUTPUTS
${CODEGEN_PATH}/ProcessBindingConstants.lut.h
${CODEGEN_PATH}/ProcessBindingFs.lut.h
${CODEGEN_PATH}/ProcessBindingNatives.lut.h
${CODEGEN_PATH}/ProcessBindingHTTPParser.lut.h
${CODEGEN_PATH}/NodeModuleModule.lut.h
${CODEGEN_PATH}/ZigGeneratedClasses.lut.h
)
@@ -526,9 +521,7 @@ WEBKIT_ADD_SOURCE_DEPENDENCIES(
# --- Zig ---
file(GLOB_RECURSE BUN_ZIG_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/*.zig
)
absolute_sources(BUN_ZIG_SOURCES ${CWD}/cmake/sources/ZigSources.txt)
list(APPEND BUN_ZIG_SOURCES
${CWD}/build.zig
@@ -599,6 +592,7 @@ register_command(
-Doptimize=${ZIG_OPTIMIZE}
-Dcpu=${ZIG_CPU}
-Denable_logs=$<IF:$<BOOL:${ENABLE_LOGS}>,true,false>
-Denable_asan=$<IF:$<BOOL:${ENABLE_ASAN}>,true,false>
-Dversion=${VERSION}
-Dreported_nodejs_version=${NODEJS_VERSION}
-Dcanary=${CANARY_REVISION}
@@ -611,6 +605,7 @@ register_command(
${BUN_ZIG_OUTPUT}
TARGETS
clone-zig
clone-zstd
SOURCES
${BUN_ZIG_SOURCES}
${BUN_ZIG_GENERATED_SOURCES}
@@ -624,30 +619,8 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "build.zig")
set(BUN_USOCKETS_SOURCE ${CWD}/packages/bun-usockets)
# hand written cpp source files. Full list of "source" code (including codegen) is in BUN_CPP_SOURCES
file(GLOB BUN_CXX_SOURCES ${CONFIGURE_DEPENDS}
${CWD}/src/io/*.cpp
${CWD}/src/bun.js/modules/*.cpp
${CWD}/src/bun.js/bindings/*.cpp
${CWD}/src/bun.js/bindings/webcore/*.cpp
${CWD}/src/bun.js/bindings/sqlite/*.cpp
${CWD}/src/bun.js/bindings/webcrypto/*.cpp
${CWD}/src/bun.js/bindings/webcrypto/*/*.cpp
${CWD}/src/bun.js/bindings/node/crypto/*.cpp
${CWD}/src/bun.js/bindings/v8/*.cpp
${CWD}/src/bun.js/bindings/v8/shim/*.cpp
${CWD}/src/bake/*.cpp
${CWD}/src/deps/*.cpp
${BUN_USOCKETS_SOURCE}/src/crypto/*.cpp
)
file(GLOB BUN_C_SOURCES ${CONFIGURE_DEPENDS}
${BUN_USOCKETS_SOURCE}/src/*.c
${BUN_USOCKETS_SOURCE}/src/eventing/*.c
${BUN_USOCKETS_SOURCE}/src/internal/*.c
${BUN_USOCKETS_SOURCE}/src/crypto/*.c
${CWD}/src/bun.js/bindings/uv-posix-polyfills.c
${CWD}/src/bun.js/bindings/uv-posix-stubs.c
)
absolute_sources(BUN_CXX_SOURCES ${CWD}/cmake/sources/CxxSources.txt)
absolute_sources(BUN_C_SOURCES ${CWD}/cmake/sources/CSources.txt)
if(WIN32)
list(APPEND BUN_CXX_SOURCES ${CWD}/src/bun.js/bindings/windows/rescle.cpp)
@@ -700,20 +673,14 @@ if(WIN32)
else()
set(Bun_VERSION_WITH_TAG ${VERSION})
endif()
set(BUN_ICO_PATH ${CWD}/src/bun.ico)
configure_file(${CWD}/src/bun.ico ${CODEGEN_PATH}/bun.ico COPYONLY)
set(BUN_ICO_PATH ${CODEGEN_PATH}/bun.ico)
configure_file(
${CWD}/src/windows-app-info.rc
${CODEGEN_PATH}/windows-app-info.rc
@ONLY
)
add_custom_command(
OUTPUT ${CODEGEN_PATH}/windows-app-info.res
COMMAND rc.exe /fo ${CODEGEN_PATH}/windows-app-info.res ${CODEGEN_PATH}/windows-app-info.rc
DEPENDS ${CODEGEN_PATH}/windows-app-info.rc ${CODEGEN_PATH}/bun.ico
COMMENT "Adding Windows resource file ${CODEGEN_PATH}/windows-app-info.res with ico in ${CODEGEN_PATH}/bun.ico"
)
set(WINDOWS_RESOURCES ${CODEGEN_PATH}/windows-app-info.res)
set(WINDOWS_RESOURCES ${CODEGEN_PATH}/windows-app-info.rc)
endif()
# --- Executable ---
@@ -785,6 +752,7 @@ target_include_directories(${bun} PRIVATE
${CWD}/src/bun.js/bindings/webcore
${CWD}/src/bun.js/bindings/webcrypto
${CWD}/src/bun.js/bindings/node/crypto
${CWD}/src/bun.js/bindings/node/http
${CWD}/src/bun.js/bindings/sqlite
${CWD}/src/bun.js/bindings/v8
${CWD}/src/bun.js/modules
@@ -797,7 +765,7 @@ target_include_directories(${bun} PRIVATE
${NODEJS_HEADERS_PATH}/include
)
if(NOT WIN32)
if(NOT WIN32)
target_include_directories(${bun} PRIVATE ${CWD}/src/bun.js/bindings/libuv)
endif()
@@ -887,7 +855,7 @@ if(NOT WIN32)
)
endif()
if (ENABLE_ASAN)
if(ENABLE_ASAN)
target_compile_options(${bun} PUBLIC
-fsanitize=address
)
@@ -930,10 +898,22 @@ if(NOT WIN32)
-Wno-nullability-completeness
-Werror
)
if(ENABLE_ASAN)
target_compile_options(${bun} PUBLIC
-fsanitize=address
)
target_link_libraries(${bun} PUBLIC
-fsanitize=address
)
endif()
endif()
else()
target_compile_options(${bun} PUBLIC
-Wno-nullability-completeness
-Wno-inconsistent-dllimport
-Wno-incompatible-pointer-types
-Wno-deprecated-declarations
)
endif()
@@ -979,6 +959,7 @@ if(LINUX)
if(NOT ABI STREQUAL "musl")
target_link_options(${bun} PUBLIC
-Wl,--wrap=exp
-Wl,--wrap=exp2
-Wl,--wrap=expf
-Wl,--wrap=fcntl64
-Wl,--wrap=log
@@ -1013,6 +994,10 @@ if(LINUX)
-Wl,--compress-debug-sections=zlib
-Wl,-z,lazy
-Wl,-z,norelro
# enable string tail merging
-Wl,-O2
# make debug info faster to load
-Wl,--gdb-index
-Wl,-z,combreloc
-Wl,--no-eh-frame-hdr
-Wl,--sort-section=name
@@ -1054,6 +1039,7 @@ if(WIN32)
target_link_libraries(${bun} PRIVATE
${WEBKIT_LIB_PATH}/WTF.lib
${WEBKIT_LIB_PATH}/JavaScriptCore.lib
${WEBKIT_LIB_PATH}/bmalloc.lib
${WEBKIT_LIB_PATH}/sicudtd.lib
${WEBKIT_LIB_PATH}/sicuind.lib
${WEBKIT_LIB_PATH}/sicuucd.lib
@@ -1062,6 +1048,7 @@ if(WIN32)
target_link_libraries(${bun} PRIVATE
${WEBKIT_LIB_PATH}/WTF.lib
${WEBKIT_LIB_PATH}/JavaScriptCore.lib
${WEBKIT_LIB_PATH}/bmalloc.lib
${WEBKIT_LIB_PATH}/sicudt.lib
${WEBKIT_LIB_PATH}/sicuin.lib
${WEBKIT_LIB_PATH}/sicuuc.lib
@@ -1085,21 +1072,6 @@ endif()
# --- Dependencies ---
set(BUN_DEPENDENCIES
BoringSSL
Brotli
Cares
Highway
LibDeflate
LolHtml
Lshpack
Mimalloc
TinyCC
Zlib
LibArchive # must be loaded after zlib
Zstd
)
if(WIN32)
list(APPEND BUN_DEPENDENCIES Libuv)
endif()
@@ -1196,6 +1168,27 @@ if(NOT BUN_CPP_ONLY)
)
endif()
# somehow on some Linux systems we need to disable ASLR for ASAN-instrumented binaries to run
# when spawned by cmake (they run fine from a shell!)
# otherwise they crash with:
# ==856230==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
# ==856230==ASan shadow was supposed to be located in the [0x00007fff7000-0x10007fff7fff] range.
# ==856230==This might be related to ELF_ET_DYN_BASE change in Linux 4.12.
# ==856230==See https://github.com/google/sanitizers/issues/856 for possible workarounds.
# the linked issue refers to very old kernels but this still happens to us on modern ones.
# disabling ASLR to run the binary works around it
set(TEST_BUN_COMMAND_BASE ${BUILD_PATH}/${bunExe} --revision)
set(TEST_BUN_COMMAND_ENV_WRAP
${CMAKE_COMMAND} -E env BUN_DEBUG_QUIET_LOGS=1)
if (LINUX AND ENABLE_ASAN)
set(TEST_BUN_COMMAND
${TEST_BUN_COMMAND_ENV_WRAP} setarch ${CMAKE_HOST_SYSTEM_PROCESSOR} -R ${TEST_BUN_COMMAND_BASE}
|| ${TEST_BUN_COMMAND_ENV_WRAP} ${TEST_BUN_COMMAND_BASE})
else()
set(TEST_BUN_COMMAND
${TEST_BUN_COMMAND_ENV_WRAP} ${TEST_BUN_COMMAND_BASE})
endif()
register_command(
TARGET
${bun}
@@ -1204,10 +1197,7 @@ if(NOT BUN_CPP_ONLY)
COMMENT
"Testing ${bun}"
COMMAND
${CMAKE_COMMAND}
-E env BUN_DEBUG_QUIET_LOGS=1
${BUILD_PATH}/${bunExe}
--revision
${TEST_BUN_COMMAND}
CWD
${BUILD_PATH}
)
@@ -1267,7 +1257,12 @@ if(NOT BUN_CPP_ONLY)
if(ENABLE_BASELINE)
set(bunTriplet ${bunTriplet}-baseline)
endif()
string(REPLACE bun ${bunTriplet} bunPath ${bun})
if(ENABLE_ASAN)
set(bunTriplet ${bunTriplet}-asan)
set(bunPath ${bunTriplet})
else()
string(REPLACE bun ${bunTriplet} bunPath ${bun})
endif()
set(bunFiles ${bunExe} features.json)
if(WIN32)
list(APPEND bunFiles ${bun}.pdb)

View File

@@ -4,7 +4,7 @@ register_repository(
REPOSITORY
c-ares/c-ares
COMMIT
4f4912bce7374f787b10576851b687935f018e17
d3a507e920e7af18a5efb7f9f1d8044ed4750013
)
register_cmake_command(

View File

@@ -0,0 +1,24 @@
register_repository(
NAME
hdrhistogram
REPOSITORY
HdrHistogram/HdrHistogram_c
COMMIT
652d51bcc36744fd1a6debfeb1a8a5f58b14022c
)
register_cmake_command(
TARGET
hdrhistogram
LIBRARIES
hdr_histogram_static
INCLUDES
include
LIB_PATH
src
ARGS
-DHDR_HISTOGRAM_BUILD_SHARED=OFF
-DHDR_HISTOGRAM_BUILD_STATIC=ON
-DHDR_LOG_REQUIRED=DISABLED
-DHDR_HISTOGRAM_BUILD_PROGRAMS=OFF
)

Some files were not shown because too many files have changed in this diff Show More