summaryrefslogtreecommitdiff
path: root/src/prebuilt/wasm2c.include.h
Commit message (Collapse)AuthorAgeFilesLines
* wasm2c: simplify handling of templated code (#1940)Keith Winstein2022-07-111-32/+0
| | | Store templated wasm2c code as .h/.c; build templates on demand
* Format wasm2c templated code (#1942)Keith Winstein2022-07-081-1/+0
|
* wasm2c: Always use a module prefix and set one by default (#1897)Sam Clegg2022-04-141-14/+5
| | | | | | | | | | | | The module prefix is no longer optional and is now set by default to the name of the module as given in the name section, or taken from the name of the input file. A new `-n/--module-name` command line flag can also be used to override. The prefix used by the generated code is now fixed at wasm2c time which makes the output code easier to read and also avoid the symbol pasting in the C pre-processor which makes the source hard to understand. For example, it makes symbols hard to `grep` for.
* Fix spelling typo in wasm2c output. NFC (#1900)Sam Clegg2022-04-141-1/+1
|
* Fix compiler warnings in wasm2c output (#1844)Sam Clegg2022-03-021-0/+3
| | | | | Use stricter compiler settings and fix the resulting warnings. This is precursor to landing windows compiler support for wasm2c. See #1843.
* [wasm2c] Add rot13 example (#1384)Ben Smith2020-04-141-0/+1
| | | | | | | | | | This example demonstrates how to use imported functions. The `rot13` program takes each command line argument, and rot13-encodes it. The exported `rot13` function has no arguments, and instead calls back into the program (via `fill_buf`) with a buffer to fill in. When the function finishes it calls `buf_done`. (rot13.wat is the same as in src/test-interp.cc.)
* Add some documentation for wasm2c (#803)Ben Smith2018-05-091-2/+0
| | | Also remove `WASM_RT_DEFINE_EXTERNAL`, as it doesn't seem to be used.
* Separate out wasm-rt.h and wasm-rt-impl.{c,h} (#813)Ben Smith2018-03-201-52/+1
| | | This makes it easier to use outside of running wasm2c spec tests.
* Use templates for generating wasm2c source (#712)Ben Smith2018-01-101-0/+91
This uses a very simple template syntax, without any advanced features: ``` %%top ... %%bottom ... ``` This template will generate output with two C strings: ``` const char SECTION_NAME(top)[] = ... ... const char SECTION_NAME(bottom)[] = ... ... ``` To update the generated files, run `make update-wasm2c`.