Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Systemcluster committed Nov 21, 2023
1 parent 65732fa commit 211a38d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .rustfmt.toml
Expand Up @@ -6,7 +6,7 @@ blank_lines_lower_bound = 0
blank_lines_upper_bound = 2
brace_style = "PreferSameLine"
enum_discrim_align_threshold = 32
fn_args_layout = "Compressed"
fn_params_layout = "Compressed"
fn_single_line = true
format_code_in_doc_comments = true
imports_granularity = "Crate"
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Expand Up @@ -44,23 +44,23 @@ strip = "symbols"

[dependencies]

staticfilemap = { version = "0.6.1", default-features = false, features = ["zstd", "multithread"] }
staticfilemap = { version = "0.7.0", default-features = false, features = ["zstd", "multithread"] }
editpe = { version = "0.1.0", default-features = false }

clap = { version = "4.3.10", features = ["std", "color", "suggestions", "derive", "unicode", "wrap_help"] }
color-backtrace = "0.5.1"
clap = { version = "4.4.8", features = ["std", "color", "suggestions", "derive", "unicode", "wrap_help"] }
color-backtrace = "0.6.1"
console = "0.15.7"
indicatif = "0.17.5"
indicatif = "0.17.7"
jwalk = "0.8.1"
num_cpus = "1.16.0"
path-slash = "0.2.1"
rand = "0.8.5"
rayon = "1.7.0"
sysinfo = "0.29.4"
rayon = "1.8.0"
sysinfo = "0.29.10"
twox-hash = { version = "1.6.3", default-features = false }
zerocopy = "0.6.1"
zstd = { version = "0.12.3", default-features = false, features = ["arrays", "zstdmt"] }
zerocopy = "0.7.26"
zstd = { version = "0.13.0", default-features = false, features = ["arrays", "zstdmt"] }

[build-dependencies]
jwalk = "0.8.1"
which = "4.4.0"
which = "5.0.0"
10 changes: 5 additions & 5 deletions startpe/Cargo.toml
Expand Up @@ -18,13 +18,13 @@ path = "src/main.rs"
[dependencies]

dirs = "5.0.1"
filetime = "0.2.21"
filetime = "0.2.22"
fslock = "0.2.1"
memmap2 = "0.7.1"
rayon = "1.7.0"
memmap2 = "0.9.0"
rayon = "1.8.0"
twox-hash = { version = "1.6.3", default-features = false }
zerocopy = "0.6.1"
zstd = { version = "0.12.3", default-features = false, features = ["arrays"] }
zerocopy = { version = "0.7.26", features = ["derive"] }
zstd = { version = "0.13.0", default-features = false, features = ["arrays"] }

[target.'cfg(windows)'.dependencies]

Expand Down
10 changes: 5 additions & 5 deletions startpe/src/decompress.rs
Expand Up @@ -12,7 +12,7 @@ use filetime::{set_file_times, set_symlink_file_times, FileTime};
use fslock::LockFile;
use rayon::prelude::*;
use twox_hash::XxHash64;
use zerocopy::LayoutVerified;
use zerocopy::Ref;
use zstd::stream::copy_decode;

use crate::types::*;
Expand Down Expand Up @@ -54,7 +54,7 @@ pub fn decompress(
) -> bool {
// read payload header sections
let payload_header_start = mmap.len() - size_of::<PayloadHeader>();
let payload_header = LayoutVerified::<_, PayloadHeader>::new(&mmap[payload_header_start..])
let payload_header = Ref::<_, PayloadHeader>::new(&mmap[payload_header_start..])
.expect("couldn't read payload header")
.into_ref();

Expand Down Expand Up @@ -94,7 +94,7 @@ pub fn decompress(
|mut directories, (i, section)| {
let section_start = directory_sections_start + i * size_of::<DirectorySection>();
section_hasher.write(section);
let section = LayoutVerified::<_, DirectorySection>::new(
let section = Ref::<_, DirectorySection>::new(
&mmap[section_start..section_start + size_of::<DirectorySection>()],
)
.expect("couldn't read payload header")
Expand All @@ -121,7 +121,7 @@ pub fn decompress(
.map(|(i, section)| {
let section_start = file_sections_start + i * size_of::<FileSectionHeader>();
section_hasher.write(section);
let section = LayoutVerified::<_, FileSectionHeader>::new(
let section = Ref::<_, FileSectionHeader>::new(
&mmap[section_start..section_start + size_of::<FileSectionHeader>()],
)
.expect("couldn't read payload header")
Expand All @@ -145,7 +145,7 @@ pub fn decompress(
.map(|(i, section)| {
let section_start = symlink_sections_start + i * size_of::<SymlinkSection>();
section_hasher.write(section);
let section = LayoutVerified::<_, SymlinkSection>::new(
let section = Ref::<_, SymlinkSection>::new(
&mmap[section_start..section_start + size_of::<SymlinkSection>()],
)
.expect("couldn't read payload header")
Expand Down
4 changes: 2 additions & 2 deletions startpe/src/main.rs
Expand Up @@ -18,7 +18,7 @@ use std::time::SystemTime;
use winapi::um::wincon::{AttachConsole, ATTACH_PARENT_PROCESS};

use memmap2::MmapOptions;
use zerocopy::LayoutVerified;
use zerocopy::Ref;

mod types;
use types::*;
Expand Down Expand Up @@ -67,7 +67,7 @@ fn main() {
let end = mmap.len();

let info_start = end - size_of::<StarterInfo>();
let info = LayoutVerified::<_, StarterInfo>::new(&mmap[info_start..end])
let info = Ref::<_, StarterInfo>::new(&mmap[info_start..end])
.expect("couldn't read starter info")
.into_ref();

Expand Down
12 changes: 6 additions & 6 deletions startpe/src/types.rs
@@ -1,11 +1,11 @@
pub use zerocopy::FromBytes;
pub use zerocopy::{FromBytes, FromZeroes};

pub const WRAPPE_FORMAT: u8 = 201;
pub const NAME_SIZE: usize = 128;
pub const ARGS_SIZE: usize = 512;

#[repr(C, packed)]
#[derive(FromBytes)]
#[derive(FromBytes, FromZeroes)]
pub struct StarterInfo {
pub signature: [u8; 8],
pub show_console: u8,
Expand All @@ -22,7 +22,7 @@ pub struct StarterInfo {
}

#[repr(C, packed)]
#[derive(FromBytes)]
#[derive(FromBytes, FromZeroes)]
pub struct PayloadHeader {
pub kind: u8,
pub directory_sections: usize,
Expand All @@ -37,13 +37,13 @@ impl PayloadHeader {
}
}
#[repr(C, packed)]
#[derive(FromBytes)]
#[derive(FromBytes, FromZeroes)]
pub struct DirectorySection {
pub name: [u8; NAME_SIZE],
pub parent: u32,
}
#[repr(C, packed)]
#[derive(FromBytes)]
#[derive(FromBytes, FromZeroes)]
pub struct FileSectionHeader {
pub position: u64,
pub size: u64,
Expand All @@ -59,7 +59,7 @@ pub struct FileSectionHeader {
pub readonly: u8,
}
#[repr(C, packed)]
#[derive(FromBytes)]
#[derive(FromBytes, FromZeroes)]
pub struct SymlinkSection {
pub name: [u8; NAME_SIZE],
pub parent: u32,
Expand Down

0 comments on commit 211a38d

Please sign in to comment.