Skip to content
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4c057a8
Remove libarchive from the build
claude Oct 23, 2026
a8188b0
Add bun_tar: a push-style tar reader in safe Rust
claude Oct 23, 2026
b4898ab
bun_tar: take permissions from the header, never from ACL records
claude Oct 23, 2026
cc129c5
bun_tar: gzip decoding and a decoder that stacks it under the tar reader
claude Oct 23, 2026
f655340
bun_tar: writer, gzip encoder and the name composition Windows applies
claude Oct 23, 2026
15966b0
Read and write archives with bun_tar
claude Oct 23, 2026
1e71af1
Add golden tests for archives and word errors as before
claude Oct 23, 2026
7055c1e
Fail before touching the disk, and address review findings
claude Oct 23, 2026
95ef816
Merge remote-tracking branch 'origin/main' into claude/keen-euler-5es1ut
claude Oct 23, 2026
f0d7495
Check that the streaming tarball test streams
claude Oct 23, 2026
83f0568
Drop two redundant slices in TarballStream
claude Oct 23, 2026
9f5907e
Remove WStr::from_ptr, which only the libarchive bindings used
claude Oct 23, 2026
36658a8
Make the golden tests portable and quicker, and deny panics in bun_tar
claude Oct 23, 2026
3a3fc41
Skip what the streaming extractor does not extract, and check the des…
claude Oct 23, 2026
f11866f
Stack gzip layers the way libarchive stacked its filters
claude Oct 24, 2026
e178b03
Simplify bun_tar and its callers
claude Oct 24, 2026
34d4960
Share more code inside bun_tar
claude Oct 24, 2026
557cdb1
Read tar headers faster
claude Oct 24, 2026
17c4dac
Name the fields of a tar header
claude Oct 24, 2026
59ef5b9
Name the remaining numbers in bun_tar
claude Oct 24, 2026
1d7ba48
Do not look past a gzip member that fills a block
claude Oct 24, 2026
af3166d
Let the files of an archive share its bytes
claude Oct 24, 2026
5f56386
Read a .tar.gz in blocks again for files()
claude Oct 24, 2026
fa64847
Give each File of an archive its own bytes again
claude Oct 24, 2026
03b983d
Test the tar reader and writer themselves
claude Oct 24, 2026
39ba347
Try the tar reader on damaged gzip, its limits and more names
claude Oct 24, 2026
9c15dd3
Try every pair of characters that Windows composes
claude Oct 24, 2026
1f01613
Try the tar reader on 19 more shapes
claude Oct 24, 2026
6534018
Start the tar that looks like gzip with the bytes of gzip
claude Oct 24, 2026
6285e51
Cut gzip inside its trailer, and compare every combining class
claude Oct 24, 2026
6ccc1f4
Look for a combining class in characters that have none
claude Oct 24, 2026
6c5b8a2
Merge remote-tracking branch 'origin/main' into claude/keen-euler-5es1ut
claude Oct 24, 2026
a233eea
Try the tar reader on what libarchive's own coverage says was missing
claude Oct 25, 2026
343aafc
Test that a piece of a download may end anywhere
claude Oct 25, 2026
8bd5bc1
Merge remote-tracking branch 'origin/main' into claude/keen-euler-5es1ut
claude Oct 27, 2026
3311d20
Leave UTF-8 to the standard library when composing a name
claude Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 0 additions & 106 deletions .github/workflows/update-libarchive.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ codegen-for-zig-team.tar.gz
/src/deps/boringssl
/src/deps/brotli
/src/deps/c*ares
/src/deps/libarchive
/src/deps/libdeflate
/src/deps/libuv
/src/deps/lol*html
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The Rust side is a Cargo workspace of ~200 crates rooted at `Cargo.toml`. The ke

#### Vendored Dependencies (`vendor/`)

Third-party native libraries are vendored locally and can be read from disk (not git submodules): boringssl (TLS/crypto), brotli, cares (async DNS), hdrhistogram, highway (SIMD), libarchive (tar/zip), libdeflate, libuv (Windows event loop), lolhtml (HTML rewriter), lshpack (HTTP/2 HPACK), lsqpack + lsquic (HTTP/3), mimalloc (allocator), nodejs (headers), picohttpparser, rust-argon2 (argon2 for `Bun.password`, Rust), tinycc (FFI JIT, fork: oven-sh/tinycc), WebKit (JavaScriptCore), zlib (zlib-ng), zstd. Build configuration for these is in `scripts/build/deps/*.ts`.
Third-party native libraries are vendored locally and can be read from disk (not git submodules): boringssl (TLS/crypto), brotli, cares (async DNS), hdrhistogram, highway (SIMD), libdeflate, libuv (Windows event loop), lolhtml (HTML rewriter), lshpack (HTTP/2 HPACK), lsqpack + lsquic (HTTP/3), mimalloc (allocator), nodejs (headers), picohttpparser, rust-argon2 (argon2 for `Bun.password`, Rust), tinycc (FFI JIT, fork: oven-sh/tinycc), WebKit (JavaScriptCore), zlib (zlib-ng), zstd. Build configuration for these is in `scripts/build/deps/*.ts`.

