witx-codegen
witx-codegen copied to clipboard
Add an expermental alternative cpp backend
A implementation of cpp (need c++17). Wish to get a review! The generated cpp.h
pass the clang-tidy check.
- I wish to add namespace in different module #10 . So I wish if you can help me to finish it!
- Also I wish if you can help me check the layout of struct/union in generate file. I don't sure I have make some stupid mistake.
- Some of inspired by wasi-libc's tool but it have abi change in wasi-crypto so I make a simple cpp backend.
For current cpp backend I will:
- [x] Support return result as a
Result(rust)
like style as return value(also usestd::tuple
) - [ ] Generate different namespace for each module
- [ ] Adopt LLVM style's code
- [ ] Support generate multiple files for each module (may not put in thie pull request).
- [ ] Check the layout with
static_assert