Files
next.js/crates/next-api/build.rs
Luke SandbergandGitHub 4a85aab0c0 [turbopack] Remove build scripts and register functions (#83156)
## What

#83074 migrated us to use `inventory` for registration, this obsoleted the build scripts and `register` functions.  So, delete them!

## Why?

Simplification, keeping registration and definition next to each other will make it easier to maintain.

I was also optimistic about build performance.  unscientifically i ran `cargo clean` and then timed `pnpm turbo build-native` with and without this PR (closed VSCode and other copies of rustc)

CHANGE:
real	3m30.220s
user	34m41.703s
sys	1m44.112s

HEAD:
real	3m31.017s
user	34m47.691s
sys	1m47.096s

😢  So yeah, not much of an effect, im guessing the build.rs scripts had good parallelism in the build or were just dwarfed by wasmer
2025-09-03 00:34:06 -07:00

15 lines
439 B
Rust

fn main() -> anyhow::Result<()> {
// Generates, stores build-time information as static values.
// There are some places relying on correct values for this (i.e telemetry),
// So failing build if this fails.
let cargo = vergen::CargoBuilder::default()
.target_triple(true)
.build()?;
vergen::Emitter::default()
.add_instructions(&cargo)?
.fail_on_error()
.emit()?;
Ok(())
}