Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rust] bumps wasmtime crate to v18 #443

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 79 additions & 127 deletions rust/Cargo.lock

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions rust/deny.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = ["RUSTSEC-2020-0168"]

[licenses]
unlicensed = "deny"
allow = [
"0BSD",
"Apache-2.0",
Expand All @@ -21,10 +17,6 @@ allow = [
"MPL-2.0",
"Unicode-DFS-2016",
]
deny = []
copyleft = "warn"
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8

[licenses.private]
Expand Down
6 changes: 3 additions & 3 deletions rust/plugin_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ notify = { version = "6", default-features = false, features = [
parking_lot = "0.12"
tracing = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = "0.3"
wasmtime = { version = "17", default-features = false, features = [
wasmtime = { version = "18", default-features = false, features = [
"cranelift",
] }
wasmtime-wasi = { version = "17" }
wasmtime-wasi = { version = "18" }
wasi-common = { version = "18" }
walkdir = "2"
zerocopy = "0.7"

Expand All @@ -30,7 +31,6 @@ rand = "0.8"
pretty_assertions = "1"
assert_matches = "1"
async-trait = { version = "0.1" }
wasi-common = { version = "17" }
futures = { version = "0.3" }

[lib]
Expand Down
3 changes: 2 additions & 1 deletion rust/plugin_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use core::slice;
use std::mem::size_of;

use anyhow::Result;
use wasi_common::WasiCtx;
use wasmtime::{AsContextMut, Instance, Memory, TypedFunc};
use zerocopy::AsBytes;

Expand Down Expand Up @@ -49,7 +50,7 @@ pub(crate) type OpaquePtr = u32;
pub(crate) type ByteArray = u32;
pub(crate) type SizePtr = u32;
pub(crate) type StatusPtr = u32;
type Store = wasmtime::Store<wasmtime_wasi::WasiCtx>;
type Store = wasmtime::Store<WasiCtx>;

fn notify_export_function_error(name: &str) {
tracing::warn!(
Expand Down
2 changes: 1 addition & 1 deletion rust/plugin_wasm/src/model/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use std::path::{Path, PathBuf};

use anyhow::Result;
use wasi_common::WasiCtx;
use wasmtime::{AsContextMut, Instance, Linker, Module};
use wasmtime_wasi::WasiCtx;

use crate::{
inner_count_all_functions, inner_create_opaque, inner_destroy_opaque, inner_execute,
Expand Down
2 changes: 1 addition & 1 deletion rust/plugin_wasm/src/model/test/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use assert_matches::assert_matches;
use maplit::hashmap;
use pretty_assertions::assert_eq;
use serde_json::json;
use wasmtime_wasi::WasiFile;
use wasi_common::WasiFile;

use crate::model::{
controller::ModelIOPluginController,
Expand Down
4 changes: 2 additions & 2 deletions rust/plugin_wasm/src/model/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ use serde_derive::{Deserialize, Serialize};
use serde_json::Value;
use wasi_common::{
file::{FileType, Filestat},
snapshots::preview_1::types::Error,
snapshots::preview_1::types::Error, WasiFile,
};
use wasmtime::{Engine, Linker};
use wasmtime_wasi::{WasiCtxBuilder, WasiFile};
use wasmtime_wasi::WasiCtxBuilder;

use crate::Store;

Expand Down
2 changes: 1 addition & 1 deletion rust/plugin_wasm/src/motion/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use std::{
};

use anyhow::Result;
use wasi_common::WasiCtx;
use wasmtime::{AsContextMut, Instance, Linker, Module};
use wasmtime_wasi::WasiCtx;

use crate::{
allocate_byte_array_with_data, allocate_status_ptr, inner_count_all_functions,
Expand Down
4 changes: 2 additions & 2 deletions rust/plugin_wasm/src/motion/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ use serde_derive::{Deserialize, Serialize};
use serde_json::Value;
use wasi_common::{
file::{FileType, Filestat},
snapshots::preview_1::types::Error,
snapshots::preview_1::types::Error, WasiFile,
};
use wasmtime::{Engine, Linker};
use wasmtime_wasi::{WasiCtxBuilder, WasiFile};
use wasmtime_wasi::WasiCtxBuilder;

use crate::{motion::controller::MotionIOPluginController, Store};

Expand Down