WABT(1)
okay bestie, welcome to the WABT(1) general commands manual page β weβre about to make WebAssembly-to-C conversion make sense, no cap π
πΈ NAME πΈ
wasm2c β convert a WebAssembly binary file to a C source and header. sheβs giving compiler-girlie main character energy β¨
β¨ SYNOPSIS β¨
wasm2c [options] filename
π DESCRIPTION π
wasm2c reads a file in the WebAssembly binary format and converts it to a C source file and header. iconic behavior, honestly π«Ά
The options are as follows:
--helpβ prints this help message.--versionβ prints version information.-v,--verboseβ use this multiple times for more info. stack it, bestie.-o,--output=FILENAMEβ output file for the generated C source file; by default it usesstdout.--num-outputs=NUMβ number of output files to write.-n,--module-name=MODNAMEβ unique name for the module being generated. this name is prefixed to each of the generated C symbols. by default, the module name from the names section is used; if thatβs not present, the name of the input file is used as the default.--disable-exceptionsβ disables experimental exception handling.--disable-mutable-globalsβ disables import/export mutable globals.--disable-saturating-float-to-intβ disables saturating float-to-int operators.--disable-sign-extensionβ disables sign-extension operators.--disable-simdβ disables SIMD support.--enable-threadsβ enables threading support.--enable-function-referencesβ enables typed function references.--disable-multi-valueβ disables multi-value.--disable-tail-callβ disables tail-call support.--disable-bulk-memoryβ disables bulk-memory operations.--disable-reference-typesβ disables reference types (externref).--disable-annotationsβ disables custom annotation syntax.--enable-code-metadataβ enables code metadata.--enable-gcβ enables garbage collection.--disable-memory64β disables 64-bit memory.--disable-multi-memoryβ disables multi-memory.--disable-extended-constβ disables extended constant expressions.--disable-relaxed-simdβ disables relaxed SIMD.--enable-custom-page-sizesβ enables custom page sizes.--enable-compact-importsβ enables compact import section.--enable-wide-arithmeticβ enables wide arithmetic.--enable-allβ enables all features. the full send, periodt π₯
π EXAMPLES π
parse binary file test.wasm and write test.c and test.h
$ wasm2c test.wasm -o test.c
parse test.wasm, write test.c and test.h, but ignore the debug names, if any
$ wasm2c test.wasm --no-debug-names -o test.c
π¦ SEE ALSO π¦
wasm-interp(1)wasm-objdump(1)wasm-stats(1)wasm-strip(1)wasm-validate(1)wasm2wat(1)wast2json(1)wat-desugar(1)wat2wasm(1)spectest-interp(1)
π BUGS π
If you find a bug, please report it at https://github.com/WebAssembly/wabt/issues. do it for the plot bestie, the maintainers will appreciate you π
stay hydrated and slay, Debian Β· $Mdocdate$ Β· WABT(1) πβ¨
π¦ where this page comes from
- arch rolling: wabt 1.0.42-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms