@@ -101,57 +101,3 @@ mod_use!(
101
101
dummy
102
102
) ;
103
103
104
- // Due to rustwasm/wasm-bindgen#201 this can't be defined in the inner os
105
- // modules, so hack around it for now and place it at the root.
106
- #[ cfg( all( feature = "wasm-bindgen" , target_arch = "wasm32" ) ) ]
107
- #[ doc( hidden) ]
108
- #[ allow( missing_debug_implementations) ]
109
- pub mod __wbg_shims {
110
-
111
- // `extern { type Foo; }` isn't supported on 1.22 syntactically, so use a
112
- // macro to work around that.
113
- macro_rules! rust_122_compat {
114
- ( $( $t: tt) * ) => ( $( $t) * )
115
- }
116
-
117
- rust_122_compat ! {
118
- extern crate wasm_bindgen;
119
-
120
- pub use wasm_bindgen:: prelude:: * ;
121
-
122
- #[ wasm_bindgen]
123
- extern "C" {
124
- pub type Function ;
125
- #[ wasm_bindgen( constructor) ]
126
- pub fn new( s: & str ) -> Function ;
127
- #[ wasm_bindgen( method) ]
128
- pub fn call( this: & Function , self_: & JsValue ) -> JsValue ;
129
-
130
- pub type This ;
131
- #[ wasm_bindgen( method, getter, structural, js_name = self ) ]
132
- pub fn self_( me: & This ) -> JsValue ;
133
- #[ wasm_bindgen( method, getter, structural) ]
134
- pub fn crypto( me: & This ) -> JsValue ;
135
-
136
- #[ derive( Clone , Debug ) ]
137
- pub type BrowserCrypto ;
138
-
139
- // TODO: these `structural` annotations here ideally wouldn't be here to
140
- // avoid a JS shim, but for now with feature detection they're
141
- // unavoidable.
142
- #[ wasm_bindgen( method, js_name = getRandomValues, structural, getter) ]
143
- pub fn get_random_values_fn( me: & BrowserCrypto ) -> JsValue ;
144
- #[ wasm_bindgen( method, js_name = getRandomValues, structural) ]
145
- pub fn get_random_values( me: & BrowserCrypto , buf: & mut [ u8 ] ) ;
146
-
147
- #[ wasm_bindgen( js_name = require) ]
148
- pub fn node_require( s: & str ) -> NodeCrypto ;
149
-
150
- #[ derive( Clone , Debug ) ]
151
- pub type NodeCrypto ;
152
-
153
- #[ wasm_bindgen( method, js_name = randomFillSync, structural) ]
154
- pub fn random_fill_sync( me: & NodeCrypto , buf: & mut [ u8 ] ) ;
155
- }
156
- }
157
- }
0 commit comments