// beginning a Binaryen API trace #include #include #include "binaryen-c.h" int main() { std::map expressions; std::map functions; std::map globals; std::map events; std::map exports; std::map relooperBlocks; BinaryenModuleRef the_module = NULL; RelooperRef the_relooper = NULL; the_module = BinaryenModuleCreate(); expressions[size_t(NULL)] = BinaryenExpressionRef(NULL); { const char contents[] = { 119, 111, 114, 108, 100 }; BinaryenAddCustomSection(the_module, "hello", contents, 5); } BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module ;; custom section "hello", size 5, contents: "world" )