Skip to content

Commit

Permalink
Update crates, including rfd for better file dialogs (#7953)
Browse files Browse the repository at this point in the history
* [x] I have tested localy

---------

Co-authored-by: Clement Rey <[email protected]>
  • Loading branch information
emilk and teh-cmc authored Oct 31, 2024
1 parent b7d7def commit 6624898
Show file tree
Hide file tree
Showing 12 changed files with 1,030 additions and 1,354 deletions.
2,155 changes: 934 additions & 1,221 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ quote = "1.0"
rand = { version = "0.8", default-features = false }
rand_distr = { version = "0.4", default-features = false }
rayon = "1.7"
rfd = { version = "0.12", default-features = false, features = ["xdg-portal"] }
rfd = { version = "0.15", default-features = false, features = [
"async-std",
"xdg-portal",
] }
rmp-serde = "1"
ron = "0.8.0"
rust-format = "0.3"
Expand Down Expand Up @@ -274,7 +277,7 @@ tonic = { version = "0.12.3", default-features = false }
tonic-build = { version = "0.12.3", default-features = false }
tonic-web-wasm-client = "0.6"
tracing = { version = "0.1", default-features = false }
tungstenite = { version = "0.23", default-features = false }
tungstenite = { version = "0.24", default-features = false }
type-map = "0.5"
typenum = "1.15"
unindent = "0.2"
Expand Down Expand Up @@ -485,7 +488,6 @@ rest_pat_in_fully_bound_structs = "warn"
same_functions_in_if_condition = "warn"
semicolon_if_nothing_returned = "warn"
should_panic_without_expect = "warn"
significant_drop_tightening = "warn"
single_match_else = "warn"
str_split_at_newline = "warn"
str_to_string = "warn"
Expand Down Expand Up @@ -534,6 +536,7 @@ iter_over_hash_type = "allow"
let_underscore_untyped = "allow"
missing_assert_message = "allow"
missing_errors_doc = "allow"
significant_drop_tightening = "allow" # An update of parking_lot made this trigger in a lot of places. TODO(emilk): fix those places

[patch.crates-io]
# Try to avoid patching crates! It prevents us from publishing the crates on crates.io.
Expand Down
7 changes: 6 additions & 1 deletion crates/build/re_types_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ workspace = true
all-features = true


[features]
## Enable puffin profiling.
tracing = ["re_tracing/server"]


[dependencies]
re_build_tools.workspace = true
re_case.workspace = true
re_error.workspace = true
re_log = { workspace = true, features = ["setup"] }
re_tracing = { workspace = true, features = ["server"] }
re_tracing.workspace = true

# External
anyhow.workspace = true
Expand Down
6 changes: 5 additions & 1 deletion crates/build/re_types_builder/src/bin/build_re_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ macro_rules! join {
fn main() {
re_log::setup_logging();

#[cfg(feature = "tracing")]
let mut profiler = re_tracing::Profiler::default(); // must be started early and dropped late to catch everything

// This isn't a build.rs script, so opt out of cargo build instructions
Expand All @@ -52,11 +53,14 @@ fn main() {
return;
}
"--force" => always_run = true,
"--profile" => profiler.start(),
"--check" => {
always_run = true;
check = true;
}

#[cfg(feature = "tracing")]
"--profile" => profiler.start(),

_ => {
eprintln!("Unknown argument: {arg:?}");
return;
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_renderer/src/file_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ mod file_server_impl {
.ok()
}

let paths = self
let paths: HashSet<PathBuf> = self
.events_rx
.try_iter()
.flat_map(|ev| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn size_from_blob(blob: &dyn Array, media_type: Option<&dyn Array>) -> Option<[u

let image_bytes = blob.0.as_slice();

let mut reader = image::io::Reader::new(std::io::Cursor::new(image_bytes));
let mut reader = image::ImageReader::new(std::io::Cursor::new(image_bytes));

if let Some(format) = image::ImageFormat::from_mime_type(&media_type.0) {
reader.set_format(format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ fn pixel_value_string_from_gpu_texture(
buffer_info,
}),
);
drop(readback_belt);

{
let mut encoder = render_ctx.active_frame.before_view_builder_encoder.lock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl VideoFrameReferenceVisualizer {
Hash64::hash("video_error").hash64(),
render_ctx,
|| {
let mut reader = image::io::Reader::new(std::io::Cursor::new(
let mut reader = image::ImageReader::new(std::io::Cursor::new(
re_ui::icons::VIDEO_ERROR.png_bytes,
));
reader.set_format(image::ImageFormat::Png);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn decode_image(
) -> Result<ImageInfo, ImageLoadError> {
re_tracing::profile_function!();

let mut reader = image::io::Reader::new(std::io::Cursor::new(image_bytes));
let mut reader = image::ImageReader::new(std::io::Cursor::new(image_bytes));

if let Some(format) = image::ImageFormat::from_mime_type(media_type) {
reader.set_format(format);
Expand Down
10 changes: 3 additions & 7 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,21 @@ skip = [
{ name = "cargo_metadata" }, # Older version used by ply-rs. It's small, and it's build-time only!
{ name = "cfg_aliases" }, # Tiny macro-only crate. wgpu/naga is using an old version
{ name = "hashbrown" }, # Old version used by polar-rs
{ name = "libloading" }, # Old version used by ash (vulkan binding), newer version used by khronos-egl
{ name = "memoffset" }, # Small crate
{ name = "prettyplease" }, # Old version being used by prost
{ name = "pulldown-cmark" }, # Build-dependency via `ply-rs` (!). TODO(emilk): use a better crate for .ply parsing
{ name = "raw-window-handle" }, # Pretty small crate; some crates still on old version
{ name = "redox_syscall" }, # Plenty of versions in the wild
{ name = "spin" }, # Old version used by rusttls
]
skip-tree = [
{ name = "async-io" }, # Old version via rfd
{ name = "cargo-run-wasm" }, # Dev-tool
{ name = "criterion" }, # dev-dependency
{ name = "objc2" }, # old version via accesskit
{ name = "prost-build" }, # only used in objectron example
{ name = "prost-derive" }, # only used in objectron example
{ name = "quick-xml" }, # Old version via accesskit
{ name = "toml_edit" }, # Old version via egui-winit, newer used by rustdoc-json
{ name = "windows" }, # Old version used by accesskit_windows, newer version used by wgpu
{ name = "tower" }, # tonic depends on 0.4.3, but also transitively (axum) on 0.5.1
{ name = "walkers" }, # TODO(#7876): suppress that when `walkers` is updated
{ name = "windows" }, # Old version used by accesskit_windows, newer version used by wgpu
{ name = "zbus" }, # Old version via rfd
]


Expand Down
6 changes: 3 additions & 3 deletions examples/rust/objectron/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ rerun = { path = "../../../crates/top/rerun", features = [
anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
glam = "0.28"
prost = "0.12"
prost = "0.13"


[build-dependencies]
re_build_tools = { path = "../../../crates/build/re_build_tools" }
prost-build = "0.12"
protoc-prebuilt = "0.2"
prost-build = "0.13"
protoc-prebuilt = "0.3"
Loading

0 comments on commit 6624898

Please sign in to comment.