-
Notifications
You must be signed in to change notification settings - Fork 15
Static Embedding
Statically embedding inNative is the suggested method for most applications that want to load WebAssembly modules. While it is platform-dependent, all platforms must:
- Download or Install the SDK.
- Link to the inNative static library
- Add the
include/innativeheader files to the project - Include the inNative Default Environment static library
Static libraries cannot include other static libraries, so you need to include innative.lib in the root executable or DLL that you are building. Because you are statically embedding the library, you get access to all of the Static Functions listed in the External API.
Static Library:
innative.libandinnative-d.libDefault Environment:
innative-env.libandinnative-env-d.lib
Add the static library to your project's Additional Dependencies (for Visual Studio) or your build system's equivalent. Place the Default Environment libraries inside your /bin/ folder, and ensure you distribute them with your application.
Static Library:
innative.aandinnative-d.aDefault Environment:
innative-env.aandinnative-env-d.a
Add the static library to your linker invocation, next to the .o files, without using the -l option (which is intended for shared libraries). Place the default environment libraries in your /bin/ folder, or wherever your application will live, and ensure you distribute them with your application.