Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
AotModule.hpp File Reference

A built module of compiled systems, opened by a host that links. More...

#include <cstdint>
#include <cstring>
#include <span>
#include <string>
#include <utility>
#include "esengine/aot/AotHost.hpp"
#include "esengine/core/DynamicLibrary.hpp"
Include dependency graph for AotModule.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  esengine::aot::Module

Namespaces

namespace  esengine
namespace  esengine::aot

Detailed Description

A built module of compiled systems, opened by a host that links.

The wasm road ships a manifest beside the module because a browser cannot read a data section out of one. A host that LOADS a library has no such problem: the declaration table is in the artifact, so the names, the queries, the resources and the handshake all come from the thing being run rather than from a file beside it that can be swapped for another.

Refuses rather than degrades. A module built for other offsets does not produce a wrong answer, it produces a read of a different field, so open is not "did the platform load it" — it is also "does it agree about the engine and the address width".

Owns the handle. Moving transfers it; copying is refused, because two owners closing one library is the bug this exists to not have.

Definition in file AotModule.hpp.