web-devkits / Wasmnizer-ts

Toolchain for compiling TypeScript to WasmGC
Apache License 2.0
292 stars 23 forks source link

DataView error when using windows #113

Closed louisvangeldrop closed 1 month ago

louisvangeldrop commented 7 months ago

The following command in Windows command prompt: node cli/ts2wasm.js --opt=3 mandelbrot.ts -o out.wasm =>

Error: Error: Error: Cannot find the idenentifier "DataView" at buildExpression (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/expression_builder.js:1940:15) at buildIfStatement (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/statement_builder.js:194:21) at buildStatement (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/statement_builder.js:346:23) at buildStatements (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:46:23) at generateFunctionScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:360:24) at generateScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:382:13) at foreachScopeChildren (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:289:9) at generateClassScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:367:5) at generateScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:385:13) at foreachScopeChildren (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:289:9)

xujuntwt95329 commented 7 months ago

Hi @louisvangeldrop Thanks for reporting this, we use cp command in npm run build to copy some builtin lib files, but this command is not available on Windows, we will fix it and reply here.

xujuntwt95329 commented 7 months ago

Hi @louisvangeldrop This issue has been fixed in https://github.com/intel/Wasmnizer-ts/pull/118, could you please try again?

louisvangeldrop commented 7 months ago

Thx, it works now.