* A hardware-optimized runtime for ONNX AI models. [ONNC compiler for AI](https://github.com/ONNC/onnc-wasm)
* Smart contract runtime engine for leading blockchain platforms. [Polkadot/Substrate](https://github.com/second-state/substrate-ssvm-node) | [CyberMiles](https://docs.secondstate.io/devchain/getting-started/cybermiles-ewasm-testnet)
For the information on related tools and the `SSVM` ecosystem, please refer to the [SSVM ecosystem documentation](https://github.com/second-state/SSVM/blob/master/doc/ecosystem.md).
# And you will need to install llvm for ssvm-aot tools
# And you will need to install llvm for ssvmc tool
$ sudo apt install-y\
llvm-dev \
liblld-10-dev
...
...
@@ -57,14 +59,16 @@ $ sudo apt install -y clang
SSVM provides various tools for enabling different runtime environments for optimal performance.
After the build is finished, you can find there are several ssvm related tools:
1.`ssvm` is for general wasm runtime. Interpreter mode.
2.`ssvm-qitc` is for AI application, supporting ONNC runtime for AI model in ONNX format.
1.`ssvm` is for general wasm runtime.
*`ssvm` executes a `WASM` file in interpreter mode or a compiled WASM `so` file in ahead-of-time compilation mode.
* To disable building all tools, you can set the CMake option `BUILD_TOOLS` to `OFF`.
2.`ssvmc` is for ahead-of-time `WASM` compiler.
*`ssvmc` compiles a general `WASM` file into a `so` file.
* To disable building the ahead-of-time compiler only, you can set the CMake option `SSVM_DISABLE_AOT_RUNTIME` to `ON`.
* To disable building all tools, you can set the CMake option `BUILD_TOOLS` to `OFF`.
3.`ssvm-qitc` is for AI application, supporting ONNC runtime for AI model in ONNX format.
* If you want to try `ssvm-qitc`, please refer to [ONNC-Wasm](https://github.com/ONNC/onnc-wasm) project to set up the working environment and run several examples.
* And here is our [tutorial for ONNC-Wasm project(YouTube Video)](https://www.youtube.com/watch?v=cbiPuHMS-iQ).
3.`ssvm-aot` is for general wasm runtime. AOT compilation mode.
*`ssvmc` compiles a general wasm runtime to so file.
*`ssvmr` execute a general wasm runtime or so file in WASI environment.
* To disable building the ahead of time compilation runtime, you can set the CMake option `SSVM_DISABLE_AOT_RUNTIME` to `OFF`.
```bash
# After pulling our ssvm docker image
...
...
@@ -77,7 +81,7 @@ $ docker run -it --rm \
```
SSVM requires `libLLVM-10` and `GLIBCXX_3.4.26` or after.
If users want to build and run `ssvm` interpreter tool without these dependencies, they can set the CMake option `SSVM_DISABLE_AOT_RUNTIME` and `STATIC_BUILD` to `ON`.
If users want to build and execute the `ssvm` runner tool without these dependencies, they can set the CMake option `SSVM_DISABLE_AOT_RUNTIME` and `STATIC_BUILD` to `ON`.
@@ -163,6 +167,12 @@ It allows Node.js applications to call WebAssembly functions written in Rust or
The SSVM addon could interact with the wasm files generated by the [ssvmup](https://www.secondstate.io/articles/ssvmup/) compiler tool.
## SSVM-TensorFlow
[SSVM-TensorFlow](https://github.com/second-state/ssvm-tensorflow) provides support for accessing with [TensorFlow C library](https://www.tensorflow.org/install/lang_c).
This project provides a tool that can execute `WASM` with TensorFlow extension compiled from [Rust ssvm_tensorflow_interface](https://crates.io/crates/ssvm_tensorflow_interface).
## DevChain
[The Second State DevChain](https://github.com/second-state/devchain) features a powerful and easy-to-use virtual machine that can quickly get you started with the smart contract and DApp development.