diff --git a/CHANGELOG.md b/CHANGELOG.md index a27ab4a4..16dae2f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,19 @@ All notable changes to this project will be documented in this file. ## Table of Contents +* [1.0.0-beta2](#100-beta2---2021-01-05) * [1.0.0-beta1](#100-beta1---2020-12-03) * [0.3.1](#031---2020-02-03) * [0.3.0](#030---2020-02-02) * [0.2.0](#020---2019-07-16) * [0.1.0](#010---2019-05-29) +## [1.0.0-beta2] - 2021-01-05 + +### Changed + +* Update to Wasmer 1.0.0 + ## [1.0.0-beta1] - 2020-12-03 ### Changed diff --git a/Cargo.toml b/Cargo.toml index 91980200..5073e435 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] publish = false name = "wasmer-go" -version = "0.2.0" +version = "1.0.0-beta2" authors = ["Wasmer Engineering Team "] edition = "2018" description = "Go library to run WebAssembly binaries" @@ -14,4 +14,4 @@ categories = ["wasm"] crate-type = ["cdylib"] [dependencies] -wasmer = "1.0.0-alpha5" \ No newline at end of file +wasmer = "1.0" \ No newline at end of file diff --git a/examples/example_errors_test.go b/examples/example_errors_test.go index 5dfeef43..1619d24d 100644 --- a/examples/example_errors_test.go +++ b/examples/example_errors_test.go @@ -106,5 +106,5 @@ func ExampleError() { // Calling `div_by_zero` function... // Error caught from `div_by_zero`: integer divide by zero // Frame #2: function index: 0 - // Frame #1: function index: 50 + // Frame #1: function index: 1 } diff --git a/wasmer/packaged/include/wasmer_wasm.h b/wasmer/packaged/include/wasmer_wasm.h index e11a38dc..23661e63 100644 --- a/wasmer/packaged/include/wasmer_wasm.h +++ b/wasmer/packaged/include/wasmer_wasm.h @@ -39,11 +39,11 @@ #define WASMER_WASI_ENABLED // This file corresponds to the following Wasmer version. -#define WASMER_VERSION "1.0.0-beta2" +#define WASMER_VERSION "1.0.0" #define WASMER_VERSION_MAJOR 1 #define WASMER_VERSION_MINOR 0 #define WASMER_VERSION_PATCH 0 -#define WASMER_VERSION_PRE "beta2" +#define WASMER_VERSION_PRE "" #endif // WASMER_WASM_H_PRELUDE diff --git a/wasmer/packaged/lib/darwin-amd64/libwasmer.dylib b/wasmer/packaged/lib/darwin-amd64/libwasmer.dylib index 9006b31b..321ed184 100755 Binary files a/wasmer/packaged/lib/darwin-amd64/libwasmer.dylib and b/wasmer/packaged/lib/darwin-amd64/libwasmer.dylib differ diff --git a/wasmer/packaged/lib/linux-amd64/libwasmer.so b/wasmer/packaged/lib/linux-amd64/libwasmer.so index ee52bb6f..f7c26255 100755 Binary files a/wasmer/packaged/lib/linux-amd64/libwasmer.so and b/wasmer/packaged/lib/linux-amd64/libwasmer.so differ diff --git a/wasmer/trap.go b/wasmer/trap.go index 686441e9..9813a38b 100644 --- a/wasmer/trap.go +++ b/wasmer/trap.go @@ -77,7 +77,7 @@ func (self *Trap) Message() string { runtime.KeepAlive(self) - goBytes := C.GoBytes(unsafe.Pointer(bytes.data), C.int(bytes.size)) + goBytes := C.GoBytes(unsafe.Pointer(bytes.data), C.int(bytes.size) - 1) C.wasm_byte_vec_delete(&bytes) return string(goBytes) @@ -179,11 +179,11 @@ func newTrace(trap *Trap) *trace { firstFrame := unsafe.Pointer(self.inner().data) sizeOfFramePointer := unsafe.Sizeof(firstFrame) - var currentFramePointer *C.wasm_frame_t + var currentFramePointer **C.wasm_frame_t for nth := 0; nth < numberOfFrames; nth++ { - currentFramePointer = (*C.wasm_frame_t)(unsafe.Pointer(uintptr(firstFrame) + uintptr(nth)*sizeOfFramePointer)) - frames[nth] = newFrame(currentFramePointer, self) + currentFramePointer = (**C.wasm_frame_t)(unsafe.Pointer(uintptr(firstFrame) + uintptr(nth) * sizeOfFramePointer)) + frames[nth] = newFrame(*currentFramePointer, self) } self.frames = frames