web-devkits / Wasmnizer-ts

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

What is the difference between this and AssemblyScript? #112

Closed beautiful-boyyy closed 7 months ago

beautiful-boyyy commented 7 months ago

I just started learning webassembly, and I feel that AssemblyScript and this project seem to be doing the same things. What's the difference?

xujuntwt95329 commented 7 months ago

Hi, AssemblyScript compiles a TypeScript-like language to WebAssembly, it doesn't allow dynamic language features such as any, union and so on, the objects are inside wasm linear memory, managed through a garbage collector built into WebAssembly

Wasmnizer-ts compiles a subset of TypeScript to WebAssembly, leveraging WasmGC proposal, the objects are in WasmGC heap, managed by the underlining wasm runtimes, and a series of APIs (libdyntype API) are introduced to work as an escape hatch for dynamic objects.

beautiful-boyyy commented 7 months ago

Hi, AssemblyScript compiles a TypeScript-like language to WebAssembly, it doesn't allow dynamic language features such as any, union and so on, the objects are inside wasm linear memory, managed through a garbage collector built into WebAssembly

Wasmnizer-ts compiles a subset of TypeScript to WebAssembly, leveraging WasmGC proposal, the objects are in WasmGC heap, managed by the underlining wasm runtimes, and a series of APIs (libdyntype API) are introduced to work as an escape hatch for dynamic objects.

I get it, thanks.