#include <sysio/vm/backend.hpp>
#include <sysio/vm/error_codes.hpp>
#include <sysio/vm/watchdog.hpp>
#include <iostream>
Go to the source code of this file.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Simple implementation of an interpreter using sys-vm.
Definition at line 13 of file interp.cpp.
13 {
14
16
17 if (argc < 2) {
18 std::cerr << "Error, no wasm file provided\n";
19 return -1;
20 }
21
22 std::string filename =
argv[1];
23
25
26 try {
27
29
30
32
33
35
37 std::cerr << "sys-vm interpreter error\n";
38 std::cerr << ex.
what() <<
" : " << ex.
detail() <<
"\n";
39 }
40 return 0;
41}
void execute_all(Watchdog &&wd, host_t &host)
Triggers a callback after a given time elapses.
backend_t bkend(hello_wasm, ehm, &wa)
std::vector< uint8_t > read_wasm(const std::string &fname)
virtual const char * what() const =0
virtual const char * detail() const =0