You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,11 +25,12 @@ The inNative SDK comes with a command line utility with many useful features for
25
25
-o <FILE> : Sets the output path for the resulting executable or library.
26
26
-a <FILE> : Specifies an alternative linker to use instead of LLD.
27
27
-d <PATH> : Sets the directory that contains the SDK library and data files.
28
+
-j <PATH> : Sets the directory for temporary object files and intermediate compilation results.
28
29
-e <MODULE> : Sets the environment/system module name. Any functions with the module name will have the module name stripped when linking with C functions.
29
30
-s [<FILE>] : Serializes all modules to .wat files. <FILE> can specify the output if only one module is present.
30
31
-w <[MODULE:]FUNCTION> : whitelists a given C import, does name-mangling if the module is specified.
31
-
-c : Assumes the input files are actually LLVM IR files and compiles them into a single webassembly module.
32
-
-i : Installs this innative SDK to the host operating system.
32
+
-g : Instead of compiling immediately, creates a loader embedded with all the modules, environments, and settings, which compiles the modules on-demand when run. -c : Assumes the input files are actually LLVM IR files and compiles them into a single webassembly module.
33
+
-i [lite]: Installs this SDK to the host operating system. On Windows, also updates file associations unless 'lite' is specified.
33
34
-u : Uninstalls and deregisters this SDK from the host operating system.
34
35
-v : Turns on verbose logging.
35
36
@@ -43,7 +44,7 @@ LLVM uses CMake to build, but CMake currently has issues with the nested LLD pro
43
44
All build steps start with `git submodule update --init --recursive`. This is **mandatory** because of nested git submodules that the project relies on. If you get errors, be sure to double check that you have acquired `llvm`, `llvm/tools/lld`, `spec`, and `spec/document/core/util/katex`.
44
45
45
46
### Windows
46
-
Regardless of whether you are using Visual Studio 2017 or 2019, **make sure you have the v141_xp toolkit installed**, first. Run `build-llvm.ps1` if you have Visual Studio 2019, or run `build-llvm.ps1 2017` if you have Visual Studio 2017, and wait for it to complete. If the script was successful, open `innative.sln` in Visual Studio and build the project, or run `msbuild innative.sln`. **Visual Studio 2019 broke MSBuild outside the developer prompt, so you'll have to open the .sln file and manually compile Debug and MinSizeRel yourself, or run `build-llvm.ps1` inside a developer prompt.**
47
+
Regardless of whether you are using Visual Studio 2017 or 2019, **make sure you have the v141_xp toolkit installed**, first. Run `build-llvm.ps1` if you have Visual Studio 2019, or run `build-llvm.ps1 2017` if you have Visual Studio 2017, and wait for it to complete. If the script was successful, open `innative.sln` in Visual Studio and build the project, or run `msbuild innative.sln`. **Visual Studio 2019 broke MSBuild outside the developer prompt, so you'll have to open the .sln file and manually compile Debug and MinSizeRel yourself.**
47
48
48
49
The script downloads a portable cmake and python3 into the `bin` directory. If you would rather run the commands yourself, have existing installations of cmake/python, or want to modify the LLVM compilation flags, you can run the commands for your version of Visual Studio yourself:
49
50
@@ -88,9 +89,9 @@ A prebuilt version of this image is [available here](https://cloud.docker.com/u/
88
89
89
90
## Targeting inNative
90
91
91
-
No compiler fully supports inNative, because current WebAssembly compilers target *web embeddings* and make assumptions about which functions are available. For now, try building webassembly modules that have no dependencies, as these can always be run on any webassembly implementation. True C interop is provided via two special compiler functions, `_innative_to_c` and `_innative_from_c`. These can be used to acquire C pointers to WebAssembly memory to pass to other functions, and to convert C pointers into a form that can be manipulated by WebAssembly. **However**, it is not possible to safely manipulate outside memory pointers, so `_innative_` pointers can only be accessed when not in strict mode.
92
+
No compiler fully supports inNative, because current WebAssembly compilers target *web embeddings* and make assumptions about which functions are available. For now, try building webassembly modules that have no dependencies, as these can always be run on any webassembly implementation. True C interop is provided via two special compiler functions, `_innative_to_c` and `_innative_from_c`. These can be used to acquire C pointers to WebAssembly memory to pass to other functions, and to convert C pointers into a form that can be manipulated by WebAssembly. **However**, it is not possible to safely manipulate outside memory pointers, so `_innative_` pointers can only be accessed when not in strict mode. inNative also provides a [custom `cref` extension](https://github.com/innative-sdk/innative/wiki/inNative-cref-Extension) that automatically converts WebAssembly indexes into C pointers for external C functions.
92
93
93
-
The host-object proposal will make it easier to target native C environments, and hopefully compilers will make it easier to target non-web embeddings of WebAssembly.
94
+
The [WebIDL bindings proposal](https://github.com/WebAssembly/webidl-bindings) will make it easier to target native C environments, and hopefully compilers will make it easier to target non-web embeddings of WebAssembly.
94
95
95
96
## Embedding inNative
96
97
@@ -99,24 +100,29 @@ inNative is compiled as either a dynamic or static library, and can be integrate
99
100
// Create the environment, setting the dynamic library flag
<StringId="WelcomeDlgDescription"Overridable="yes">Welcome to the inNative Runtime installer. This will install the inNative Runtime and run WebAssembly files with the inNative command line tool.</String>
<ErrorText="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
0 commit comments