Skip to content

Commit 039ce06

Browse files
authored
Bump to 0.39.0 (#138)
* Bump to 0.39.0 * Update bindings for 0.39.0
1 parent b62724c commit 039ce06

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
## Installation
2626

2727
```sh
28-
go get -u github.com/bytecodealliance/wasmtime-go@v0.38.1
28+
go get -u github.com/bytecodealliance/wasmtime-go@v0.39.0
2929
```
3030

3131
Be sure to check out the [API documentation][api]!
@@ -48,7 +48,7 @@ If you are a bazel user, add following to your WORKSPACE file:
4848
go_repository(
4949
name = "com_github_bytecodealliance_wasmtime_go",
5050
importpath = "github.com/bytecodealliance/wasmtime-go",
51-
version = "v0.38.1",
51+
version = "v0.39.0",
5252
)
5353
```
5454

ci/download-wasmtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import glob
1111

1212

13-
version = '0.38.0'
13+
version = '0.39.1'
1414
urls = [
1515
['wasmtime-v{}-x86_64-mingw-c-api.zip', 'windows-x86_64'],
1616
['wasmtime-v{}-x86_64-linux-c-api.tar.xz', 'linux-x86_64'],

config.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,9 @@ func (cfg *Config) SetConsumeFuel(enabled bool) {
111111
}
112112

113113
// SetStrategy configures what compilation strategy is used to compile wasm code
114-
func (cfg *Config) SetStrategy(strat Strategy) error {
115-
err := C.wasmtime_config_strategy_set(cfg.ptr(), C.wasmtime_strategy_t(strat))
114+
func (cfg *Config) SetStrategy(strat Strategy) {
115+
C.wasmtime_config_strategy_set(cfg.ptr(), C.wasmtime_strategy_t(strat))
116116
runtime.KeepAlive(cfg)
117-
if err != nil {
118-
return mkError(err)
119-
}
120-
return nil
121117
}
122118

123119
// SetCraneliftDebugVerifier configures whether the cranelift debug verifier will be active when
@@ -134,13 +130,9 @@ func (cfg *Config) SetCraneliftOptLevel(level OptLevel) {
134130
}
135131

136132
// SetProfiler configures what profiler strategy to use for generated code
137-
func (cfg *Config) SetProfiler(profiler ProfilingStrategy) error {
138-
err := C.wasmtime_config_profiler_set(cfg.ptr(), C.wasmtime_profiling_strategy_t(profiler))
133+
func (cfg *Config) SetProfiler(profiler ProfilingStrategy) {
134+
C.wasmtime_config_profiler_set(cfg.ptr(), C.wasmtime_profiling_strategy_t(profiler))
139135
runtime.KeepAlive(cfg)
140-
if err != nil {
141-
return mkError(err)
142-
}
143-
return nil
144136
}
145137

146138
// CacheConfigLoadDefault enables compiled code caching for this `Config` using the default settings

config_test.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ func TestConfig(t *testing.T) {
1111
NewConfig().SetWasmMultiValue(true)
1212
NewConfig().SetWasmMultiMemory(true)
1313
NewConfig().SetConsumeFuel(true)
14-
err := NewConfig().SetStrategy(StrategyAuto)
15-
if err != nil {
16-
panic(err)
17-
}
18-
err = NewConfig().SetStrategy(StrategyCranelift)
19-
if err != nil {
20-
panic(err)
21-
}
14+
NewConfig().SetStrategy(StrategyAuto)
15+
NewConfig().SetStrategy(StrategyCranelift)
2216
NewConfig().SetCraneliftDebugVerifier(true)
2317
NewConfig().SetCraneliftOptLevel(OptLevelNone)
2418
NewConfig().SetCraneliftOptLevel(OptLevelSpeed)
2519
NewConfig().SetCraneliftOptLevel(OptLevelSpeedAndSize)
2620
NewConfig().SetProfiler(ProfilingStrategyNone)
27-
err = NewConfig().CacheConfigLoadDefault()
21+
err := NewConfig().CacheConfigLoadDefault()
2822
if err != nil {
2923
panic(err)
3024
}

0 commit comments

Comments
 (0)