Skip to content

Commit

Permalink
chore: Bump to wasmer 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jubianchi committed Jan 5, 2021
1 parent 10c11f8 commit 716adcc
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
publish = false
name = "wasmer-go"
version = "0.2.0"
version = "1.0.0-beta2"
authors = ["Wasmer Engineering Team <[email protected]>"]
edition = "2018"
description = "Go library to run WebAssembly binaries"
Expand All @@ -14,4 +14,4 @@ categories = ["wasm"]
crate-type = ["cdylib"]

[dependencies]
wasmer = "1.0.0-alpha5"
wasmer = "1.0"
2 changes: 1 addition & 1 deletion examples/example_errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions wasmer/packaged/include/wasmer_wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified wasmer/packaged/lib/darwin-amd64/libwasmer.dylib
Binary file not shown.
Binary file modified wasmer/packaged/lib/linux-amd64/libwasmer.so
Binary file not shown.
8 changes: 4 additions & 4 deletions wasmer/trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 716adcc

Please sign in to comment.