Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rust 1.76 #5908

Merged
merged 8 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ runs:
- name: Set up sccache
uses: rerun-io/[email protected]
with:
version: "v0.5.2"
version: "v0.7.7"
use_gcs: true
gcs_bucket: rerun-sccache
gcs_read_only: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
name: Build Wheels
runs-on: ubuntu-latest-16-cores
container:
image: rerunio/ci_docker:0.12.0
image: rerunio/ci_docker:0.13.0
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.74.0
toolchain: 1.76.0

- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_build_and_upload_rerun_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ jobs:
linux-arm64)
runner="buildjet-8vcpu-ubuntu-2204-arm"
target="aarch64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
lib_name="librerun_c.a"
;;
linux-x64)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
lib_name="librerun_c.a"
;;
windows-x64)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ jobs:
linux-arm64)
runner="buildjet-8vcpu-ubuntu-2204-arm"
target="aarch64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
bin_name="rerun"
;;
linux-x64)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
bin_name="rerun"
;;
windows-x64)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_build_and_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ jobs:
linux-arm64)
runner="buildjet-8vcpu-ubuntu-2204-arm"
target="aarch64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'" # Required to be manylinux compatible
container="'rerunio/ci_docker:0.13.0'" # Required to be manylinux compatible
compat="manylinux_2_31"
;;
linux-x64)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
compat="manylinux_2_31"
container="'rerunio/ci_docker:0.12.0'" # Required to be manylinux compatible
container="'rerunio/ci_docker:0.13.0'" # Required to be manylinux compatible
;;
windows-x64)
runner="windows-latest-8-cores"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_bundle_and_upload_rerun_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: rerunio/ci_docker:0.12.0 # Need container for arrow dependency.
image: rerunio/ci_docker:0.13.0 # Need container for arrow dependency.

steps:
- name: Checkout repository
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/reusable_checks_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ jobs:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: clippy check re_viewer wasm32
shell: bash
run: ./scripts/clippy_wasm.sh
# NOTE: Fails with sccache -- refactor incoming in a follow-up PR.
# - name: clippy check re_viewer wasm32
# shell: bash
# run: ./scripts/clippy_wasm.sh

- name: Check re_renderer examples wasm32
uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_run_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: rerunio/ci_docker:0.12.0 # Required to run the wheel or we get "No matching distribution found for attrs>=23.1.0" during `pip install rerun-sdk`
image: rerunio/ci_docker:0.13.0 # Required to run the wheel or we get "No matching distribution found for attrs>=23.1.0" during `pip install rerun-sdk`

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ jobs:
linux-arm64)
runner="buildjet-8vcpu-ubuntu-2204-arm"
target="aarch64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
;;
linux-x64)
runner="ubuntu-latest-16-cores"
target="x86_64-unknown-linux-gnu"
container="'rerunio/ci_docker:0.12.0'"
container="'rerunio/ci_docker:0.13.0'"
;;
windows-x64)
runner="windows-latest-8-cores"
Expand Down
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ cd rerun

Now install the `pixi` package manager: <https://github.com/prefix-dev/pixi?tab=readme-ov-file#installation>

Make sure `cargo --version` prints `1.74.0` once you are done.
Make sure `cargo --version` prints `1.76.0` once you are done.

If you are using an Apple-silicon Mac (M1, M2), make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it:

```sh
rustup set default-host aarch64-apple-darwin && rustup install 1.74.0
rustup set default-host aarch64-apple-darwin && rustup install 1.76.0
```

