forked from Mirrors/wasm3
parent
e517593d1f
commit
2e92dec227
@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// m3_extensions.c
|
||||||
|
//
|
||||||
|
// Created by Steven Massey on 3/30/21.
|
||||||
|
// Copyright © 2021 Steven Massey. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "wasm3_ext.h"
|
||||||
|
#include "m3_env.h"
|
||||||
|
|
||||||
|
|
||||||
|
IM3Module m3_NewModule (IM3Environment i_environment)
|
||||||
|
{
|
||||||
|
IM3Module module = m3_AllocStruct (M3Module);
|
||||||
|
|
||||||
|
if (module)
|
||||||
|
{
|
||||||
|
module->name = ".unnamed";
|
||||||
|
module->startFunction = -1;
|
||||||
|
module->environment = i_environment;
|
||||||
|
|
||||||
|
module->wasmStart = NULL;
|
||||||
|
module->wasmEnd = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return module;
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// Wasm3, high performance WebAssembly interpreter
|
||||||
|
//
|
||||||
|
// Extensions
|
||||||
|
//
|
||||||
|
// Copyright © 2019-2021 Steven Massey, Volodymyr Shymanskyy.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef wasm3_ext_h
|
||||||
|
#define wasm3_ext_h
|
||||||
|
|
||||||
|
#include "wasm3.h"
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
// modules
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Creates an empty module.
|
||||||
|
IM3Module m3_NewModule (IM3Environment i_environment);
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // wasm3_h
|
Loading…
Reference in new issue