{"library":"maiacpp","title":"maiaCpp","description":"MaiaCpp (WebCpp) is a C++98 to C transpiler that translates a restricted subset of C++98 to C code, which can then be further compiled to WebAssembly via the MaiaC toolchain. Current stable version is 1.3.3. The project includes a CLI wrapper (webcpp.sh) and supports generating AST (XML, JSON, tree), C output, JS wrapper, WAT, and WASM. It integrates with MaiaC for WebAssembly generation and provides Node.js and browser runners. Differentiators: focuses on a minimal C++98 subset suitable for embedded or WebAssembly use cases, with a migration guide from legacy runner scripts to a dist-oriented flow.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install maiacpp"],"cli":{"name":"webcpp","version":null}},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"#!/bin/bash\n# Transpile a C++98 file to C and then to WASM using the wrapper\n# Ensure you have Node.js >=18 and the repo cloned\ncd /path/to/maiacpp\n\n# Simple transpilation: C++ -> C\nnode compiler/cpp-compiler.js --file compiler/examples/test.cpp --c-out out/test.c\n\n# Full pipeline: C++ -> C -> WAT -> WASM via webcpp.sh\n./bin/webcpp.sh --file compiler/examples/test.cpp --all --out-dir ./out\n\n# Generate distribution package (browser + Node runner)\n./bin/webcpp.sh --file compiler/examples/test.cpp --dist --out-dir ./dist --name testapp\n\n# Run Node dist immediately\n./bin/webcpp.sh --file compiler/examples/test.cpp --dist-run --out-dir ./dist --name testapp\n","lang":"javascript","description":"Basic usage of maiaCpp: transpile a C++98 file to C, then generate WASM, and create a distributable package.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}