Skip to content

Commit 14d6fac

Browse files
committed
WIP: Turbopack: Use bincode to store the contents of value cells
1 parent f46bb43 commit 14d6fac

File tree

32 files changed

+1013
-630
lines changed

32 files changed

+1013
-630
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ rustflags = [
7373
linker = "arm-linux-gnueabihf-gcc"
7474

7575
[target.wasm32-unknown-unknown]
76-
rustflags = ["-Zshare-generics=y", "--cfg", 'getrandom_backend="wasm_js"']
76+
rustflags = ["-Zshare-generics=y", "--cfg", 'getrandom_backend="wasm_js"']

Cargo.lock

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ preset_env_base = "6.0.0"
360360

361361

362362
# General Deps
363-
bincode = { version = "2.0.1", features = ["serde"] }
364363
chromiumoxide = { version = "0.5.4", features = [
365364
"tokio-runtime",
366365
], default-features = false }
@@ -378,6 +377,7 @@ async-compression = { version = "0.3.13", default-features = false, features = [
378377
"tokio",
379378
] }
380379
async-trait = "0.1.64"
380+
bincode = { version = "2.0.1", features = ["serde"] }
381381
bitfield = "0.18.0"
382382
byteorder = "1.5.0"
383383
bytes = "1.1.0"
@@ -397,12 +397,13 @@ either = "1.9.0"
397397
erased-serde = "0.4.5"
398398
flate2 = "1.0.28"
399399
futures = "0.3.31"
400-
futures-util = "0.3.31"
401400
futures-retry = "0.6.0"
401+
futures-util = "0.3.31"
402402
hashbrown = "0.14.5"
403403
image = { version = "0.25.8", default-features = false }
404404
indexmap = "2.7.1"
405405
indoc = "2.0.0"
406+
inventory = "0.3.21"
406407
itertools = "0.10.5"
407408
lightningcss = { version = "1.0.0-alpha.68", features = [
408409
"serde",
@@ -447,11 +448,10 @@ ringmap = "0.1.3"
447448
roaring = "0.10.10"
448449
rstest = "0.16.0"
449450
rustc-hash = "2.1.1"
450-
twox-hash = { version = "2.1.0", features = ["xxhash64", "xxhash3_128"] }
451451
semver = "1.0.16"
452452
serde = { version = "1.0.217", features = ["derive"] }
453-
serde_json = "1.0.138"
454453
serde_bytes = "0.11.15"
454+
serde_json = "1.0.138"
455455
serde_path_to_error = "0.1.16"
456456
serde_qs = "0.13.0"
457457
serde_with = "3.12.0"
@@ -462,26 +462,27 @@ smallvec = { version = "1.15.1", features = [
462462
"const_new",
463463
"impl_bincode",
464464
] }
465-
swc_sourcemap = "9.3.4"
466-
strsim = "0.11.1"
467465
shrink-to-fit = "0.2.10"
466+
strsim = "0.11.1"
467+
swc_sourcemap = "9.3.4"
468468
syn = "2.0.100"
469469
tempfile = "3.20.0"
470-
thread_local = "1.1.8"
471470
thiserror = "1.0.48"
471+
thread_local = "1.1.8"
472472
tokio = "1.43.0"
473473
tokio-util = { version = "0.7.13", features = ["io", "rt"] }
474474
tracing = "0.1.37"
475475
tracing-subscriber = "0.3.16"
476476
triomphe = { git = "https://github.com/sokra/triomphe", branch = "sokra/unstable" }
477+
twox-hash = { version = "2.1.0", features = ["xxhash64", "xxhash3_128"] }
477478
unsize = "1.1.0"
479+
unty = "0.0.4"
478480
url = "2.2.2"
479481
urlencoding = "2.1.2"
480482
uuid = "1.18.1"
481483
vergen = { version = "9.0.6", features = ["cargo"] }
482484
vergen-gitcl = { version = "1.0.8", features = ["cargo"] }
483485
webbrowser = "1.0.6"
484-
inventory = "0.3.21"
485486

486487
[patch.crates-io]
487488
bincode = { git = "https://github.com/bgw/bincode.git", branch = "bgw/patches" }

crates/next-core/src/next_config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,9 +2184,10 @@ impl NextConfig {
21842184
/// A subset of ts/jsconfig that next.js implicitly
21852185
/// interops with.
21862186
#[turbo_tasks::value(serialization = "custom", eq = "manual")]
2187-
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
2187+
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Encode, Decode)]
21882188
#[serde(rename_all = "camelCase")]
21892189
pub struct JsConfig {
2190+
#[bincode(with = "turbo_bincode::serde_json")]
21902191
compiler_options: Option<serde_json::Value>,
21912192
}
21922193

turbopack/crates/turbo-bincode/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ bincode = { workspace = true }
1515
either = { workspace = true }
1616
indexmap = { workspace = true }
1717
mime = { workspace = true }
18+
ringmap = { workspace = true }
1819
serde = { workspace = true }
1920
serde_json = { workspace = true }
21+
smallvec = { workspace = true }

0 commit comments

Comments
 (0)