Skip to content

Commit

Permalink
Don't build uv-dev by default (#6827)
Browse files Browse the repository at this point in the history
Most times we compile with `cargo build`, we don't actually need
`uv-dev`. By making `uv-dev` dependent on a new `dev` feature, it
doesn't get built by default anymore, but only when passing `--features
dev`.

Hopefully a small improvement for compile times or at least system load.
  • Loading branch information
konstin authored Aug 29, 2024
1 parent 34d7450 commit 0b16d10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[alias]
dev = "run --package uv-dev"
dev = "run --package uv-dev --features dev"

# statically link the C runtime so the executable does not depend on
# that shared/dynamic library.
Expand Down
7 changes: 7 additions & 0 deletions crates/uv-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ mimalloc = { version = "0.1.39" }
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies]
tikv-jemallocator = { version = "0.6.0" }

[[bin]]
name = "uv-dev"
# We don't want to build the dev CLI by default, so we skip it by requiring an off-by-default feature
required-features = ["dev"]

[features]
default = []
# Actually build the dev CLI.
dev = []
render = ["poloto", "resvg", "tagu"]

0 comments on commit 0b16d10

Please sign in to comment.