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 MSRV to Rust 1.79 #7563

Merged
merged 12 commits into from
Oct 3, 2024
Merged

Update MSRV to Rust 1.79 #7563

merged 12 commits into from
Oct 3, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Oct 2, 2024

What

TODO

  • Fix the debug-assertion
  • Fix all new clippy lints
  • Add more clippy lints thats been added in 1.77, 1.78, 1.79

MiMalloc bug

Debug assertions are now part of stdlib: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions, making us hit this bug in MiMalloc:

I also opened this issue on the standard library:

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

Copy link

github-actions bot commented Oct 2, 2024

Deployed docs

Commit Link
531d9b7 https://landing-l5lrpxwz7-rerun.vercel.app/docs

@emilk emilk added 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md 🚢 CI 🦀 Rust API Rust logging API include in changelog and removed exclude from changelog PRs with this won't show up in CHANGELOG.md labels Oct 2, 2024
@emilk emilk changed the title Update to Rust 1.79 Update MSRV to Rust 1.79 Oct 2, 2024
@emilk emilk marked this pull request as ready for review October 2, 2024 16:09
@Wumpf Wumpf self-requested a review October 2, 2024 16:14
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

lgtm. Scary crash. Tried it as well and repros on Mac M1. Want to give it a spin on Windows x64

I got the crash on the second thing it wants to call collect on

I got curious about this crash and enabled the crashy bool.  It actually passes one for me and then fails on the first:
```[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:141:17] std::any::type_name::<T>() = "re_renderer::global_bindings::FrameUniformBuffer"
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:142:17] std::mem::size_of::<T>() = 256
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:143:17] std::mem::align_of::<T>() = 256
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:144:17] vec.len() = 1
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:145:17] vec.as_ptr() = 0x000004d5dc085f00
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:146:17] vec.as_ptr() as usize % std::mem::align_of::<T>() = 0
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:147:17] vec.as_slice().len() = 1
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:141:17] std::any::type_name::<T>() = "re_renderer::renderer::compositor::gpu_data::CompositeUniformBuffer"
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:142:17] std::mem::size_of::<T>() = 256
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:143:17] std::mem::align_of::<T>() = 256
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:144:17] vec.len() = 1
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:145:17] vec.as_ptr() = 0x000004d5dc081180
[crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs:146:17] vec.as_ptr() as usize % std::mem::align_of::<T>() = 128

thread 'main' panicked at 'unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`'

... only that I actually get incorrect alignment.
edit: Same on Windows.

that's a bit worrisome

@Wumpf Wumpf self-requested a review October 2, 2024 16:59
@Wumpf Wumpf merged commit 86f461e into main Oct 3, 2024
39 checks passed
@Wumpf Wumpf deleted the emilk/rust-1.79 branch October 3, 2024 09:20
emilk added a commit to rerun-io/rerun_template that referenced this pull request Oct 3, 2024
Wumpf pushed a commit that referenced this pull request Oct 3, 2024
### What

#7563 introduced a lint that clippy chokes on with the codegen'd rust.
This PR switches off that lint in the offending places.

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7578?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7578?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7578)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
emilk added a commit that referenced this pull request Oct 7, 2024
### What
* Part of #7298


### What
Supports native decoding of AV1 videos.

Downsides: it is extremely slow in debug builds

In release builds it is ok, but there is still A LOT of performance on
the table.

### TODO before merging
* #7563
* [x] Re-add `nasm` to `pixi.toml`, because it is needed to compile
`rav1d`
* [x] Make the asm-features of `rav1d` opt-in so users don't need `nasm`
to compile `rerun`
* [x] Put it behind a feature flag, in case compiling `rav1d` is
difficult on some platforms
* [x] Fix error handling so we don't crash on bad videos
* ~Fix performance of debug builds, if possible~
  *  `dav1d` is always fast, but `rav1d` is super-slow in debug builds
* [x] Or show error message in debug builds
* [x] Review moved mp4 demux code to see nothing was lost

### Proof

https://github.com/user-attachments/assets/1b1a0a03-9fac-4fa2-bcae-7beb9591067c

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7557?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7557?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7557)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.

---------

Co-authored-by: jprochazk <pjanv42@gmail.com>
Co-authored-by: Andreas Reich <andreas@rerun.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) include in changelog 🦀 Rust API Rust logging API 🚢 CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants