Skip to content

Commit

Permalink
Update crates zstd and ruzstd (#145)
Browse files Browse the repository at this point in the history
* Update zstd 0.10 -> 0.11

* Update ruzstd 0.2.4 -> 0.3.0

* Clean up deny.toml

* Update egui and puffin
  • Loading branch information
emilk authored Nov 7, 2022
1 parent 029505e commit c9e13ed
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 49 deletions.
41 changes: 21 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ opt-level = 2
debug = true

[patch.crates-io]
# 2022-11-07 - update ahash and arboard
eframe = { git = "https://github.com/emilk/egui", rev = "940b896cbba39eb04757b975f81d9b80e7e198ed" }
egui = { git = "https://github.com/emilk/egui", rev = "940b896cbba39eb04757b975f81d9b80e7e198ed" }
egui_extras = { git = "https://github.com/emilk/egui", rev = "940b896cbba39eb04757b975f81d9b80e7e198ed" }
egui_glow = { git = "https://github.com/emilk/egui", rev = "940b896cbba39eb04757b975f81d9b80e7e198ed" }
egui-wgpu = { git = "https://github.com/emilk/egui", rev = "940b896cbba39eb04757b975f81d9b80e7e198ed" }
# 2022-11-07 - update puffin
eframe = { git = "https://github.com/emilk/egui", rev = "8c76b8caff32e47e4419338e6e0cdf52353cbf2c" }
egui = { git = "https://github.com/emilk/egui", rev = "8c76b8caff32e47e4419338e6e0cdf52353cbf2c" }
egui_extras = { git = "https://github.com/emilk/egui", rev = "8c76b8caff32e47e4419338e6e0cdf52353cbf2c" }
egui_glow = { git = "https://github.com/emilk/egui", rev = "8c76b8caff32e47e4419338e6e0cdf52353cbf2c" }
egui-wgpu = { git = "https://github.com/emilk/egui", rev = "8c76b8caff32e47e4419338e6e0cdf52353cbf2c" }

# eframe = { path = "../../egui/crates/eframe" }
# egui = { path = "../../egui/crates/egui" }
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ thiserror = "1.0"

# Native dependencies:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
puffin = { version = "0.13", optional = true }
puffin = { version = "0.14", optional = true }

[dev-dependencies]
criterion = "0.3"
Expand Down
6 changes: 3 additions & 3 deletions crates/re_log_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ uuid = { version = "1.1", features = ["serde", "v4", "js"] }
anyhow = { version = "1", optional = true }
glam = { version = "0.20", optional = true } # can't update glam until a new version of `macaw` is released
macaw = { version = "0.17", optional = true }
puffin = { version = "0.13", optional = true }
puffin = { version = "0.14", optional = true }
rmp-serde = { version = "1", optional = true }
serde = { version = "1", features = ["derive", "rc"], optional = true }

# Native dependencies:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
zstd = { version = "0.10.0", optional = true } # native only
zstd = { version = "0.11.0", optional = true } # native only

# Web dependencies:
[target.'cfg(target_arch = "wasm32")'.dependencies]
ruzstd = { version = "0.2.4", optional = true } # works on wasm
ruzstd = { version = "0.3.0", optional = true } # works on wasm
10 changes: 5 additions & 5 deletions crates/re_log_types/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ impl<'r, R: std::io::BufRead> Iterator for Decoder<'r, R> {

#[cfg(feature = "load")]
#[cfg(target_arch = "wasm32")]
pub struct Decoder<'r> {
zdecoder: ruzstd::StreamingDecoder<'r>,
pub struct Decoder<R: std::io::Read> {
zdecoder: ruzstd::StreamingDecoder<R>,
buffer: Vec<u8>,
}

#[cfg(feature = "load")]
#[cfg(target_arch = "wasm32")]
impl<'r> Decoder<'r> {
pub fn new(read: &'r mut dyn std::io::Read) -> anyhow::Result<Self> {
impl<R: std::io::Read> Decoder<R> {
pub fn new(mut read: R) -> anyhow::Result<Self> {
crate::profile_function!();
use anyhow::Context as _;

Expand All @@ -127,7 +127,7 @@ impl<'r> Decoder<'r> {

#[cfg(feature = "load")]
#[cfg(target_arch = "wasm32")]
impl<'r> Iterator for Decoder<'r> {
impl<R: std::io::Read> Iterator for Decoder<R> {
type Item = anyhow::Result<LogMsg>;
fn next(&mut self) -> Option<Self::Item> {
crate::profile_function!();
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tobj = { version = "3.2", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
crossbeam = "0.8"
notify = "5.0"
puffin = { version = "0.13", optional = true }
puffin = { version = "0.14", optional = true }
wgpu = { version = "0.14", default-features = false, features = ["wgsl"] }
wgpu-core = "0.14"

Expand Down
4 changes: 2 additions & 2 deletions crates/re_viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ arboard = { version = "3.2", default-features = false, features = [
"image-data",
] }
ctrlc = { version = "3.0", features = ["termination"] }
puffin = { version = "0.13", optional = true }
puffin_http = { version = "0.10", optional = true }
puffin = { version = "0.14", optional = true }
puffin_http = { version = "0.11", optional = true }

# web dependencies:
[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
4 changes: 0 additions & 4 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,6 @@ fn save_database_to_file(
fn load_rrd_to_log_db(mut read: impl std::io::Read) -> anyhow::Result<LogDb> {
crate::profile_function!();

#[cfg(target_arch = "wasm32")]
let decoder = re_log_types::encoding::Decoder::new(&mut read)?;

#[cfg(not(target_arch = "wasm32"))]
let decoder = re_log_types::encoding::Decoder::new(read)?;

let mut log_db = LogDb::default();
Expand Down
4 changes: 2 additions & 2 deletions crates/rerun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ re_ws_comms = { path = "../re_ws_comms", features = ["client"] }

anyhow = "1.0"
document-features = "0.2"
puffin = { version = "0.13" }
puffin = "0.14"

# Optional dependencies:
re_sdk_comms = { path = "../re_sdk_comms", optional = true }
re_web_server = { path = "../re_web_server", optional = true }

puffin_http = { version = "0.10", optional = true }
puffin_http = { version = "0.11", optional = true }
webbrowser = { version = "0.8", optional = true }

# Native dependencies:
Expand Down
9 changes: 4 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ ignore = [
multiple-versions = "deny"
wildcards = "allow" # at least until https://github.com/EmbarkStudios/cargo-deny/issues/241 is fixed
deny = [
{ name = "openssl" }, # prefer rustls
{ name = "openssl-sys" }, # prefer rustls
{ name = "openssl" }, # We prefer rustls
{ name = "openssl-sys" }, # We prefer rustls
]

skip = [
{ name = "ahash" }, # Old version via dark-light
{ name = "miniz_oxide" }, # Old version from old png crate, because we are stuck on old version of image crate
{ name = "nix" }, # Too many to protect against
{ name = "ahash" }, # Old version via dark-light
{ name = "nix" }, # Too many to protect against
]
skip-tree = [
{ name = "criterion" }, # dev-dependency
Expand Down

0 comments on commit c9e13ed

Please sign in to comment.