update veloren deps

This commit is contained in:
Marcel Märtens 2023-05-04 10:44:07 +02:00
parent 4e3eb3ef44
commit 054f4f9453
20 changed files with 1498 additions and 1213 deletions

2576
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ common-net = { package = "veloren-common-net", path = "../common/net" }
network = { package = "veloren-network", path = "../network", features = ["compression","quic"], default-features = false }
byteorder = "1.3.2"
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
tokio = { version = "1.15", default-features = false, features = ["rt-multi-thread"] }
quinn = "0.8"
image = { version = "0.24", default-features = false, features = ["png"] }
num = "0.4"

View File

@ -498,7 +498,7 @@ impl assets::DirLoadable for FindManifests {
let mut specifiers = Vec::new();
let source = cache.source();
let source = cache.raw_source();
source.read_dir(specifier, &mut |entry| {
if let DirEntry::Directory(spec) = entry {
let manifest_spec = [spec, ".", "_manifest"].concat();

View File

@ -30,7 +30,7 @@ enum-map = "2.4"
vek = { version = "0.15.8", features = ["serde"] }
cfg-if = "1.0.0"
chrono = "0.4.22"
chrono-tz = "0.6"
chrono-tz = "0.8"
itertools = "0.10"
sha2 = "0.10"
serde_json = "1.0.50"
@ -71,7 +71,7 @@ structopt = { version = "0.3.13", optional = true }
# graphviz exporters
petgraph = { version = "0.6", optional = true }
# K-d trees used for RRT pathfinding
kiddo = { version = "0.1", optional = true }
kiddo = { version = "0.2", optional = true }
# Data structures
hashbrown = { version = "0.13", features = ["rayon", "serde", "nightly"] }

View File

@ -7,7 +7,7 @@ version = "0.10.0"
[dependencies]
lazy_static = "1.4.0"
assets_manager = {version = "0.9", features = ["bincode", "ron", "json"]}
assets_manager = {version = "0.10", features = ["bincode", "ron", "json"]}
ron = { version = "0.8", default-features = false }
dot_vox = "5.1"
wavefront = "0.2" # TODO: Use vertex-colors branch when we have models that have them

View File

@ -1,8 +1,8 @@
use std::{borrow::Cow, fs, io};
use std::{fs, io};
use assets_manager::{
hot_reloading::{DynUpdateSender, EventSender, FsWatcherBuilder},
source::{DirEntry, FileSystem as RawFs, Source},
source::{DirEntry, FileContent, FileSystem as RawFs, Source},
BoxedError,
};
@ -43,7 +43,7 @@ impl FileSystem {
}
impl Source for FileSystem {
fn read(&self, id: &str, ext: &str) -> io::Result<Cow<[u8]>> {
fn read(&self, id: &str, ext: &str) -> io::Result<FileContent> {
if let Some(dir) = &self.override_dir {
match dir.read(id, ext) {
Ok(content) => return Ok(content),

View File

@ -6,6 +6,6 @@ edition = "2021"
[dependencies]
find_folder = {version = "0.3.0"}
libloading = {version = "0.7"}
libloading = {version = "0.8"}
notify = {version = "5.0.0"}
tracing = "0.1"

View File

@ -234,7 +234,7 @@ impl<const N: u32> VoxelImageEncoding for QuadPngEncoding<N> {
let mut f = |x: &ImageBuffer<_, Vec<u8>>, i| {
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Up,
);
png.write_image(x.as_raw(), x.width(), x.height(), image::ColorType::L8)
@ -249,7 +249,7 @@ impl<const N: u32> VoxelImageEncoding for QuadPngEncoding<N> {
{
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Sub,
);
png.write_image(
@ -510,7 +510,7 @@ impl<const AVERAGE_PALETTE: bool> VoxelImageEncoding for TriPngEncoding<AVERAGE_
let mut f = |x: &ImageBuffer<_, Vec<u8>>, i| {
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Up,
);
png.write_image(x.as_raw(), x.width(), x.height(), image::ColorType::L8)

View File

@ -30,7 +30,7 @@ specs = { version = "0.18", features = ["serde", "storage-event-control", "deriv
# Plugins
scopeguard = "1.1.0"
serde = { version = "1.0.110", features = ["derive"], optional = true }
toml = { version = "0.5.7", optional = true }
toml = { version = "0.7", optional = true }
tar = { version = "0.4.37", optional = true }
wasmer = { version = "2.0.0", optional = true, default-features = false, features = ["wat", "default-cranelift", "default-universal"] }
bincode = { version = "1.3.1", optional = true }

View File

@ -3,6 +3,7 @@ pub mod memory_manager;
pub mod module;
pub mod wasm_env;
use bincode::ErrorKind;
use common::assets::ASSETS_PATH;
use serde::{Deserialize, Serialize};
use std::{
@ -57,10 +58,13 @@ impl Plugin {
.collect::<Result<HashMap<_, _>, _>>()
.map_err(PluginError::Io)?;
let data = toml::de::from_slice::<PluginData>(
files
.get(Path::new("plugin.toml"))
.ok_or(PluginError::NoConfig)?,
let data = toml::de::from_str::<PluginData>(
std::str::from_utf8(
files
.get(Path::new("plugin.toml"))
.ok_or(PluginError::NoConfig)?,
)
.map_err(|e| PluginError::Encoding(Box::new(ErrorKind::InvalidUtf8Encoding(e))))?,
)
.map_err(PluginError::Toml)?;

View File

@ -21,10 +21,10 @@ network-protocol = { package = "veloren-network-protocol", path = "protocol" }
bincode = "1.3.2"
serde = { version = "1.0" }
#ipv4/ipv6 behavior
socket2 = "0.4.4"
socket2 = "0.5.2"
#sending
crossbeam-channel = "0.5"
tokio = { version = "1.14", default-features = false, features = ["io-util", "macros", "rt", "net", "time"] }
tokio = { version = "1.15", default-features = false, features = ["io-util", "macros", "rt", "net", "time"] }
tokio-stream = { version = "0.1.2", default-features = false }
#tracing and metrics
tracing = { version = "0.1", default-features = false, features = ["attributes"]}
@ -50,15 +50,15 @@ hashbrown = { version = "0.13" }
[dev-dependencies]
tracing-subscriber = { version = "0.3.7", default-features = false, features = ["env-filter", "fmt", "time", "ansi", "smallvec"] }
tokio = { version = "1.14", default-features = false, features = ["io-std", "fs", "rt-multi-thread"] }
tokio = { version = "1.15", default-features = false, features = ["io-std", "fs", "rt-multi-thread"] }
futures-util = { version = "0.3.7", default-features = false, features = ["sink", "std"] }
clap = { version = "3.1.8", default-features = false, features = ["std", "color", "suggestions"] }
shellexpand = "2.0.0"
shellexpand = "3.1.0"
serde = { version = "1.0", features = ["derive"] }
prometheus-hyper = "0.1.2"
criterion = { version = "0.3.4", features = ["default", "async_tokio"] }
#quic
rcgen = { version = "0.9"}
rcgen = { version = "0.10"}
[[bench]]
name = "speed"

View File

@ -19,7 +19,7 @@ default = ["metrics"]
tracing = { version = "0.1", default-features = false }
prometheus = { version = "0.13", default-features = false, optional = true }
#stream flags
bitflags = "1.2.1"
bitflags = "2.2.1"
rand = { version = "0.8" }
# async traits
async-trait = "0.1.42"
@ -28,7 +28,7 @@ hashbrown = { version = "0.13" }
[dev-dependencies]
async-channel = "1.5.1"
tokio = { version = "1.14", default-features = false, features = ["rt", "macros"] }
tokio = { version = "1.15", default-features = false, features = ["rt", "macros"] }
criterion = { version = "0.3.4", features = ["default", "async_tokio"] }
[[bench]]

View File

@ -24,6 +24,7 @@ bitflags! {
/// see the consts in this `struct` for
///
/// [`Streams`]: crate::api::Stream
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct Promises: u8 {
/// this will guarantee that the order of messages which are send on one side,
/// is the same when received on the other.
@ -44,7 +45,7 @@ bitflags! {
}
impl Promises {
pub const fn to_le_bytes(self) -> [u8; 1] { self.bits.to_le_bytes() }
pub const fn to_le_bytes(self) -> [u8; 1] { self.bits().to_le_bytes() }
}
pub(crate) const VELOREN_MAGIC_NUMBER: [u8; 7] = *b"VELOREN";

View File

@ -35,7 +35,7 @@ common-net = { package = "veloren-common-net", path = "../common/net" }
common-frontend = { package = "veloren-common-frontend", path = "../common/frontend" }
world = { package = "veloren-world", path = "../world", optional = true }
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
tokio = { version = "1.15", default-features = false, features = ["rt-multi-thread"] }
num_cpus = "1.0"
cansi = "2.2.1"
clap = { version = "3.1.8", features = ["derive"] }

View File

@ -38,14 +38,14 @@ num_cpus = "1.0"
tracing = "0.1"
vek = { version = "0.15.8", features = ["serde"] }
futures-util = "0.3.7"
tokio = { version = "1.14", default-features = false, features = ["rt"] }
tokio = { version = "1.15", default-features = false, features = ["rt"] }
prometheus-hyper = "0.1.4"
quinn = "0.8"
rustls = { version = "0.20", default-features = false }
rustls-pemfile = { version = "1", default-features = false }
atomicwrites = "0.3.0"
chrono = { version = "0.4.22", features = ["serde"] }
chrono-tz = { version = "0.6", features = ["serde"] }
chrono-tz = { version = "0.8", features = ["serde"] }
drop_guard = { version = "0.3.0" }
humantime = "2.1.0"
itertools = "0.10"

View File

@ -952,24 +952,43 @@ fn handle_time(
};
let time = parse_cmd_args!(args, String);
const EMSG: &str = "time always valid";
let new_time = match time.as_deref() {
Some("midnight") => {
next_cycle(NaiveTime::from_hms(0, 0, 0).num_seconds_from_midnight() as f64)
},
Some("night") => {
next_cycle(NaiveTime::from_hms(20, 0, 0).num_seconds_from_midnight() as f64)
},
Some("dawn") => next_cycle(NaiveTime::from_hms(5, 0, 0).num_seconds_from_midnight() as f64),
Some("morning") => {
next_cycle(NaiveTime::from_hms(8, 0, 0).num_seconds_from_midnight() as f64)
},
Some("day") => next_cycle(NaiveTime::from_hms(10, 0, 0).num_seconds_from_midnight() as f64),
Some("noon") => {
next_cycle(NaiveTime::from_hms(12, 0, 0).num_seconds_from_midnight() as f64)
},
Some("dusk") => {
next_cycle(NaiveTime::from_hms(17, 0, 0).num_seconds_from_midnight() as f64)
},
Some("midnight") => next_cycle(
NaiveTime::from_hms_opt(0, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("night") => next_cycle(
NaiveTime::from_hms_opt(20, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("dawn") => next_cycle(
NaiveTime::from_hms_opt(5, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("morning") => next_cycle(
NaiveTime::from_hms_opt(8, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("day") => next_cycle(
NaiveTime::from_hms_opt(10, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("noon") => next_cycle(
NaiveTime::from_hms_opt(12, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some("dusk") => next_cycle(
NaiveTime::from_hms_opt(17, 0, 0)
.expect(EMSG)
.num_seconds_from_midnight() as f64,
),
Some(n) => match n.parse::<f64>() {
Ok(n) => {
if n < 0.0 {

View File

@ -99,11 +99,11 @@ server = { package = "veloren-server", path = "../server", optional = true, defa
clap = { version = "3.2.20", features = ["derive"] }
# Utility
assets_manager = {version = "0.9", features = ["ab_glyph"]}
assets_manager = {version = "0.10", features = ["ab_glyph"]}
backtrace = "0.3.40"
bincode = "1.3.1"
chrono = { version = "0.4.22", features = ["serde"] }
chumsky = "0.8"
chumsky = "0.9"
cpal = "0.14"
copy_dir = "0.1.2"
crossbeam-utils = "0.8.1"
@ -130,7 +130,7 @@ slab = "0.4.2"
strum = { version = "0.24", features = ["derive"] }
tracing = "0.1"
treeculler = "0.2"
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
tokio = { version = "1.15", default-features = false, features = ["rt-multi-thread"] }
num_cpus = "1.0"
inline_tweak = "1.0.2"
itertools = "0.10.0"

View File

@ -2666,11 +2666,12 @@ impl Hud {
.set(self.ids.loaded_distance, ui_widgets);
// Time
let time_in_seconds = client.state().get_time_of_day();
let current_time = NaiveTime::from_num_seconds_from_midnight(
let current_time = NaiveTime::from_num_seconds_from_midnight_opt(
// Wraps around back to 0s if it exceeds 24 hours (24 hours = 86400s)
(time_in_seconds as u64 % 86400) as u32,
0,
);
)
.expect("time always valid");
Text::new(&format!("Time: {}", current_time.format("%H:%M")))
.color(TEXT_COLOR)
.down_from(self.ids.loaded_distance, V_PAD)

View File

@ -34,7 +34,7 @@ lazy_static = "1.4.0"
tracing = { version = "0.1", default-features = false }
rand = "0.8"
rand_chacha = "0.3"
arr_macro = "0.1.2"
arr_macro = "0.2.1"
packed_simd = { package = "packed_simd_2", version = "0.3.8", optional = true }
rayon = "1.5"
serde = { version = "1.0.110", features = ["derive"] }
@ -49,7 +49,7 @@ deflate = { version = "1.0.0", optional = true }
flate2 = { version = "1.0.20", optional = true }
num-traits = { version = "0.2", optional = true }
fallible-iterator = { version = "0.2.0", optional = true }
rstar = { version = "0.9", optional = true }
rstar = { version = "0.10", optional = true }
clap = { version = "3.1.8", optional = true }

View File

@ -197,7 +197,7 @@ impl VoxelImageEncoding for PngEncoding {
let mut buf = Vec::new();
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Up,
);
png.write_image(
@ -297,7 +297,7 @@ impl VoxelImageEncoding for MixedEncoding {
let mut f = |x: &ImageBuffer<_, Vec<u8>>, i| {
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Up,
);
png.write_image(x.as_raw(), x.width(), x.height(), image::ColorType::L8)
@ -634,7 +634,7 @@ impl<'a, NN: NearestNeighbor, const N: u32> VoxelImageEncoding for PaletteEncodi
let mut f = |x: &ImageBuffer<_, Vec<u8>>, i| {
let png = image::codecs::png::PngEncoder::new_with_quality(
&mut buf,
CompressionType::Rle,
CompressionType::Fast,
FilterType::Up,
);
png.write_image(x.as_raw(), x.width(), x.height(), image::ColorType::L8)