Additionally, we use [cargo-cranky](https://github.com/ericseppanen/cargo-cranky) for defining which Clippy lints are active and [cargo-deny](https://github.com/EmbarkStudios/cargo-deny) for linting crate versions.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ Check out our [migration guide](https://www.rerun.io/docs/reference/migration/mi

#### 📦 Dependencies
- Update egui and wgpu [#4111](https://github.com/rerun-io/rerun/pull/4111)
- Update Rust to 1.74.0 [#4390](https://github.com/rerun-io/rerun/pull/4390)
- Update Rust to 1.76.0 [#4390](https://github.com/rerun-io/rerun/pull/4390)

#### 🤷 Other
#### 🤷 Other
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ homepage = "https://rerun.io"
include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rerun-io/rerun"
rust-version = "1.74"
rust-version = "1.76"
version = "0.16.0-alpha.1+dev"

[workspace.dependencies]
Expand Down
5 changes: 5 additions & 0 deletions Cranky.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ warn = [
"clippy::imprecise_flops",
"clippy::index_refutable_slice",
"clippy::inefficient_to_string",
"clippy::infinite_loop",
"clippy::into_iter_without_iter",
"clippy::invalid_upcast_comparisons",
"clippy::iter_not_returning_iterator",
"clippy::iter_on_empty_collections",
"clippy::iter_on_single_items",
"clippy::iter_without_into_iter",
"clippy::large_digit_groups",
"clippy::large_include_file",
"clippy::large_stack_arrays",
Expand Down Expand Up @@ -119,6 +122,7 @@ warn = [
"clippy::unchecked_duration_subtraction",
"clippy::undocumented_unsafe_blocks",
"clippy::unimplemented",
"clippy::uninhabited_references",
"clippy::uninlined_format_args",
"clippy::unnecessary_box_returns",
"clippy::unnecessary_safety_doc",
Expand Down Expand Up @@ -152,6 +156,7 @@ allow = [

# TODO(emilk): enable more of these lints:
"clippy::cloned_instead_of_copied",
"clippy::iter_over_hash_type",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happens too often? ah well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More than twice, at this is too fun to fix this cycle :)

"clippy::let_underscore_untyped",
"clippy::missing_assert_message",
"clippy::missing_errors_doc",
Expand Down
8 changes: 7 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This document describes the current release and versioning strategy. This strate


## Release cadence
New Rerun versions are released every four weeks. Sometimes we do out-of-schedule patch releases.
New Rerun versions are released approximately once every month. Sometimes we do out-of-schedule patch releases.


## Library versioning and release cadence
Expand All @@ -30,6 +30,12 @@ In rare cases we will do patch releases, e.g. `0.3.1`, when there is a critical
We sometimes do pre-releases. Then we use the versioning `0.2.0-alpha.0` etc.


## Rust version policy
Our Minimum Supported Rust Version (MSRV) is always _at least_ one minor release behind the latest Rust version, and ideally two releases.
* This means users of our libraries aren't forced to update to the very latest Rust version
* This lets us sometimes avoid new bugs in the newly released Rust compiler


## Data and communication versioning
We have not yet committed to any backwards or forwards compatibility.

Expand Down
6 changes: 3 additions & 3 deletions ci_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:20.04
LABEL maintainer="[email protected]"
# Remember to update the version in publish.sh
# TODO(jleibs) use this version in the publish.sh script and below in the CACHE_KEY
LABEL version="0.12.0"
LABEL version="0.13.0"
LABEL description="Docker image used for the CI of https://github.com/rerun-io/rerun"

# Install the ubuntu package dependencies
Expand Down Expand Up @@ -68,7 +68,7 @@ RUN arch=$(if [ "$TARGETARCH" = "arm64" ]; then echo "aarch64"; else echo "x86_6
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.74.0 \
RUST_VERSION=1.76.0 \
RUSTUP_VERSION=1.26.0

# Install Rust
Expand Down Expand Up @@ -108,7 +108,7 @@ ADD rerun_py/requirements-lint.txt requirements-lint.txt
RUN pip install -r requirements-lint.txt

# Increment this to invalidate cache
ENV CACHE_KEY=rerun_docker_v0.12.0
ENV CACHE_KEY=rerun_docker_v0.13.0

# See: https://github.com/actions/runner-images/issues/6775#issuecomment-1410270956
RUN git config --system --add safe.directory '*'
Expand Down
2 changes: 1 addition & 1 deletion ci_docker/publish.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux

VERSION=0.12.0 # Bump on each new version. Remember to update the version in the Dockerfile too.
VERSION=0.13.0 # Bump on each new version. Remember to update the version in the Dockerfile too.

# The build needs to run from top of repo to access the requirements.txt
cd `git rev-parse --show-toplevel`
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# -----------------------------------------------------------------------------
# Section identical to the main scripts/clippy_wasm/clippy.toml:

msrv = "1.74"
msrv = "1.76"

allow-unwrap-in-tests = true

Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/examples/end_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use re_analytics::Event;
use re_analytics::Properties;
use re_analytics::{Analytics, AnalyticsEvent};

fn main() {
fn main() -> ! {
re_log::setup_logging();

let analytics = Analytics::new(Duration::from_secs(3)).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/re_build_info/src/build_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn crate_version_from_build_info_string() {
patch: 0,
meta: Some(crate::crate_version::Meta::DevAlpha(7)),
},
rustc_version: "1.74.0 (d5c2e9c34 2023-09-13)",
rustc_version: "1.76.0 (d5c2e9c34 2023-09-13)",
llvm_version: "16.0.5",
git_hash: "",
git_branch: "",
Expand Down
3 changes: 1 addition & 2 deletions crates/re_data_store/src/store_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ impl DataStore {
.get(&(entity_path_hash, query.timeline))
.map(|index| index.range(query.range, component_names_opt))
.into_iter()
.flatten()
.map(|(data_time, row_id, cells)| (data_time, row_id, cells)),
.flatten(),
)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/src/file_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
//! Normalization (not available in `std`) on the other hand is purely lexicographical: it
//! normalizes paths as best as it can without ever touching the filesystem.
//!
//! See also ["Getting Dot-Dot Right"](https://9p.io/sys/doc/lexnames.html).
//! See also "[Getting Dot-Dot Right](https://9p.io/sys/doc/lexnames.html)".
//!
//! ### Hermeticism
//!
Expand Down
1 change: 1 addition & 0 deletions crates/re_sdk_comms/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub async fn serve(
}

async fn listen_for_new_clients(listener: TcpListener, options: ServerOptions, tx: Sender<LogMsg>) {
#[allow(clippy::infinite_loop)] // TODO(emilk): some way of aborting this loop
loop {
match listener.accept().await {
Ok((stream, _)) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where

let extra_history = query_visual_history(ctx, data_result);

match query_archetype_with_history::<A, N>(
let result = query_archetype_with_history::<A, N>(
ctx.recording_store(),
&query.timeline,
&query.latest_at,
Expand All @@ -97,7 +97,8 @@ where
)?;
}
Ok(())
}) {
});
match result {
Ok(_) | Err(QueryError::PrimaryNotFound(_)) => {}
Err(err) => {
re_log::error_once!(
Expand Down
10 changes: 2 additions & 8 deletions crates/re_space_view_time_series/src/space_view_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,8 @@ It can greatly improve performance (and readability) in such situations as it pr
});

if legend_visible.unwrap_or(true.into()).0 {
plot = plot.legend(
Legend::default().position(
legend_corner
.unwrap_or_default()
.try_into()
.unwrap_or(DEFAULT_LEGEND_CORNER),
),
);
plot =
plot.legend(Legend::default().position(legend_corner.unwrap_or_default().into()));
}

if timeline.typ() == TimeType::Time {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/data/quick_start_guides/rust_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Let's try it out in a brand-new Rust project:
cargo init cube && cd cube && cargo add rerun --features native_viewer
```

Note that the Rerun SDK requires a working installation of Rust 1.74+.
Note that the Rerun SDK requires a working installation of Rust 1.76+.

## Logging your own data

Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/data/quick_start_guides/rust_spawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Let's try it out in a brand-new Rust project:
cargo init cube && cd cube && cargo add rerun
```

Note that the Rerun SDK requires a working installation of Rust 1.74+.
Note that the Rerun SDK requires a working installation of Rust 1.76+.

## Logging your own data

Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/src/ui/top_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ fn memory_use_label_ui(ui: &mut egui::Ui, gpu_resource_stats: &WgpuResourcePoolS
text: impl Into<String>,
add_contents_on_hover: impl FnOnce(&mut egui::Ui),
) {
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
let text = text.into();
if ui
.add(
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewport/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl<'a, 'b> Viewport<'a, 'b> {
space_view.class_identifier(),
);

#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
while ScreenshotProcessor::next_readback_result(
ctx.render_ctx,
space_view.id.gpu_readback_id(),
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/installing-viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ There are many ways to install the viewer. Please pick whatever works best for y
- Download it from the [GitHub Release artifacts](https://github.com/rerun-io/rerun/releases/latest/)
- Via Cargo
- `cargo binstall rerun-cli` - download binaries via [`cargo binstall`](https://github.com/cargo-bins/cargo-binstall)
- `cargo install rerun-cli` - build it from source (this requires Rust 1.74+)
- `cargo install rerun-cli` - build it from source (this requires Rust 1.76+)
- Together with the Rerun [Python SDK](./quick-start/python.md):
- `pip3 install rerun-sdk` - download it via pip
- `conda install -c conda-forge rerun-sdk` - download via Conda
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/quick-start/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ order: 3

## Setup

The Rerun SDK for Rust requires a working installation of Rust 1.74+.
The Rerun SDK for Rust requires a working installation of Rust 1.76+.

After you have [installed the viewer](../installing-viewer.md#installing-the-viewer) you can simply add [the rerun crate](https://crates.io/crates/rerun) to your project with `cargo add rerun`.

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/clock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "clock"
version = "0.16.0-alpha.1+dev"
edition = "2021"
rust-version = "1.74"
rust-version = "1.76"
license = "MIT OR Apache-2.0"
publish = false

Expand Down
Loading
Loading