mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 09:51:33 +00:00
Set up documentation generation
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @file TypeScript definitions for Binaryen's C-API.
|
||||
* @see https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h
|
||||
*/
|
||||
* TypeScript definitions for Binaryen's C-API.
|
||||
*
|
||||
* See: https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h
|
||||
*
|
||||
* @module glue/binaryen
|
||||
*//***/
|
||||
|
||||
declare function _malloc(size: usize): usize;
|
||||
declare function _free(ptr: usize): void;
|
4
src/glue/js/binaryen.d.ts
vendored
4
src/glue/js/binaryen.d.ts
vendored
@ -1,6 +1,4 @@
|
||||
/**
|
||||
* @file Definitions for linking Binaryen with AssemblyScript.
|
||||
*/
|
||||
/** @module glue/js *//***/
|
||||
|
||||
declare function allocate_memory(size: usize): usize;
|
||||
declare function free_memory(ptr: usize): void;
|
||||
|
@ -1,7 +1,3 @@
|
||||
/**
|
||||
* @file Glue code for linking Binaryen with AssemblyScript.
|
||||
*/
|
||||
|
||||
// Copy Binaryen exports to global scope
|
||||
|
||||
const binaryen = global.Binaryen || require("binaryen");
|
||||
|
4
src/glue/js/i64.d.ts
vendored
4
src/glue/js/i64.d.ts
vendored
@ -1,6 +1,4 @@
|
||||
/**
|
||||
* @file I64 definitions for JavaScript.
|
||||
*/
|
||||
/** @module glue/js *//***/
|
||||
|
||||
declare type I64 = { __Long__: true }; // opaque
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
/**
|
||||
* @file I64 implementation for JavaScript using long.js.
|
||||
* @see https://github.com/dcodeIO/long.js
|
||||
*/
|
||||
|
||||
const Long = global.Long || require("long");
|
||||
|
||||
global.i64_new = function(lo, hi) {
|
||||
|
@ -1,6 +1,8 @@
|
||||
/**
|
||||
* @file JavaScript glue code.
|
||||
*/
|
||||
* JavaScript glue code.
|
||||
* @module glue/js
|
||||
* @preferred
|
||||
*//***/
|
||||
|
||||
import "../../../std/portable";
|
||||
import "./binaryen";
|
||||
|
4
src/glue/js/node.d.ts
vendored
4
src/glue/js/node.d.ts
vendored
@ -1,6 +1,4 @@
|
||||
/**
|
||||
* @file Definitions for running JavaScript under node.js.
|
||||
*/
|
||||
/** @module glue/js *//***/
|
||||
|
||||
declare const global: any;
|
||||
declare function require(name: string): any;
|
||||
|
@ -1,6 +1,4 @@
|
||||
/**
|
||||
* @file I64 wrapper for WebAssembly.
|
||||
*/
|
||||
/** @module glue/wasm *//***/
|
||||
|
||||
type I64 = i64;
|
||||
|
||||
@ -151,7 +149,7 @@ function i64_to_f64(value: I64): f64 {
|
||||
return <f64>value;
|
||||
}
|
||||
|
||||
import { CharCode } from "../../util/charcode";
|
||||
import { CharCode } from "../../util";
|
||||
|
||||
@global
|
||||
function i64_to_string(value: I64): string {
|
||||
|
@ -1,5 +1,7 @@
|
||||
/**
|
||||
* @file WebAssembly glue code.
|
||||
*/
|
||||
* WebAssembly glue code.
|
||||
* @module glue/wasm
|
||||
* @preferred
|
||||
*//***/
|
||||
|
||||
import "./i64";
|
||||
|
Reference in New Issue
Block a user