@@ -118,13 +118,14 @@ rr_event! {
118118 ComponentBuiltinReturn ( __component_events:: BuiltinReturnEvent ) ,
119119
120120 // OPTIONAL events for replay validation
121- //
122- // ReallocReturn is optional because we can assume the realloc is deterministic
123- // and the error message is subsumed by the containing LowerReturn/LowerStoreReturn
124121
125122 /// Return from a Wasm component function back to host
126123 ComponentWasmFuncReturn ( __component_events:: WasmFuncReturnEvent ) ,
127124 /// Return from Component ABI realloc call
125+ ///
126+ /// Since realloc is deterministic, ReallocReturn is optional.
127+ /// Any error is subsumed by the containing LowerReturn/LowerStoreReturn
128+ /// that triggered realloc
128129 ComponentReallocReturn ( __component_events:: ReallocReturnEvent ) ,
129130 /// Call into host function from component
130131 ComponentHostFuncEntry ( __component_events:: HostFuncEntryEvent ) ,
@@ -193,7 +194,7 @@ impl From<EventActionError> for ReplayError {
193194/// This trait provides the interface for a FIFO recorder
194195pub trait Recorder {
195196 /// Construct a recorder with the writer backend
196- fn new_recorder ( writer : Box < dyn RecordWriter > , settings : RecordSettings ) -> Result < Self >
197+ fn new_recorder ( writer : impl RecordWriter + ' static , settings : RecordSettings ) -> Result < Self >
197198 where
198199 Self : Sized ;
199200
@@ -242,19 +243,9 @@ pub trait Replayer: Iterator<Item = RREvent> {
242243 Self : Sized ;
243244
244245 /// Get settings associated with the replay process
245- #[ allow(
246- unused,
247- reason = "currently used only for validation resulting in \
248- many unnecessary feature gates. will expand in the future to more features and this attribute can be removed"
249- ) ]
250246 fn settings ( & self ) -> & ReplaySettings ;
251247
252248 /// Get the settings (embedded within the trace) during recording
253- #[ allow(
254- unused,
255- reason = "currently used only for validation resulting in \
256- many unnecessary feature gates. will expand in the future to more features and this attribute can be removed"
257- ) ]
258249 fn trace_settings ( & self ) -> & RecordSettings ;
259250
260251 // Provided Methods
@@ -364,13 +355,16 @@ impl Drop for RecordBuffer {
364355}
365356
366357impl Recorder for RecordBuffer {
367- fn new_recorder ( mut writer : Box < dyn RecordWriter > , settings : RecordSettings ) -> Result < Self > {
358+ fn new_recorder (
359+ mut writer : impl RecordWriter + ' static ,
360+ settings : RecordSettings ,
361+ ) -> Result < Self > {
368362 // Replay requires the Module version and record settings
369363 io:: to_record_writer ( ModuleVersionStrategy :: WasmtimeVersion . as_str ( ) , & mut writer) ?;
370364 io:: to_record_writer ( & settings, & mut writer) ?;
371365 Ok ( RecordBuffer {
372366 buf : Vec :: new ( ) ,
373- writer : writer,
367+ writer : Box :: new ( writer) ,
374368 settings : settings,
375369 } )
376370 }
@@ -405,18 +399,8 @@ pub struct ReplayBuffer {
405399 /// Reader to read replay trace from
406400 reader : Box < dyn ReplayReader > ,
407401 /// Settings in replay configuration
408- #[ allow(
409- unused,
410- reason = "currently used only for validation resulting in \
411- many unnecessary feature gates. will expand in the future to more features and this attribute can be removed"
412- ) ]
413402 settings : ReplaySettings ,
414403 /// Settings for record configuration (encoded in the trace)
415- #[ allow(
416- unused,
417- reason = "currently used only for validation resulting in \
418- many unnecessary feature gates. will expand in the future to more features and this attribute can be removed"
419- ) ]
420404 trace_settings : RecordSettings ,
421405 /// Intermediate static buffer for deserialization
422406 deser_buffer : Vec < u8 > ,
@@ -454,7 +438,8 @@ impl Drop for ReplayBuffer {
454438 if let RREvent :: Eof = event {
455439 } else {
456440 log:: warn!(
457- "Replay buffer is dropped with {} remaining events, and is likely an invalid execution" ,
441+ "Replay buffer is dropped with {} remaining events,
442+ and is likely an invalid/incomplete execution" ,
458443 self . count( )
459444 ) ;
460445 }
0 commit comments