diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-01 01:08:51 +0430 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-13 19:44:32 +0100 |
commit | 4d9246ac9decfd22c3f6ceee0a90877f38679ca2 (patch) | |
tree | 7c225a55d26d4f0e569df016a5b2c5d501e9ab55 /Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h | |
parent | 2b755f1fbfd96efb9e053780a332b68371a17e6e (diff) | |
download | serenity-4d9246ac9decfd22c3f6ceee0a90877f38679ca2.zip |
LibWasm: Add basic support for module instantiation and execution stubs
This adds very basic support for module instantiation/allocation, as
well as a stub for an interpreter (and executions APIs).
The 'wasm' utility is further expanded to instantiate, and attempt
executing the first non-imported function in the module.
Note that as the execution is a stub, the expected result is a zero.
Regardless, this will allow future commits to implement the JS
WebAssembly API. :^)
Diffstat (limited to 'Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h')
-rw-r--r-- | Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h new file mode 100644 index 0000000000..2c3426fc84 --- /dev/null +++ b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <LibWasm/AbstractMachine/Configuration.h> + +namespace Wasm { + +struct Interpreter { + void interpret(Configuration&); +}; + +} |