#pragma once #include #include #include #include "WAVM/IR/Value.h" namespace WAVM { namespace IR { struct Module; }} namespace WAVM { namespace VFS { struct VFD; }} namespace WAVM { namespace Runtime { struct Compartment; struct Context; struct Instance; struct Resolver; }} namespace WAVM { namespace Emscripten { struct Process; WAVM_API std::shared_ptr createProcess(Runtime::Compartment* compartment, std::vector&& inArgs, std::vector&& inEnvs, VFS::VFD* stdIn = nullptr, VFS::VFD* stdOut = nullptr, VFS::VFD* stdErr = nullptr); WAVM_API bool initializeProcess(Process& process, Runtime::Context* context, const IR::Module& module, Runtime::Instance* instance); WAVM_API Runtime::Resolver& getInstanceResolver(Process& process); WAVM_API void joinAllThreads(Process& process); WAVM_API I32 catchExit(std::function&& thunk); }}