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-12-31 00:30:45 +00:00
|
|
|
version = "0.25.0"
|
2023-08-05 22:14:11 +00:00
|
|
|
license = "Apache-2.0"
|
2024-12-12 20:15:48 +00:00
|
|
|
rust-version = "1.76" # NOTE: remember to update CI, contributing.md, changelog.md, install-and-setup.md, and flake.nix
|
2023-08-05 22:14:11 +00:00
|
|
|
edition = "2021"
|
|
|
|
readme = "README.md"
|
2024-12-17 19:01:42 +00:00
|
|
|
homepage = "https://github.com/jj-vcs/jj"
|
|
|
|
repository = "https://github.com/jj-vcs/jj"
|
|
|
|
documentation = "https://jj-vcs.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-12-23 15:30:36 +00:00
|
|
|
anyhow = "1.0.95"
|
2023-08-05 16:14:11 +00:00
|
|
|
assert_cmd = "2.0.8"
|
|
|
|
assert_matches = "1.5.0"
|
2025-01-07 18:48:00 +00:00
|
|
|
async-trait = "0.1.85"
|
2023-08-05 16:14:11 +00:00
|
|
|
blake2 = "0.10.6"
|
2025-01-03 15:50:20 +00:00
|
|
|
bstr = "1.11.3"
|
2025-01-10 15:23:25 +00:00
|
|
|
clap = { version = "4.5.26", features = [
|
2024-01-06 15:09:00 +00:00
|
|
|
"derive",
|
|
|
|
"deprecated",
|
|
|
|
"wrap_help",
|
|
|
|
"string",
|
|
|
|
] }
|
2025-01-09 17:28:38 +00:00
|
|
|
clap_complete = { version = "4.5.42", features = ["unstable-dynamic"] }
|
2025-01-02 15:28:50 +00:00
|
|
|
clap_complete_nushell = "4.5.5"
|
2024-06-15 21:52:17 +00:00
|
|
|
clap-markdown = "0.1.4"
|
2025-01-07 16:36:58 +00:00
|
|
|
clap_mangen = "0.2.25"
|
2024-12-09 16:01:50 +00:00
|
|
|
chrono = { version = "0.4.39", default-features = false, features = [
|
2023-08-05 16:14:11 +00:00
|
|
|
"std",
|
|
|
|
"clock",
|
|
|
|
] }
|
2024-06-08 00:42:15 +00:00
|
|
|
chrono-english = { version = "0.1.7" }
|
2024-08-29 10:49:32 +00:00
|
|
|
clru = "0.6.2"
|
2023-08-05 16:14:11 +00:00
|
|
|
criterion = "0.5.1"
|
2025-01-12 08:23:58 +00:00
|
|
|
crossterm = { version = "0.28", default-features = false, features = ["windows"] }
|
2023-08-05 16:14:11 +00:00
|
|
|
digest = "0.10.7"
|
|
|
|
dirs = "5.0.1"
|
2024-08-05 15:47:20 +00:00
|
|
|
dunce = "1.0.5"
|
2024-06-26 15:29:06 +00:00
|
|
|
either = "1.13.0"
|
2024-10-07 15:12:17 +00:00
|
|
|
futures = "0.3.31"
|
2024-07-13 12:29:13 +00:00
|
|
|
git2 = { version = "0.19.0", features = [
|
2024-07-26 00:42:28 +00:00
|
|
|
# Do *not* disable this feature even if you'd like dynamic linking. Instead,
|
|
|
|
# set the environment variable `LIBGIT2_NO_VENDOR=1` if dynamic linking must
|
|
|
|
# be used (this will override the Cargo feature), and allow static linking
|
|
|
|
# in other cases. Rationale: If neither the feature nor the environment
|
|
|
|
# variable are set, `git2` may still decide to vendor `libgit2` if it
|
|
|
|
# doesn't find a version of `libgit2` to link to dynamically. See also
|
|
|
|
# https://github.com/rust-lang/git2-rs/commit/3cef4119f
|
|
|
|
"vendored-libgit2"
|
|
|
|
] }
|
2025-01-12 08:57:39 +00:00
|
|
|
gix = { version = "0.69.1", default-features = false, features = [
|
2024-11-14 09:25:26 +00:00
|
|
|
"attributes",
|
|
|
|
"blob-diff",
|
2023-10-29 07:21:37 +00:00
|
|
|
"index",
|
2024-12-07 20:22:47 +00:00
|
|
|
"max-performance-safe",
|
2023-10-29 07:21:37 +00:00
|
|
|
] }
|
2024-12-30 16:05:01 +00:00
|
|
|
glob = "0.3.2"
|
2024-11-25 16:04:56 +00:00
|
|
|
hashbrown = { version = "0.15.2", default-features = false, features = ["inline-more"] }
|
2023-08-05 16:14:11 +00:00
|
|
|
hex = "0.4.3"
|
2024-09-13 15:52:11 +00:00
|
|
|
ignore = "0.4.23"
|
2024-12-01 14:50:01 +00:00
|
|
|
indexmap = { version = "2.7.0", features = ["serde"] }
|
2024-03-23 02:34:28 +00:00
|
|
|
indoc = "2.0.4"
|
2025-01-06 15:51:52 +00:00
|
|
|
insta = { version = "1.42.0", features = ["filters"] }
|
2024-07-15 15:14:48 +00:00
|
|
|
itertools = "0.13.0"
|
2024-12-19 16:00:52 +00:00
|
|
|
libc = { version = "0.2.169" }
|
2023-08-05 16:14:11 +00:00
|
|
|
maplit = "1.0.2"
|
|
|
|
num_cpus = "1.16.0"
|
2024-10-07 15:12:17 +00:00
|
|
|
once_cell = "1.20.2"
|
2024-08-02 08:22:31 +00:00
|
|
|
os_pipe = "1.2.1"
|
2024-12-09 16:01:50 +00:00
|
|
|
pest = "2.7.15"
|
|
|
|
pest_derive = "2.7.15"
|
2023-10-28 23:15:01 +00:00
|
|
|
pollster = "0.3.0"
|
2024-09-16 15:45:40 +00:00
|
|
|
pretty_assertions = "1.4.1"
|
2025-01-13 15:22:52 +00:00
|
|
|
proc-macro2 = "1.0.93"
|
2024-05-20 15:46:17 +00:00
|
|
|
prost = "0.12.6"
|
|
|
|
prost-build = "0.12.6"
|
2024-12-27 15:12:15 +00:00
|
|
|
quote = "1.0.38"
|
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-05-07 16:10:00 +00:00
|
|
|
ref-cast = "1.0.23"
|
2024-10-24 15:13:55 +00:00
|
|
|
regex = "1.11.1"
|
2023-11-13 15:44:23 +00:00
|
|
|
rpassword = "7.3.1"
|
2025-01-08 15:09:50 +00:00
|
|
|
rustix = { version = "0.38.43", features = ["fs"] }
|
2024-10-24 06:54:22 +00:00
|
|
|
same-file = "1.0.6"
|
2024-11-14 09:25:26 +00:00
|
|
|
sapling-renderdag = "0.1.0"
|
2024-08-02 08:19:35 +00:00
|
|
|
sapling-streampager = "0.10.3"
|
2025-01-10 22:36:18 +00:00
|
|
|
scm-record = "0.5.0"
|
2023-11-07 07:15:31 +00:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
2025-01-07 18:48:00 +00:00
|
|
|
serde_json = "1.0.135"
|
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-04-03 15:57:59 +00:00
|
|
|
strsim = "0.11.1"
|
2025-01-10 15:23:25 +00:00
|
|
|
syn = "2.0.96"
|
2025-01-03 15:50:20 +00:00
|
|
|
tempfile = "3.15.0"
|
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"
|
2025-01-13 15:22:52 +00:00
|
|
|
thiserror = "2.0.11"
|
2023-09-18 15:45:32 +00:00
|
|
|
timeago = { version = "0.4.2", default-features = false }
|
2025-01-09 17:28:38 +00:00
|
|
|
tokio = { version = "1.43.0" }
|
2024-11-21 07:24:45 +00:00
|
|
|
toml_edit = { version = "0.22.22", features = ["serde"] }
|
2024-11-28 15:33:24 +00:00
|
|
|
tracing = "0.1.41"
|
2024-03-18 15:53:53 +00:00
|
|
|
tracing-chrome = "0.7.2"
|
2024-12-02 16:22:52 +00:00
|
|
|
tracing-subscriber = { version = "0.3.19", default-features = false, features = [
|
2023-08-05 16:14:11 +00:00
|
|
|
"std",
|
|
|
|
"ansi",
|
|
|
|
"env-filter",
|
|
|
|
"fmt",
|
|
|
|
] }
|
2025-01-13 15:22:52 +00:00
|
|
|
unicode-width = "0.2.0"
|
2024-07-26 15:59:48 +00:00
|
|
|
version_check = "0.9.5"
|
2024-06-18 18:39:18 +00:00
|
|
|
watchman_client = { version = "0.9.0" }
|
2024-09-03 15:52:32 +00:00
|
|
|
whoami = "1.5.2"
|
2024-02-04 08:03:03 +00:00
|
|
|
winreg = "0.52"
|
2023-08-05 16:14:11 +00:00
|
|
|
|
|
|
|
# put all inter-workspace libraries, i.e. those that use 'path = ...' here in
|
|
|
|
# their own (alphabetically sorted) block
|
|
|
|
|
cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.
(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)
As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.
Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-03 04:52:52 +00:00
|
|
|
jj-lib = { path = "lib", version = "0.25.0", default-features = false }
|
2024-12-31 00:30:45 +00:00
|
|
|
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.25.0" }
|
2023-08-05 16:14:11 +00:00
|
|
|
testutils = { path = "lib/testutils" }
|
|
|
|
|
2024-10-02 20:11:37 +00:00
|
|
|
[workspace.lints.clippy]
|
2024-10-02 19:42:33 +00:00
|
|
|
explicit_iter_loop = "warn"
|
2024-10-02 21:27:54 +00:00
|
|
|
flat_map_option = "warn"
|
2024-10-02 20:00:32 +00:00
|
|
|
implicit_clone = "warn"
|
2024-10-02 21:38:33 +00:00
|
|
|
needless_for_each = "warn"
|
2024-10-02 19:55:56 +00:00
|
|
|
semicolon_if_nothing_returned = "warn"
|
2024-10-02 19:48:42 +00:00
|
|
|
uninlined_format_args = "warn"
|
2025-01-02 21:37:54 +00:00
|
|
|
useless_conversion = "warn"
|
2024-11-14 09:25:26 +00:00
|
|
|
|
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
|