### JavaScript Class Implementation (C++)

Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,6 @@ $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
```

### libarchive

If you see an error on macOS when compiling `libarchive`, run:

```bash
$ brew install pkg-config
```

### macOS `library not found for -lSystem`

If you see this error when compiling, run:
Expand Down
50 changes: 30 additions & 20 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"src/collections",
"src/css",
"src/errno",
"src/glob",

Check warning on line 11 in Cargo.toml

View workflow job for this annotation

GitHub Actions / lol-html cargo test

explicit `package.readme` can be inferred
"src/http",
"src/install",
"src/install/windows-shim",
"src/parsers",
"src/io",
"src/libarchive",
"src/archive",
"src/md",
"src/paths",
"src/resolver",
Expand Down Expand Up @@ -44,6 +44,7 @@
"src/sourcemap",
"src/sql",
"src/sys",
"src/tar",
"src/threading",
"src/valkey",
"src/watcher",
Expand Down Expand Up @@ -382,7 +383,7 @@
bun_install = { path = "src/install" }
bun_parsers = { path = "src/parsers" }
bun_io = { path = "src/io" }
bun_libarchive = { path = "src/libarchive" }
bun_archive = { path = "src/archive" }
bun_md = { path = "src/md" }
bun_paths = { path = "src/paths" }
bun_resolver = { path = "src/resolver" }
Expand Down Expand Up @@ -411,6 +412,7 @@
bun_sourcemap = { path = "src/sourcemap" }
bun_sql = { path = "src/sql" }
bun_sys = { path = "src/sys" }
bun_tar = { path = "src/tar" }
bun_threading = { path = "src/threading" }
bun_valkey = { path = "src/valkey" }
bun_watcher = { path = "src/watcher" }
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Bun statically links these libraries:
|---------|---------|
| [`boringssl`](https://boringssl.googlesource.com/boringssl/) | [several licenses](https://boringssl.googlesource.com/boringssl/+/refs/heads/master/LICENSE) |
| [`brotli`](https://github.com/google/brotli) | MIT |
| [`libarchive`](https://github.com/libarchive/libarchive) | [several licenses](https://github.com/libarchive/libarchive/blob/master/COPYING) |
| [`libarchive`](https://github.com/libarchive/libarchive) (not linked: `src/tar` is derived from parts of it) | [several licenses](https://github.com/libarchive/libarchive/blob/master/COPYING) |
| [`lol-html`](https://github.com/cloudflare/lol-html/tree/master/c-api) | BSD 3-Clause |
| [`ls-hpack`](https://github.com/litespeedtech/ls-hpack) | MIT |
| [`ls-qpack`](https://github.com/litespeedtech/ls-qpack) | MIT |
Expand Down
8 changes: 0 additions & 8 deletions docs/project/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,6 @@ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
```

### libarchive

If you see an error on macOS when compiling `libarchive`, run:

```bash
brew install pkg-config
```

### macOS `library not found for -lSystem`

If you see this error when compiling, run:
Expand Down
2 changes: 1 addition & 1 deletion docs/project/license.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Bun statically links these libraries:
| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- |
| [`boringssl`](https://boringssl.googlesource.com/boringssl/) | [several licenses](https://boringssl.googlesource.com/boringssl/+/refs/heads/master/LICENSE) |
| [`brotli`](https://github.com/google/brotli) | MIT |
| [`libarchive`](https://github.com/libarchive/libarchive) | [several licenses](https://github.com/libarchive/libarchive/blob/master/COPYING) |
| [`libarchive`](https://github.com/libarchive/libarchive) (not linked: `src/tar` is derived from parts of it) | [several licenses](https://github.com/libarchive/libarchive/blob/master/COPYING) |
| [`lol-html`](https://github.com/cloudflare/lol-html/tree/master/c-api) | BSD 3-Clause |
| [`ls-hpack`](https://github.com/litespeedtech/ls-hpack) | MIT (bundled xxhash is BSD 2-Clause) |
| [`ls-qpack`](https://github.com/litespeedtech/ls-qpack) | MIT |
Expand Down
Loading
Loading