Browser-based Typescript compiler from C to Webassembly
npm install ctowasmC compiler to Webassembly
Run yarn first to download all dependencies.
Then run yarn build to build the bundle. All the final bundle will be in a single index.js file in the /build folder
Here are some commands you can run during development for testing and using ctowasm locally.
yarn compile < C input filepath > [-o - compiles the c program specified by the filepath, and places output at specified filepath (_output/a.out_ by default)
yarn generate-c-ast < C input filepath > [-o - generates the C AST for the input file, and converts it to JSON and stores the output in specified filepath (_output/c-ast.json_) by default.
yarn generate-wat-ast < C input filepath > [-o - generates the WAT AST for the input file, and converts it JSON and stores the output in the specified filepath (_output/wat-ast.json_) by default