-
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.
Merge branch 'rustwasm:main' into main
- Loading branch information
Showing
33 changed files
with
1,170 additions
and
11 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
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
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
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 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
*/ | ||
export class ClassBuilder { | ||
free(): void; | ||
/** | ||
* @returns {ClassBuilder} | ||
*/ | ||
static builder(): ClassBuilder; | ||
} |
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,61 @@ | ||
let wasm; | ||
export function __wbg_set_wasm(val) { | ||
wasm = val; | ||
} | ||
|
||
|
||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
|
||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
|
||
cachedTextDecoder.decode(); | ||
|
||
let cachedUint8Memory0 = null; | ||
|
||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
|
||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
/** | ||
*/ | ||
export class ClassBuilder { | ||
|
||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(ClassBuilder.prototype); | ||
obj.__wbg_ptr = ptr; | ||
|
||
return obj; | ||
} | ||
|
||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
|
||
return ptr; | ||
} | ||
|
||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_classbuilder_free(ptr); | ||
} | ||
/** | ||
* @returns {ClassBuilder} | ||
*/ | ||
static builder() { | ||
const ret = wasm.classbuilder_builder(); | ||
return ClassBuilder.__wrap(ret); | ||
} | ||
} | ||
|
||
export function __wbindgen_throw(arg0, arg1) { | ||
throw new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
|
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 struct ClassBuilder(()); | ||
|
||
#[wasm_bindgen] | ||
impl ClassBuilder { | ||
pub fn builder() -> ClassBuilder { | ||
ClassBuilder(()) | ||
} | ||
} |
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,10 @@ | ||
(module | ||
(type (;0;) (func (result i32))) | ||
(type (;1;) (func (param i32))) | ||
(func $__wbg_classbuilder_free (;0;) (type 1) (param i32)) | ||
(func $classbuilder_builder (;1;) (type 0) (result i32)) | ||
(memory (;0;) 17) | ||
(export "memory" (memory 0)) | ||
(export "__wbg_classbuilder_free" (func $__wbg_classbuilder_free)) | ||
(export "classbuilder_builder" (func $classbuilder_builder)) | ||
) |
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,10 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
*/ | ||
export class ClassConstructor { | ||
free(): void; | ||
/** | ||
*/ | ||
constructor(); | ||
} |
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,53 @@ | ||
let wasm; | ||
export function __wbg_set_wasm(val) { | ||
wasm = val; | ||
} | ||
|
||
|
||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
|
||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
|
||
cachedTextDecoder.decode(); | ||
|
||
let cachedUint8Memory0 = null; | ||
|
||
function getUint8Memory0() { | ||
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { | ||
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); | ||
} | ||
return cachedUint8Memory0; | ||
} | ||
|
||
function getStringFromWasm0(ptr, len) { | ||
ptr = ptr >>> 0; | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
/** | ||
*/ | ||
export class ClassConstructor { | ||
|
||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
|
||
return ptr; | ||
} | ||
|
||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_classconstructor_free(ptr); | ||
} | ||
/** | ||
*/ | ||
constructor() { | ||
const ret = wasm.classconstructor_new(); | ||
this.__wbg_ptr = ret >>> 0; | ||
return this; | ||
} | ||
} | ||
|
||
export function __wbindgen_throw(arg0, arg1) { | ||
throw new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
|
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,13 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen] | ||
pub struct ClassConstructor(()); | ||
|
||
#[wasm_bindgen] | ||
impl ClassConstructor { | ||
|
||
#[wasm_bindgen(constructor)] | ||
pub fn new() -> ClassConstructor { | ||
ClassConstructor(()) | ||
} | ||
} |
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,10 @@ | ||
(module | ||
(type (;0;) (func (result i32))) | ||
(type (;1;) (func (param i32))) | ||
(func $__wbg_classconstructor_free (;0;) (type 1) (param i32)) | ||
(func $classconstructor_new (;1;) (type 0) (result i32)) | ||
(memory (;0;) 17) | ||
(export "memory" (memory 0)) | ||
(export "__wbg_classconstructor_free" (func $__wbg_classconstructor_free)) | ||
(export "classconstructor_new" (func $classconstructor_new)) | ||
) |
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
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
Oops, something went wrong.