1693: Add `wasmer create-exe` r=MarkMcCaskey a=MarkMcCaskey
This adds the `wasmer create-exe` subcommand. This subcommand is a combination of `wasmer compile --object-file` and linking that compiled Wasm with a main function and libwasmer. Put more plainly: it lets us transform Wasm modules into native executables in one step.
In order for this to work we need:
- [x] Ship wasm.h with Wasmer or use different mechanism to find it
- [x] Ship wasmer_wasm.h with Wasmer
- [x] Requires up to date libwasmer... had to build one and copy it over, may fail in CI because of this... will be fixed with next release though
- [x] More gracefully handle wasmer installed without WASMER_DIR, etc (even if just error messages, should be tested)
- [x] Add tests
# Review
- [ ] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
Add conditional logic for Windows style object files
Explicitly require c11 for wasm.h
Use `clang++` on Windows for `static_assert`
Improve generated C + add hack to make function pointers work better
Add logic to handle Window's static library file extension
Improve linking logic to work on Windows
Add support for C++ compilers for object-file-engine generated C
Add C++ support to wasmer_wasm.h
Add C++ support to test C file too
Add linking flags for Windows, make assert line-ending neutral
Adjust asserted output to handle differences on Windows