Skip to content

Commit

Permalink
maintenance(lib/runtime): remove wasmtime (ChainSafe#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
noot authored Oct 13, 2021
1 parent 666ed06 commit a095d95
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 997 deletions.
3 changes: 0 additions & 3 deletions cmd/gossamer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime/life"
"github.com/ChainSafe/gossamer/lib/runtime/wasmer"
"github.com/ChainSafe/gossamer/lib/runtime/wasmtime"
"github.com/ChainSafe/gossamer/lib/utils"

log "github.com/ChainSafe/log15"
Expand Down Expand Up @@ -597,8 +596,6 @@ func setDotCoreConfig(ctx *cli.Context, tomlCfg ctoml.CoreConfig, cfg *dot.CoreC
switch tomlCfg.WasmInterpreter {
case wasmer.Name:
cfg.WasmInterpreter = wasmer.Name
case wasmtime.Name:
cfg.WasmInterpreter = wasmtime.Name
case life.Name:
cfg.WasmInterpreter = life.Name
case "":
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/overview/package-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Gossamer packages can be categorized into **four package types**:

#### `lib/runtime`

- the **runtime package** contains various wasm interpreters used to interpret the runtime. It currently contains `life`, `wasmer`, and `wasmtime`; however, `wasmer` is the only interpreter that is fully supported at the moment. In the future, all interpreters will be fully supported.
- the **runtime package** contains various wasm interpreters used to interpret the runtime. It currently contains `life` and `wasmer`; however, `wasmer` is the only interpreter that is fully supported at the moment. In the future, all interpreters will be fully supported.

#### `lib/scale`

Expand Down
18 changes: 0 additions & 18 deletions dot/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
"github.com/ChainSafe/gossamer/lib/runtime"
"github.com/ChainSafe/gossamer/lib/runtime/life"
"github.com/ChainSafe/gossamer/lib/runtime/wasmer"
"github.com/ChainSafe/gossamer/lib/runtime/wasmtime"
"github.com/ChainSafe/gossamer/lib/utils"
)

Expand Down Expand Up @@ -152,23 +151,6 @@ func createRuntime(cfg *Config, ns runtime.NodeStorage, st *state.Service, ks *k
if err != nil {
return nil, fmt.Errorf("failed to create runtime executor: %s", err)
}
case wasmtime.Name:
rtCfg := &wasmtime.Config{
Imports: wasmtime.ImportNodeRuntime,
}
rtCfg.Storage = ts
rtCfg.Keystore = ks
rtCfg.LogLvl = cfg.Log.RuntimeLvl
rtCfg.NodeStorage = ns
rtCfg.Network = net
rtCfg.Role = cfg.Core.Roles
rtCfg.CodeHash = codeHash

// create runtime executor
rt, err = wasmtime.NewInstance(code, rtCfg)
if err != nil {
return nil, fmt.Errorf("failed to create runtime executor: %s", err)
}
case life.Name:
rtCfg := &life.Config{
Resolver: new(life.Resolver),
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/ChainSafe/log15 v1.0.0
github.com/OneOfOne/xxhash v1.2.5
github.com/btcsuite/btcutil v1.0.2
github.com/bytecodealliance/wasmtime-go v0.20.0
github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.0
github.com/chyeh/pubip v0.0.0-20170203095919-b7e679cf541c
github.com/cosmos/go-bip39 v1.0.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/bytecodealliance/wasmtime-go v0.20.0 h1:omD0VY6IwL60E8YMM8rgcmyGT8O+pqabHAwoPi5il6k=
github.com/bytecodealliance/wasmtime-go v0.20.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI=
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.0 h1:nwmK0bGIN67YBkqW/nAhgyhkCOv1nrFS3otY0qoQFeE=
Expand Down
165 changes: 0 additions & 165 deletions lib/runtime/wasmtime/exports.go

This file was deleted.

87 changes: 0 additions & 87 deletions lib/runtime/wasmtime/exports_test.go

This file was deleted.

Loading

0 comments on commit a095d95

Please sign in to comment.