Open nidin opened 7 years ago
What? Refine import syntax for
Decouple declare native function from import.
Update
import {func,class,var} from "./local/module"
.tbs will automatically append to import from file
import {Math} from "javascript"
special tbs file where all javascript methods declared. it should be outside library source.
import {func,global_var,memory} from "./bin/module.wasm"
unwanted functions from imported wasm should be removed and combine in to one wasm output.
Notes: All declare syntax outside library source should allocate imports. import from wasm binary need a wasm binary parser.
if library && declare ---> no import if declare ---> import
if library && declare ---> no import
if declare ---> import
What? Refine import syntax for
Decouple declare native function from import.
Update
Import Cases
import from local tbs file
.tbs will automatically append to import from file
import from javascript built-ins
special tbs file where all javascript methods declared. it should be outside library source.
import from compiled wasm binary
unwanted functions from imported wasm should be removed and combine in to one wasm output.
Notes: All declare syntax outside library source should allocate imports. import from wasm binary need a wasm binary parser.
import strategy
if library && declare ---> no import
if declare ---> import