mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
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. :^)
This commit is contained in:
parent
2b755f1fbf
commit
4d9246ac9d
8 changed files with 938 additions and 1 deletions
17
Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h
Normal file
17
Userland/Libraries/LibWasm/AbstractMachine/Interpreter.h
Normal file
|
@ -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&);
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue