Skip to content

Commit

Permalink
build(deps): update zerocopy requirement from 0.7 to 0.8
Browse files Browse the repository at this point in the history
Updates the requirements on [zerocopy](https://github.com/google/zerocopy) to permit the latest version.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](google/zerocopy@v0.7.0...v0.8.2)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: direct:production
...

Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Oct 11, 2024
1 parent a7d56ee commit 0a14c4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ log = { version = "0.4" } #, features = ["kv_unstable"]}
simple_logger = { version = "5.0", default-features = false }
# FIXME: remove `gc` feature once upgraded to wasmtime 25:
wasmtime = { version = "24.0", default-features = false, features = ["std", "gc", "runtime", "cranelift", "threads", "parallel-compilation"] } #"pooling-allocator", "incremental-cache", "wat", "gc", "component-model"] }
zerocopy = { version = "0.7", default-features = false, features = ["alloc", "derive", "simd-nightly"] }
zerocopy = { version = "0.8", default-features = false, features = ["alloc", "derive", "simd-nightly"] }

[target.'cfg(target_os = "hermit")'.dependencies]
hermit = { path = "../../hermit", default-features = false, features = ["acpi", "pci", "fsgsbase", "fs", "tcp", "dhcpv4", "mmap"] }
Expand Down
14 changes: 7 additions & 7 deletions examples/wasmtime/src/preview1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use bitflags::bitflags;
use log::debug;
use wasi::*;
use wasmtime::{AsContext, AsContextMut, Caller, Extern};
use zerocopy::AsBytes;
use zerocopy::{Immutable, IntoBytes, KnownLayout};

static FD: Mutex<Vec<Descriptor>> = Mutex::new(Vec::new());

Expand Down Expand Up @@ -74,7 +74,7 @@ const SOCKET_STREAM: u8 = 1 << 5;
/// The file refers to a symbolic link inode.
const SYMBOLIC_LINK: u8 = 1 << 6;

#[derive(Debug, Copy, Clone, Default, AsBytes)]
#[derive(Debug, Copy, Clone, Default, IntoBytes, KnownLayout, Immutable)]
#[repr(C)]
pub(crate) struct FileStat {
pub dev: u64,
Expand All @@ -90,7 +90,7 @@ pub(crate) struct FileStat {
pub ctim: u64,
}

#[derive(Debug, Copy, Clone, Default, AsBytes)]
#[derive(Debug, Copy, Clone, Default, IntoBytes, KnownLayout, Immutable)]
#[repr(C)]
pub(crate) struct FdStat {
pub filetype: u8,
Expand Down Expand Up @@ -191,7 +191,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
let _ = mem.read(
caller.as_context_mut(),
path_ptr.try_into().unwrap(),
path.as_bytes_mut(),
path.as_mut_bytes(),
);
let path = "/".to_owned() + std::str::from_utf8(&path).unwrap();

Expand Down Expand Up @@ -250,7 +250,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
let _ = mem.read(
caller.as_context_mut(),
path_ptr.try_into().unwrap(),
path.as_bytes_mut(),
path.as_mut_bytes(),
);

let path = "/".to_owned() + std::str::from_utf8(&path).unwrap();
Expand Down Expand Up @@ -469,7 +469,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
let _ = mem.read(
caller.as_context(),
iovs_ptr.try_into().unwrap(),
iovs.as_bytes_mut(),
iovs.as_mut_bytes(),
);

let mut nread_bytes: i32 = 0;
Expand Down Expand Up @@ -594,7 +594,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
let _ = mem.read(
caller.as_context(),
iovs_ptr.try_into().unwrap(),
iovs.as_bytes_mut(),
iovs.as_mut_bytes(),
);

let mut nwritten_bytes: i32 = 0;
Expand Down

0 comments on commit 0a14c4a

Please sign in to comment.