@@ -2,17 +2,13 @@ use crate::config::ModuleVersionStrategy;
22use crate :: prelude:: * ;
33use core:: fmt;
44use events:: EventError ;
5+ pub use events:: {
6+ RRFuncArgVals , ResultEvent , Validate , common_events, component_events, core_events,
7+ marker_events,
8+ } ;
9+ pub use io:: { IOError , RecordWriter , ReplayReader } ;
510use serde:: { Deserialize , Serialize } ;
611use wasmtime_environ:: { EntityIndex , WasmChecksum } ;
7- // Use component events internally even without feature flags enabled
8- // so that [`RREvent`] has a well-defined serialization format, but export
9- // it for other modules only when enabled
10- pub use events:: Validate ;
11- #[ cfg( rr_component) ]
12- pub use events:: component_events;
13- use events:: component_events as __component_events;
14- pub use events:: { RRFuncArgVals , ResultEvent , common_events, core_events, marker_events} ;
15- pub use io:: { IOError , RecordWriter , ReplayReader } ;
1612
1713/// Settings for execution recording.
1814#[ derive( Debug , Clone , Serialize , Deserialize ) ]
@@ -141,23 +137,23 @@ rr_event! {
141137 ///
142138 /// This is distinguished from `ComponentWasmFuncEntry` as there may
143139 /// be multiple lowering steps before actually entering the Wasm function
144- ComponentWasmFuncBegin ( __component_events :: WasmFuncBeginEvent ) ,
140+ ComponentWasmFuncBegin ( component_events :: WasmFuncBeginEvent ) ,
145141 /// Entry from the host into the Wasm component function
146- ComponentWasmFuncEntry ( __component_events :: WasmFuncEntryEvent ) ,
142+ ComponentWasmFuncEntry ( component_events :: WasmFuncEntryEvent ) ,
147143 /// Instantiation of a component
148- ComponentInstantiation ( __component_events :: InstantiationEvent ) ,
144+ ComponentInstantiation ( component_events :: InstantiationEvent ) ,
149145 /// Component ABI realloc call in linear wasm memory
150- ComponentReallocEntry ( __component_events :: ReallocEntryEvent ) ,
146+ ComponentReallocEntry ( component_events :: ReallocEntryEvent ) ,
151147 /// Return from a type lowering operation
152- ComponentLowerFlatReturn ( __component_events :: LowerFlatReturnEvent ) ,
148+ ComponentLowerFlatReturn ( component_events :: LowerFlatReturnEvent ) ,
153149 /// Return from a store during a type lowering operation
154- ComponentLowerMemoryReturn ( __component_events :: LowerMemoryReturnEvent ) ,
150+ ComponentLowerMemoryReturn ( component_events :: LowerMemoryReturnEvent ) ,
155151 /// An attempt to obtain a mutable slice into Wasm linear memory
156- ComponentMemorySliceWrite ( __component_events :: MemorySliceWriteEvent ) ,
152+ ComponentMemorySliceWrite ( component_events :: MemorySliceWriteEvent ) ,
157153 /// Return from a component builtin
158- ComponentBuiltinReturn ( __component_events :: BuiltinReturnEvent ) ,
154+ ComponentBuiltinReturn ( component_events :: BuiltinReturnEvent ) ,
159155 /// Call to `post_return` (after the function call)
160- ComponentPostReturn ( __component_events :: PostReturnEvent ) ,
156+ ComponentPostReturn ( component_events :: PostReturnEvent ) ,
161157
162158 // OPTIONAL events for replay validation (Component)
163159
@@ -166,13 +162,13 @@ rr_event! {
166162 /// Since realloc is deterministic, ReallocReturn is optional.
167163 /// Any error is subsumed by the containing LowerReturn/LowerStoreReturn
168164 /// that triggered realloc
169- ComponentReallocReturn ( __component_events :: ReallocReturnEvent ) ,
165+ ComponentReallocReturn ( component_events :: ReallocReturnEvent ) ,
170166 /// Call into type lowering for flat destination
171- ComponentLowerFlatEntry ( __component_events :: LowerFlatEntryEvent ) ,
167+ ComponentLowerFlatEntry ( component_events :: LowerFlatEntryEvent ) ,
172168 /// Call into type lowering for memory destination
173- ComponentLowerMemoryEntry ( __component_events :: LowerMemoryEntryEvent ) ,
169+ ComponentLowerMemoryEntry ( component_events :: LowerMemoryEntryEvent ) ,
174170 /// Call into a component builtin
175- ComponentBuiltinEntry ( __component_events :: BuiltinEntryEvent )
171+ ComponentBuiltinEntry ( component_events :: BuiltinEntryEvent )
176172}
177173
178174impl RREvent {
@@ -708,7 +704,7 @@ mod tests {
708704 origin : origin. clone ( ) ,
709705 args : RRFuncArgVals :: from_flat_iter ( & values, flat_sizes. iter ( ) . copied ( ) ) ,
710706 } ) ?;
711- recorder. record_event ( || __component_events :: WasmFuncEntryEvent {
707+ recorder. record_event ( || component_events :: WasmFuncEntryEvent {
712708 args : RRFuncArgVals :: from_flat_iter (
713709 & return_values,
714710 return_flat_sizes. iter ( ) . copied ( ) ,
@@ -724,7 +720,7 @@ mod tests {
724720 assert ! ( origin == replay_origin. unwrap( ) ) ;
725721 verify_equal_slices ( & values, & replay_values, & flat_sizes) ?;
726722
727- replayer. next_event_and ( |event : __component_events :: WasmFuncEntryEvent | {
723+ replayer. next_event_and ( |event : component_events :: WasmFuncEntryEvent | {
728724 event. args . into_raw_slice ( & mut return_replay_values) ;
729725 Ok ( ( ) )
730726 } ) ?;
@@ -735,7 +731,7 @@ mod tests {
735731
736732 #[ test]
737733 fn builtin_event_entry ( ) -> Result < ( ) > {
738- use __component_events :: {
734+ use component_events :: {
739735 BuiltinEntryEvent , ResourceDropEntryEvent , ResourceEnterCallEntryEvent ,
740736 ResourceExitCallEntryEvent , ResourceTransferBorrowEntryEvent ,
741737 ResourceTransferOwnEntryEvent ,
@@ -781,7 +777,7 @@ mod tests {
781777
782778 #[ test]
783779 fn builtin_event_return ( ) -> Result < ( ) > {
784- use __component_events :: {
780+ use component_events :: {
785781 BuiltinError , BuiltinReturnEvent , ResourceDropReturnEvent , ResourceExitCallReturnEvent ,
786782 ResourceRep32ReturnEvent , ResourceTransferBorrowReturnEvent ,
787783 ResourceTransferOwnReturnEvent ,
@@ -870,7 +866,7 @@ mod tests {
870866
871867 #[ test]
872868 fn lower_flat_events ( ) -> Result < ( ) > {
873- use __component_events :: { LowerFlatEntryEvent , LowerFlatReturnEvent } ;
869+ use component_events :: { LowerFlatEntryEvent , LowerFlatReturnEvent } ;
874870 use wasmtime_environ:: component:: InterfaceType ;
875871
876872 let entry = LowerFlatEntryEvent {
@@ -900,7 +896,7 @@ mod tests {
900896
901897 #[ test]
902898 fn lower_memory_events ( ) -> Result < ( ) > {
903- use __component_events :: { LowerMemoryEntryEvent , LowerMemoryReturnEvent } ;
899+ use component_events :: { LowerMemoryEntryEvent , LowerMemoryReturnEvent } ;
904900 use wasmtime_environ:: component:: InterfaceType ;
905901
906902 let entry = LowerMemoryEntryEvent {
@@ -932,7 +928,7 @@ mod tests {
932928
933929 #[ test]
934930 fn realloc_events ( ) -> Result < ( ) > {
935- use __component_events :: { ReallocEntryEvent , ReallocReturnEvent } ;
931+ use component_events :: { ReallocEntryEvent , ReallocReturnEvent } ;
936932
937933 let entry = ReallocEntryEvent {
938934 old_addr : 0x1000 ,
@@ -967,7 +963,7 @@ mod tests {
967963
968964 #[ test]
969965 fn memory_slice_write_event ( ) -> Result < ( ) > {
970- use __component_events :: MemorySliceWriteEvent ;
966+ use component_events :: MemorySliceWriteEvent ;
971967
972968 let event = MemorySliceWriteEvent {
973969 offset : 512 ,
@@ -994,7 +990,7 @@ mod tests {
994990 fn instantiation_event ( ) -> Result < ( ) > {
995991 use crate :: component:: ComponentInstanceId ;
996992 use crate :: store:: InstanceId ;
997- use __component_events :: InstantiationEvent as ComponentInstantiationEvent ;
993+ use component_events :: InstantiationEvent as ComponentInstantiationEvent ;
998994 use core_events:: InstantiationEvent as CoreInstantiationEvent ;
999995 use wasmtime_environ:: WasmChecksum ;
1000996
0 commit comments