2019-04-09 16:52:22 +03:00
|
|
|
import {StringInvoke, API} from "../as-dependencies/crossmodule/assembly/index"
|
2019-03-27 12:03:02 +03:00
|
|
|
|
2019-03-27 16:53:07 +03:00
|
|
|
export declare function allocate(size: usize): i32;
|
|
|
|
export declare function deallocate(ptr: i32, size: usize): void;
|
|
|
|
export declare function invoke(ptr: i32, size: usize): i32;
|
|
|
|
export declare function store(ptr: usize, byte: u8): void;
|
|
|
|
export declare function load(ptr: usize): u8;
|
2019-03-27 12:03:02 +03:00
|
|
|
|
|
|
|
export function getStringInvoker(): StringInvoke {
|
|
|
|
let api = new API(invoke, allocate, deallocate, store, load);
|
|
|
|
return new StringInvoke(api);
|
|
|
|
}
|