Skip to content

Commit dfd1f87

Browse files
committed
Move crimp crate back into wasmtime
1 parent 83fb223 commit dfd1f87

File tree

11 files changed

+18
-73
lines changed

11 files changed

+18
-73
lines changed

Cargo.lock

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ wiggle-generate = { path = "crates/wiggle/generate", version = "=40.0.0" }
283283
wasi-common = { path = "crates/wasi-common", version = "=40.0.0", default-features = false }
284284
pulley-interpreter = { path = 'pulley', version = "=40.0.0" }
285285
pulley-macros = { path = 'pulley/macros', version = "=40.0.0" }
286-
wasm-crimp = { path = "crates/wasm-crimp", version = "=40.0.0" }
287286

288287
# Cranelift crates in this workspace
289288
cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.127.0" }

crates/wasm-crimp/Cargo.toml

Lines changed: 0 additions & 28 deletions
This file was deleted.

crates/wasmtime/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ wasmtime-slab = { workspace = true, optional = true }
3131
wasmtime-versioned-export-macros = { workspace = true }
3232
wasmtime-wmemcheck = { workspace = true, optional = true }
3333
wasmtime-math = { workspace = true }
34-
wasm-crimp = { workspace = true, optional = true }
3534
pulley-interpreter = { workspace = true }
3635
target-lexicon = { workspace = true }
3736
wasmparser = { workspace = true }
@@ -347,7 +346,6 @@ std = [
347346
"dep:rustix",
348347
"wasmtime-jit-icache-coherence",
349348
"wasmtime-jit-debug?/std",
350-
"wasm-crimp?/std"
351349
]
352350

353351
# Enables support for the `Store::call_hook` API which enables injecting custom
@@ -429,7 +427,4 @@ debug = [
429427
compile-time-builtins = ['dep:wasm-compose', 'dep:tempfile']
430428

431429
# Enable support for the common base infrastructure of record/replay
432-
rr = [
433-
"dep:wasm-crimp",
434-
"component-model"
435-
]
430+
rr = ["component-model"]

crates/wasmtime/src/runtime/rr/backend.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ use crate::store::InstanceId;
55
use crate::{AsContextMut, ModuleVersionStrategy, Val, ValRaw, ValType};
66
use wasmtime_environ::component::FlatTypesStorage;
77

8-
// Public Re-exports
9-
pub use wasm_crimp::{RecordSettings, RecordWriter, ReplayError, ReplayReader, ReplaySettings};
10-
// Crate-internal re-exports
11-
pub(crate) use wasm_crimp::{
12-
RREvent, RRFuncArgVals, Recorder, Replayer, ResultEvent, Validate, common_events,
8+
mod crimp;
9+
pub use crimp::{
10+
RREvent, RRFuncArgVals, RecordSettings, RecordWriter, Recorder, ReplayError, ReplayReader,
11+
ReplaySettings, Replayer, ResultEvent, Validate, common_events,
1312
component_events::{self, RRComponentInstanceId},
1413
core_events::{self, RRModuleInstanceId},
1514
from_replay_reader, to_record_writer,
@@ -298,10 +297,10 @@ mod tests {
298297
use crate::ValRaw;
299298
use crate::WasmFuncOrigin;
300299
use crate::store::InstanceId;
300+
use crimp::EventError;
301301
use std::fs::File;
302302
use std::path::Path;
303303
use tempfile::{NamedTempFile, TempPath};
304-
use wasm_crimp::EventError;
305304
use wasmtime_environ::{FuncIndex, component::ResourceDropRet};
306305

307306
impl ReplayBuffer {

crates/wasm-crimp/src/lib.rs renamed to crates/wasmtime/src/runtime/rr/backend/crimp.rs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-
#![no_std]
2-
3-
pub(crate) mod prelude {
4-
pub use anyhow::{self, Result};
5-
pub use serde::{Deserialize, Serialize};
6-
pub use wasmtime_environ::prelude::*;
7-
}
1+
//! The CRIMP record-replay interface specification.
82
93
use crate::prelude::*;
10-
pub use core::fmt;
4+
use core::fmt;
115
pub use events::{
126
EventError, RRFuncArgVals, ResultEvent, Validate, common_events,
137
component_events::{self, RRComponentInstanceId},
148
core_events::{self, RRModuleInstanceId},
159
};
1610
pub use io::{RecordWriter, ReplayReader, from_replay_reader, to_record_writer};
17-
// Export necessary environ types for interactions with the crate
18-
pub use wasmtime_environ::{
19-
EntityIndex, FuncIndex, WasmChecksum,
20-
component::{ExportIndex, InterfaceType, ResourceDropRet},
21-
};
11+
use serde::{Deserialize, Serialize};
12+
use wasmtime_environ::{EntityIndex, WasmChecksum};
2213

2314
/// Encapsulation of event types comprising an [`RREvent`] sum type
2415
mod events;

crates/wasm-crimp/src/events.rs renamed to crates/wasmtime/src/runtime/rr/backend/crimp/events.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use crate::{ReplayError, prelude::*};
1+
use super::ReplayError;
2+
use crate::prelude::*;
23
use core::fmt;
4+
use serde::{Deserialize, Serialize};
35

46
/// A serde compatible representation of errors produced during execution
57
/// of certain events

crates/wasm-crimp/src/events/common_events.rs renamed to crates/wasmtime/src/runtime/rr/backend/crimp/events/common_events.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
66
use super::*;
77
use crate::RecordSettings;
8-
use serde::{Deserialize, Serialize};
98

109
/// A call event from Wasm (core or component) into the host
1110
///

crates/wasm-crimp/src/events/component_events.rs renamed to crates/wasmtime/src/runtime/rr/backend/crimp/events/component_events.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//! Module comprising of component model wasm events
22
33
use super::*;
4-
use crate::{ExportIndex, InterfaceType, ResourceDropRet, WasmChecksum};
4+
use wasmtime_environ::WasmChecksum;
5+
use wasmtime_environ::component::{ExportIndex, InterfaceType, ResourceDropRet};
56

67
/// Representation of a component instance identifier during record/replay.
78
///

crates/wasm-crimp/src/events/core_events.rs renamed to crates/wasmtime/src/runtime/rr/backend/crimp/events/core_events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Module comprising of core wasm events
22
use super::*;
3-
use crate::{EntityIndex, FuncIndex, WasmChecksum};
3+
use wasmtime_environ::{EntityIndex, FuncIndex, WasmChecksum};
44

55
/// Representation of a Wasm module instance identifier during record/replay.
66
///

0 commit comments

Comments
 (0)