-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {number} input | ||
* @returns {number} | ||
*/ | ||
export function const_pointer(input: number): number; | ||
/** | ||
* @param {number} input | ||
* @returns {number} | ||
*/ | ||
export function mut_pointer(input: number): number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
let wasm; | ||
export function __wbg_set_wasm(val) { | ||
wasm = val; | ||
} | ||
|
||
/** | ||
* @param {number} input | ||
* @returns {number} | ||
*/ | ||
export function const_pointer(input) { | ||
const ret = wasm.const_pointer(input); | ||
return ret >>> 0; | ||
} | ||
|
||
/** | ||
* @param {number} input | ||
* @returns {number} | ||
*/ | ||
export function mut_pointer(input) { | ||
const ret = wasm.mut_pointer(input); | ||
return ret >>> 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen] | ||
pub fn const_pointer(input: *const u8) -> *const u8 { | ||
u32::MAX as *const _ | ||
} | ||
|
||
#[wasm_bindgen] | ||
pub fn mut_pointer(input: *mut u8) -> *mut u8 { | ||
u32::MAX as *mut _ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(module | ||
(type (;0;) (func (param i32) (result i32))) | ||
(func $const_pointer (;0;) (type 0) (param i32) (result i32)) | ||
(func $mut_pointer (;1;) (type 0) (param i32) (result i32)) | ||
(memory (;0;) 17) | ||
(export "memory" (memory 0)) | ||
(export "const_pointer" (func $const_pointer)) | ||
(export "mut_pointer" (func $mut_pointer)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters