Skip to content

Commit

Permalink
[Addon] Bump version to 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hydai committed Dec 25, 2020
1 parent 95948fa commit f243a48
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"../rust_native_storage_library/target/debug/librust_native_storage_library.a",
"/usr/local/lib/libtensorflow.so",
"/usr/local/lib/libtensorflow_framework.so",
"/usr/local/lib/libtensorflowlite_c.so",
"/usr/lib/llvm-10/lib/libLLVM.so",
"/usr/lib/llvm-10/lib/liblldELF.a",
"/usr/lib/llvm-10/lib/liblldCommon.a",
Expand All @@ -51,6 +52,7 @@
"ssvm-napi/ssvm-core/lib/ast/type.cpp",
"ssvm-napi/ssvm-core/lib/common/hexstr.cpp",
"ssvm-napi/ssvm-core/lib/common/log.cpp",
"ssvm-napi/ssvm-core/lib/common/proposal.cpp",
"ssvm-napi/ssvm-core/lib/host/ssvm_process/processfunc.cpp",
"ssvm-napi/ssvm-core/lib/host/ssvm_process/processmodule.cpp",
"ssvm-napi/ssvm-core/lib/host/wasi/wasienv.cpp",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssvm-extensions",
"version": "0.7.1",
"version": "0.7.2",
"description": "Second State WebAssembly VM for Node.js Addon with all extensions",
"keywords": [
"wasm",
Expand Down
11 changes: 8 additions & 3 deletions ssvmaddon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ SSVMAddon::SSVMAddon(const Napi::CallbackInfo &Info)
SSVM::NAPI::ErrorMsgs.at(ErrorType::InvalidInputFormat).c_str());
return;
}

// Enable all available proposals
ProposalConf.addProposal(SSVM::Proposal::BulkMemoryOperations);
ProposalConf.addProposal(SSVM::Proposal::ReferenceTypes);
ProposalConf.addProposal(SSVM::Proposal::SIMD);
}

void SSVMAddon::InitVM(const Napi::CallbackInfo &Info) {
Expand All @@ -133,7 +138,7 @@ void SSVMAddon::InitVM(const Napi::CallbackInfo &Info) {
Configure = new SSVM::VM::Configure();
Configure->addVMType(SSVM::VM::Configure::VMType::Wasi);
Configure->addVMType(SSVM::VM::Configure::VMType::SSVM_Process);
VM = new SSVM::VM::VM(*Configure);
VM = new SSVM::VM::VM(ProposalConf, *Configure);
VM->registerModule(StorageMod);
VM->registerModule(ImageMod);
VM->registerModule(TensorflowMod);
Expand Down Expand Up @@ -195,7 +200,7 @@ void SSVMAddon::ThrowNapiError(const Napi::CallbackInfo &Info, ErrorType Type) {
bool SSVMAddon::Compile() {
/// BC can be Bytecode or FilePath
if (BC.isFile()) {
SSVM::Loader::Loader Loader;
SSVM::Loader::Loader Loader(ProposalConf);

/// File mode
/// We have to load bytecode from given file first.
Expand Down Expand Up @@ -228,7 +233,7 @@ bool SSVMAddon::Compile() {
}

bool SSVMAddon::CompileBytecodeTo(const std::string &Path) {
SSVM::Loader::Loader Loader;
SSVM::Loader::Loader Loader(ProposalConf);

/// BC can be Bytecode or FilePath
if (BC.isFile()) {
Expand Down
2 changes: 2 additions & 0 deletions ssvmaddon.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "storage_module.h"
#include "tensorflow_module.h"
#include "tensorflowlite_module.h"

#include <napi.h>
#include <string>
#include <vector>
Expand Down Expand Up @@ -44,6 +45,7 @@ class SSVMAddon : public Napi::ObjectWrap<SSVMAddon> {
using ErrorType = SSVM::NAPI::ErrorType;
static Napi::FunctionReference Constructor;
SSVM::VM::Configure *Configure;
SSVM::ProposalConfigure ProposalConf;
SSVM::VM::VM *VM;
SSVM::Runtime::Instance::MemoryInstance *MemInst;
SSVM::Statistics::Statistics Stat;
Expand Down

0 comments on commit f243a48

Please sign in to comment.