2023-08-04 22:59:19 +00:00
|
|
|
cargo-features = []
|
2022-04-01 06:44:28 +00:00
|
|
|
|
2021-01-03 16:45:07 +00:00
|
|
|
[workspace]
|
2023-08-04 22:59:19 +00:00
|
|
|
resolver = "2"
|
2024-02-13 23:10:30 +00:00
|
|
|
members = ["cli", "lib", "lib/gen-protos", "lib/proc-macros", "lib/testutils"]
|
feat(cargo): improve --release binary size
Summary: On x86_64-linux, these options reduce the total number of bytes in the
`jj` binary by 40 percent, from 16MiB to 9.8MiB, while having relatively minimal
impact on build time, going from 58s to 1m15s.
While `strip=debuginfo` is already the default, `codegen-units=1` is doing
all the work here, and seems to have a rather miraculous effect despite not
meaningfully hurting compile time too much for me at least. This actually
will probably improve performance in some cases too, but it's likely hard to
quantify.
Ultimately, with or without this change, the dominant entity taking up most
of the compile time for the whole project is `jj-lib` and `jj-cli` crates. A
`--timings` report with Cargo indicates almost all dependencies (on my machine)
compile within 30s whether or not this change is in play, so the remaining time
is all on us.
Various other changes, such as using `opt-level=z` or `lto=thin`, had no real
visible effect. `lto=fat` was pretty successful, reducing total bytes by over
50% (7.8MiB), but at a nearly 2x link-time cost.
It *might* be worth exploring if something like `lto=thin` could improve
performance since it didn't meaningfully impact compile time or size any
further, but that's TBD.
Note: these numbers were performed with a wiped `target/` directory after each
run, and so all dependencies were compiled from scratch, on my 12-core Ryzen
5600X.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Ioyoulrmtwxypsrwwwysyylvmqxzttkmn
2023-07-10 03:54:40 +00:00
|
|
|
|
2023-08-05 22:14:11 +00:00
|
|
|
[workspace.package]
|
2024-03-07 00:12:48 +00:00
|
|
|
version = "0.15.1"
|
2023-08-05 22:14:11 +00:00
|
|
|
license = "Apache-2.0"
|
2023-10-28 19:14:26 +00:00
|
|
|
rust-version = "1.76" # NOTE: remember to update CI, contributing.md, changelog.md, and flake.nix
|
2023-08-05 22:14:11 +00:00
|
|
|
edition = "2021"
|
|
|
|
readme = "README.md"
|
|
|
|
homepage = "https://github.com/martinvonz/jj"
|
|
|
|
repository = "https://github.com/martinvonz/jj"
|
2024-01-04 20:58:58 +00:00
|
|
|
documentation = "https://martinvonz.github.io/jj/"
|
2023-08-05 22:14:11 +00:00
|
|
|
categories = ["version-control", "development-tools"]
|
|
|
|
keywords = ["VCS", "DVCS", "SCM", "Git", "Mercurial"]
|
|
|
|
|
2023-08-05 16:14:11 +00:00
|
|
|
[workspace.dependencies]
|
2024-03-12 15:41:53 +00:00
|
|
|
anyhow = "1.0.81"
|
2023-08-05 16:14:11 +00:00
|
|
|
assert_cmd = "2.0.8"
|
|
|
|
assert_matches = "1.5.0"
|
2024-03-25 15:39:14 +00:00
|
|
|
async-trait = "0.1.79"
|
2023-08-05 16:14:11 +00:00
|
|
|
backoff = "0.4.0"
|
|
|
|
blake2 = "0.10.6"
|
2023-09-07 15:32:15 +00:00
|
|
|
bytes = "1.5.0"
|
2023-08-05 16:14:11 +00:00
|
|
|
cargo_metadata = "0.17.0"
|
2024-03-26 15:23:36 +00:00
|
|
|
clap = { version = "4.5.4", features = [
|
2024-01-06 15:09:00 +00:00
|
|
|
"derive",
|
|
|
|
"deprecated",
|
|
|
|
"wrap_help",
|
|
|
|
"string",
|
|
|
|
] }
|
2024-02-16 20:23:41 +00:00
|
|
|
clap_complete = "4.5.1"
|
|
|
|
clap_complete_nushell = "4.5.1"
|
2024-01-26 02:35:28 +00:00
|
|
|
clap-markdown = "0.1.3"
|
2023-08-05 16:14:11 +00:00
|
|
|
clap_mangen = "0.2.10"
|
2024-03-27 15:53:57 +00:00
|
|
|
chrono = { version = "0.4.37", default-features = false, features = [
|
2023-08-05 16:14:11 +00:00
|
|
|
"std",
|
|
|
|
"clock",
|
|
|
|
] }
|
2023-11-22 15:17:49 +00:00
|
|
|
config = { version = "0.13.4", default-features = false, features = ["toml"] }
|
2023-08-05 16:14:11 +00:00
|
|
|
criterion = "0.5.1"
|
2023-12-27 15:39:32 +00:00
|
|
|
crossterm = { version = "0.27", default-features = false }
|
2023-08-05 16:14:11 +00:00
|
|
|
digest = "0.10.7"
|
|
|
|
dirs = "5.0.1"
|
2024-02-10 08:04:18 +00:00
|
|
|
either = "1.10.0"
|
2023-08-05 16:14:11 +00:00
|
|
|
esl01-renderdag = "0.3.0"
|
2023-12-25 15:42:16 +00:00
|
|
|
futures = "0.3.30"
|
2024-03-20 15:48:35 +00:00
|
|
|
git2 = "0.18.3"
|
2024-03-23 18:15:11 +00:00
|
|
|
gix = { version = "0.61.0", default-features = false, features = [
|
2023-10-29 07:21:37 +00:00
|
|
|
"index",
|
|
|
|
"max-performance-safe",
|
|
|
|
] }
|
2023-11-07 07:15:31 +00:00
|
|
|
glob = "0.3.1"
|
2023-08-05 16:14:11 +00:00
|
|
|
hex = "0.4.3"
|
2024-02-16 17:54:09 +00:00
|
|
|
ignore = "0.4.20"
|
2024-03-01 16:20:08 +00:00
|
|
|
indexmap = "2.2.5"
|
2024-03-23 02:34:28 +00:00
|
|
|
indoc = "2.0.4"
|
2024-03-28 15:52:51 +00:00
|
|
|
insta = { version = "1.38.0", features = ["filters"] }
|
2024-02-09 09:50:20 +00:00
|
|
|
itertools = "0.12.1"
|
2024-02-01 15:24:30 +00:00
|
|
|
libc = { version = "0.2.153" }
|
2023-08-05 16:14:11 +00:00
|
|
|
maplit = "1.0.2"
|
2024-03-11 15:43:01 +00:00
|
|
|
minus = { version = "5.6.0", features = ["dynamic_output", "search"] }
|
2023-08-05 16:14:11 +00:00
|
|
|
num_cpus = "1.16.0"
|
2023-12-07 15:35:33 +00:00
|
|
|
once_cell = "1.19.0"
|
2023-11-10 05:35:26 +00:00
|
|
|
ouroboros = "0.18.0"
|
2024-02-05 16:01:52 +00:00
|
|
|
pest = "2.7.7"
|
|
|
|
pest_derive = "2.7.7"
|
2023-10-28 23:15:01 +00:00
|
|
|
pollster = "0.3.0"
|
2023-11-07 07:15:31 +00:00
|
|
|
pretty_assertions = "1.4.0"
|
2024-03-12 15:41:53 +00:00
|
|
|
proc-macro2 = "1.0.79"
|
2023-12-15 04:02:33 +00:00
|
|
|
prost = "0.12.3"
|
|
|
|
prost-build = "0.12.3"
|
2024-02-13 23:10:30 +00:00
|
|
|
quote = "1.0.35"
|
2023-08-05 16:14:11 +00:00
|
|
|
rand = "0.8.5"
|
|
|
|
rand_chacha = "0.3.1"
|
2024-03-25 15:39:14 +00:00
|
|
|
rayon = "1.10.0"
|
2024-01-02 16:08:31 +00:00
|
|
|
ref-cast = "1.0.22"
|
2024-01-22 15:54:11 +00:00
|
|
|
regex = "1.10.3"
|
2023-11-13 15:44:23 +00:00
|
|
|
rpassword = "7.3.1"
|
2024-03-20 15:48:35 +00:00
|
|
|
rustix = { version = "0.38.32", features = ["fs"] }
|
2023-12-25 20:16:25 +00:00
|
|
|
scm-record = "0.2.0"
|
2023-11-07 07:15:31 +00:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
2024-03-26 15:23:36 +00:00
|
|
|
serde_json = "1.0.115"
|
2023-11-07 07:15:31 +00:00
|
|
|
slab = "0.4.9"
|
2024-03-21 15:37:40 +00:00
|
|
|
smallvec = { version = "1.13.2", features = [
|
2023-08-05 16:14:11 +00:00
|
|
|
"const_generics",
|
|
|
|
"const_new",
|
|
|
|
"union",
|
|
|
|
] }
|
2024-02-09 21:55:09 +00:00
|
|
|
strsim = "0.11.0"
|
2024-03-25 15:39:14 +00:00
|
|
|
syn = "2.0.55"
|
2024-02-27 15:12:30 +00:00
|
|
|
tempfile = "3.10.1"
|
2023-11-20 15:44:05 +00:00
|
|
|
test-case = "3.3.1"
|
2024-02-19 15:18:27 +00:00
|
|
|
textwrap = "0.16.1"
|
2024-03-12 15:41:53 +00:00
|
|
|
thiserror = "1.0.58"
|
2023-09-18 15:45:32 +00:00
|
|
|
timeago = { version = "0.4.2", default-features = false }
|
2024-02-02 15:23:56 +00:00
|
|
|
tokio = { version = "1.36.0" }
|
2023-09-08 15:27:43 +00:00
|
|
|
toml_edit = { version = "0.19.15", features = ["serde"] }
|
2023-10-19 15:08:22 +00:00
|
|
|
tracing = "0.1.40"
|
2024-03-18 15:53:53 +00:00
|
|
|
tracing-chrome = "0.7.2"
|
2023-11-15 15:44:15 +00:00
|
|
|
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
|
2023-08-05 16:14:11 +00:00
|
|
|
"std",
|
|
|
|
"ansi",
|
|
|
|
"env-filter",
|
|
|
|
"fmt",
|
|
|
|
] }
|
2023-09-20 15:14:35 +00:00
|
|
|
unicode-width = "0.1.11"
|
2023-11-07 07:15:31 +00:00
|
|
|
version_check = "0.9.4"
|
2023-08-05 16:14:11 +00:00
|
|
|
watchman_client = { version = "0.8.0" }
|
2024-03-11 15:43:01 +00:00
|
|
|
whoami = "1.5.1"
|
2024-02-04 08:03:03 +00:00
|
|
|
winreg = "0.52"
|
2023-08-05 16:14:11 +00:00
|
|
|
zstd = "0.12.4"
|
|
|
|
|
|
|
|
# put all inter-workspace libraries, i.e. those that use 'path = ...' here in
|
|
|
|
# their own (alphabetically sorted) block
|
|
|
|
|
2024-03-07 00:12:48 +00:00
|
|
|
jj-lib = { path = "lib", version = "0.15.1" }
|
|
|
|
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.15.1" }
|
2023-08-05 16:14:11 +00:00
|
|
|
testutils = { path = "lib/testutils" }
|
|
|
|
|
2024-02-15 16:04:21 +00:00
|
|
|
# Insta suggests compiling these packages in opt mode for faster testing.
|
|
|
|
# See https://docs.rs/insta/latest/insta/#optional-faster-runs.
|
|
|
|
[profile.dev.package]
|
|
|
|
insta.opt-level = 3
|
|
|
|
similar.opt-level = 3
|
|
|
|
|
feat(cargo): improve --release binary size
Summary: On x86_64-linux, these options reduce the total number of bytes in the
`jj` binary by 40 percent, from 16MiB to 9.8MiB, while having relatively minimal
impact on build time, going from 58s to 1m15s.
While `strip=debuginfo` is already the default, `codegen-units=1` is doing
all the work here, and seems to have a rather miraculous effect despite not
meaningfully hurting compile time too much for me at least. This actually
will probably improve performance in some cases too, but it's likely hard to
quantify.
Ultimately, with or without this change, the dominant entity taking up most
of the compile time for the whole project is `jj-lib` and `jj-cli` crates. A
`--timings` report with Cargo indicates almost all dependencies (on my machine)
compile within 30s whether or not this change is in play, so the remaining time
is all on us.
Various other changes, such as using `opt-level=z` or `lto=thin`, had no real
visible effect. `lto=fat` was pretty successful, reducing total bytes by over
50% (7.8MiB), but at a nearly 2x link-time cost.
It *might* be worth exploring if something like `lto=thin` could improve
performance since it didn't meaningfully impact compile time or size any
further, but that's TBD.
Note: these numbers were performed with a wiped `target/` directory after each
run, and so all dependencies were compiled from scratch, on my 12-core Ryzen
5600X.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Ioyoulrmtwxypsrwwwysyylvmqxzttkmn
2023-07-10 03:54:40 +00:00
|
|
|
[profile.release]
|
|
|
|
strip = "debuginfo"
|
|
|
|
codegen-units = 1
|