Commit Graph

12 Commits

Author SHA1 Message Date
har7an
abe0f87211
cargo: Reintroduce rust-version field (#3482)
* cargo: Reintroduce `rust-version` field

in `Cargo.toml` since it appears that client-side `cargo` will check
this field and [error when the users rust toolchain is too old][1]. Add
comments in `Cargo.toml` and `rust-toolchain.toml` pointing to each
other so the rust versions mentioned in each file are hopefully kept in
sync in the future.

[1]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field

* CHANGELOG: Add MR #3482.
2024-07-08 15:38:28 +00:00
har7an
f6d57295a0
Bump rust version to 1.75.0 (#3039)
* rust-toolchain: Bump toolchain version to 1.69.0

which, compared to the previous 1.67.0, has the following impacts on
`zellij`:

- [Turn off debuginfo for build deps][2]: Increases build time (on my
  machine) from ~230 s in 1.67.0 to ~250 s now, *which is unexpected*

This version also changes [handling of the `default-features` flag][3]
when specifying dependencies in `Cargo.toml`. If a dependent crate
requires `default-features = true` on a crate that is required as
`default-features = false` further up the dependency tree, the `true`
setting "wins". We only specify `default-features = false` for three
crates total:

- `names`: This is used only by us
- `surf`: This is used only by us
- `vte`: This is also required by `strip-ansi-escapes`, but that has
  `default-features = false` as well

How this affects our transitive dependencies is unknown at this point.

[2]: https://github.com/rust-lang/cargo/pull/11252/
[3]: https://github.com/rust-lang/cargo/pull/11409/

* rust-toolchain: Bump toolchain version to 1.70.0

which, compared to the previous 1.69.0, as the following impacts on
`zellij`:

1. [Enable sparse registry checkout for crates.io by default][1]

This drastically increases the time to first build on a fresh rust
installation/a rust installation with a clean cargo registry cache.
Previously it took about 75s to populate the deps/cache (with `cargo
fetch --locked` and ~100 MBit/s network), whereas now the same process
takes ~10 s.

2. [The `OnceCell` type is now part of std][2]

In theory, this would allow us to cut a dependency from `zellij-utils`,
but the `once_cell` crate is pulled in by another 16 deps, so there's no
point in attempting it right now.

Build times and binary sizes are unaffected by this change compared to
the previous 1.69.0 toolchain.

[1]: https://github.com/rust-lang/cargo/pull/11791/
[2]: https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html

* rust-toolchain: Bump toolchain version to 1.75.0

which, compared to the previous 1.70.0, has the following impacts on
`zellij`:

1. [cross-crate inlining][8]

This should increase application performance, as functions can now be
inlined across crates.

2. [`async fn` in traits][9]

This would allow us to drop the `async_trait` dependency, but it is
currently still required by 3 other dependencies.

Build time in debug mode (on my own PC) is cut down from 256s to 189s
(for a clean build). Build time in release mode is cut down from 473s to
391s (for a clean build). Binary sizes only change minimally (825 MB ->
807 MB in debug, 29 MB -> 30 MB in release).

[8]: https://github.com/rust-lang/rust/pull/116505
[9]: https://github.com/rust-lang/rust/pull/115822/

* chore: Apply rustfmt.

* CHANGELOG: Add PR #3039.
2024-01-08 16:56:01 +00:00
har7an
30d0cffa42
Use rust 1.67 (#2375)
* rust: Update toolchain version to 1.67

* xtask/pipeline/publish: Drop manual "wait"

for crates.io to catch up, which is obsolete with rust 1.66 and up.
Cargo does that on its own now. See
https://github.com/rust-lang/cargo/pull/11062

* xtask: Add function to obtain asset_dir

instead of assembling it on demand throughout the codebase.

* xtask/run: Add '--quick-run' flag

as a convenient shorthand for `cargo xtask run --data-dir
$PROJECT_ROOT/zellij-utils/assets`.

* cargo: Add 'q' command alias

as a shorthand for 'cargo xtask run --quick-run'

* cargo: Update thiserror to 1.0.40

* cargo: Update anyhow to 1.0.70

and specify dependency only once inside `zellij-utils`, not inside the
zellij root crate.

* cargo: Update names to 0.14.0

* cargo: Update miette to 5.7.0

and re-export the dependency from zellij-utils, to avoid duplicate
(incompatible) includes from inside zellij-utils and the root crate.

* cargo: Update dialoguer to 0.10.4

* fix formatting

* changelog: Add PR #2375
2023-05-09 02:43:28 +00:00
a-kenji
31ca5b4731
[create-pull-request] automated change (#1980)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-01 09:40:36 +01:00
a-kenji
788bcd6151
rust-toolchain: Update (#1834)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-22 12:12:42 +02:00
a-kenji
10724ac958
rust-toolchain: Update (#1659)
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
2022-08-14 09:09:57 +02:00
a-kenji
ea3d73c105
rust-toolchain: Update (#1578)
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
2022-07-10 12:54:14 +02:00
a-kenji
d267730704
build: strip debug symbols (#1177)
* build: strip debug symbols

Stripping the symbols for the release build drops binary size
currently by 20% and the plugin binaries by up to 50%.

Alternative: Keep the debug symbols also on releases

* bump(rust): `1.58.0` -> `1.59.0`

* chore: bump MSRV `1.56` -> `1.59`

Needed for cargos strip-debug feature
2022-05-22 12:48:34 +02:00
a-kenji
ac3c09066b
fix: rust-toolchain -> rust-toolchain.toml (#1313)
The new location has been stable for a year, by now peoples toolchains
should have been able to catch up.
2022-04-12 08:15:13 +02:00
Brooks J Rady
57dc07409d fix(get rid of old toolchain file) 2021-02-23 17:57:15 +00:00
a-kenji
dbbb0792c9 Remove Target from toolchain file.
Maybe it makes sense to not define the targets
in the file for now if we decide to use it at all -
they could be a lot and hard to maintain?
2021-02-22 18:16:23 +01:00
a-kenji
0e10aa882e Add rust-toolchain.toml file
The rust-toolchain file makes
it possible to share a basic
rustup configuration across the
project.

https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file

Important to note, this is the
current rustup hierarchy:

1. An explicit toolchain, e.g. cargo +beta,
2. The RUSTUP_TOOLCHAIN environment variable,
3. A directory override, ala rustup override set beta,
4. The rust-toolchain file,
5. The default toolchain,

source:
c2db7dac6b/README.md (toolchain-override-shorthand)
2021-02-22 18:16:23 +01:00