File tree 5 files changed +57
-2
lines changed
crates/cli/tests/reference
5 files changed +57
-2
lines changed Original file line number Diff line number Diff line change
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {number } input
5
+ * @returns {number }
6
+ */
7
+ export function const_pointer ( input : number ) : number ;
8
+ /**
9
+ * @param {number } input
10
+ * @returns {number }
11
+ */
12
+ export function mut_pointer ( input : number ) : number ;
Original file line number Diff line number Diff line change
1
+ let wasm ;
2
+ export function __wbg_set_wasm ( val ) {
3
+ wasm = val ;
4
+ }
5
+
6
+ /**
7
+ * @param {number } input
8
+ * @returns {number }
9
+ */
10
+ export function const_pointer ( input ) {
11
+ const ret = wasm . const_pointer ( input ) ;
12
+ return ret >>> 0 ;
13
+ }
14
+
15
+ /**
16
+ * @param {number } input
17
+ * @returns {number }
18
+ */
19
+ export function mut_pointer ( input ) {
20
+ const ret = wasm . mut_pointer ( input ) ;
21
+ return ret >>> 0 ;
22
+ }
23
+
Original file line number Diff line number Diff line change
1
+ use wasm_bindgen:: prelude:: * ;
2
+
3
+ #[ wasm_bindgen]
4
+ pub fn const_pointer ( input : * const u8 ) -> * const u8 {
5
+ u32:: MAX as * const _
6
+ }
7
+
8
+ #[ wasm_bindgen]
9
+ pub fn mut_pointer ( input : * mut u8 ) -> * mut u8 {
10
+ u32:: MAX as * mut _
11
+ }
Original file line number Diff line number Diff line change
1
+ (module
2
+ (type (;0;) (func (param i32 ) (result i32 )))
3
+ (func $const_pointer (;0;) (type 0 ) (param i32 ) (result i32 ))
4
+ (func $mut_pointer (;1;) (type 0 ) (param i32 ) (result i32 ))
5
+ (memory (;0;) 17 )
6
+ (export " memory" (memory 0 ))
7
+ (export " const_pointer" (func $const_pointer ))
8
+ (export " mut_pointer" (func $mut_pointer ))
9
+ )
Original file line number Diff line number Diff line change @@ -104,13 +104,13 @@ cfg_if! {
104
104
105
105
impl < T > WasmDescribe for * const T {
106
106
fn describe ( ) {
107
- inform ( I32 )
107
+ inform ( U32 )
108
108
}
109
109
}
110
110
111
111
impl < T > WasmDescribe for * mut T {
112
112
fn describe ( ) {
113
- inform ( I32 )
113
+ inform ( U32 )
114
114
}
115
115
}
116
116
You can’t perform that action at this time.
0 commit comments