Skip to content

Commit

Permalink
[Changelog] Update changelog for v0.13.0 release.
Browse files Browse the repository at this point in the history
Signed-off-by: YiYing He <yiying@secondstate.io>
  • Loading branch information
q82419 committed Jul 19, 2023
1 parent 6e540a2 commit bbd93f8
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 158 deletions.
14 changes: 12 additions & 2 deletions .CurrentChangelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
### v0.12.1 (2023-06-28)
### v0.13.0 (2023-07-19)

Breaking Changes:

* Removed the WasmEdge extensions related APIs. Replaced by the corresponding plug-ins.
* Removed `wasmedge.NewImageModule()` API.
* Removed `wasmedge.NewTensorflowModule()` API.
* Removed `wasmedge.NewTensorflowLiteModule()` API.
* Fixed the `(wasmedge.Executor).Invoke()` API to remove the first `wasmedge.Store` parameter.
* Added `wasmedge.RunWasmEdgeUnifiedCLI()` API.
* Added `wasmedge.AsyncInvoke()` API.

Features:

* Updated to the [WasmEdge 0.12.1](https://github.com/WasmEdge/WasmEdge/releases/tag/0.12.1).
* Updated to the [WasmEdge 0.13.0](https://github.com/WasmEdge/WasmEdge/releases/tag/0.13.0).
28 changes: 6 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.17.x', '1.18.x', '1.19.x' ]
go: [ '1.19.x', '1.20.x' ]
name: Build WasmEdge-go on Ubuntu 20.04 x86_64 with Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v2
Expand All @@ -31,25 +31,17 @@ jobs:
run: go version
- name: Install wasmedge
run: |
wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.12.1
- name: Build WasmEdge-go without any extensions
wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.13.0
- name: Build WasmEdge-go
run: |
source $HOME/.wasmedge/env
go build ./wasmedge/
- name: Build WasmEdge-go with tensorflow and images extensions
run: |
source $HOME/.wasmedge/env
go build -tags image,tensorflow ./wasmedge/
- name: Build WasmEdge-go with tensorflowlite and images extensions
run: |
source $HOME/.wasmedge/env
go build -tags image,tensorflowlite ./wasmedge/
build_macos:
runs-on: macos-11
strategy:
matrix:
go: [ '1.17.x', '1.18.x', '1.19.x' ]
go: [ '1.19.x', '1.20.x' ]
name: Build WasmEdge-go on MacOS 11 x86_64 with Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v2
Expand All @@ -61,16 +53,8 @@ jobs:
run: go version
- name: Install wasmedge
run: |
wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.12.1
- name: Build WasmEdge-go without any extensions
wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.13.0
- name: Build WasmEdge-go
run: |
source $HOME/.wasmedge/env
go build ./wasmedge/
- name: Build WasmEdge-go with tensorflow and images extensions
run: |
source $HOME/.wasmedge/env
go build -tags image,tensorflow ./wasmedge/
- name: Build WasmEdge-go with tensorflowlite and images extensions
run: |
source $HOME/.wasmedge/env
go build -tags image,tensorflowlite ./wasmedge/
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.18.x', '1.19.x' ]
go: [ '1.19.x', '1.20.x' ]
name: Run WasmEdge-go-examples in AOT mode with Go ${{ matrix.go }}

steps:
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

strategy:
matrix:
go: [ '1.18.x', '1.19.x' ]
go: [ '1.19.x', '1.20.x' ]
name: Run WasmEdge-go-examples in interpreter mode with Go ${{ matrix.go }}

steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ jobs:
body_path: .CurrentChangelog.md
draft: true
prerelease: true

16 changes: 16 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
### v0.13.0 (2023-07-19)

Breaking Changes:

* Removed the WasmEdge extensions related APIs. Replaced by the corresponding plug-ins.
* Removed `wasmedge.NewImageModule()` API.
* Removed `wasmedge.NewTensorflowModule()` API.
* Removed `wasmedge.NewTensorflowLiteModule()` API.
* Fixed the `(wasmedge.Executor).Invoke()` API to remove the first `wasmedge.Store` parameter.
* Added `wasmedge.RunWasmEdgeUnifiedCLI()` API.
* Added `wasmedge.AsyncInvoke()` API.

Features:

* Updated to the [WasmEdge 0.13.0](https://github.com/WasmEdge/WasmEdge/releases/tag/0.13.0).

### v0.12.1 (2023-06-28)

Features:
Expand Down
62 changes: 6 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,72 +16,22 @@ $ go version
go version go1.16.5 linux/amd64
```

Developers must [install the WasmEdge shared library](https://wasmedge.org/book/en/start/install.html) with the same `WasmEdge-go` release version.
Developers must [install the WasmEdge shared library](https://wasmedge.org/docs/start/install) with the same `WasmEdge-go` release version.

```bash
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.12.1
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.13.0
```

For the developers need the `TensorFlow` or `Image` extension for `WasmEdge-go`, please install the `WasmEdge` with extensions:
For the developers need the `WasmEdge-TensorFlow` or `WasmEdge-Image` plug-ins for `WasmEdge-go`, please install the `WasmEdge` with the corresponding plug-ins:

```bash
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.12.1
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasmedge_tensorflow wasmedge_tensorflowlite wasmedge_image -v 0.13.0
```

Noticed that the `TensorFlow` and `Image` extensions are only for the `Linux` platforms.

**The `TensorFlow` and `Image` extensions for `darwin x86_64` platforms are in the preview stage and unstable now.**

Install the `WasmEdge-go` package and build in your Go project directory:

```bash
go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
go build
```

## WasmEdge-go Extensions

By default, the `WasmEdge-go` only turns on the basic runtime.

`WasmEdge-go` has the following extensions:

* Tensorflow
* This extension supports the host functions in [WasmEdge-tensorflow](https://github.com/second-state/WasmEdge-tensorflow), includes both `TensorFlow` and `TensorFlow-Lite`.
* The `TensorFlow` extension when installing `WasmEdge` is required. Please install `WasmEdge` with the `-e tensorflow` command.
* For using this extension, the tag `tensorflow` when building is required:

```bash
go build -tags tensorflow
```

* Tensorfloe-Lite
* This extension supports the host functions in [WasmEdge-tensorflow](https://github.com/second-state/WasmEdge-tensorflow) with only `TensorFlow-Lite`.
* The `TensorFlow` extension when installing `WasmEdge` is required. Please install `WasmEdge` with the `-e tensorflow` command.
* For the `aarch64` platforms which only supports `TensorFlow-Lite`, please build with this tag.
* **THIS TAG CANNOT BE USED WITH THE `tensorflow` TAG.**
* For using this extension, the tag `tensorflowlite` when building is required:

```bash
go build -tags tensorflowlite
```

* Image
* This extension supports the host functions in [WasmEdge-image](https://github.com/second-state/WasmEdge-image).
* The `Image` extension when installing `WasmEdge` is required. Please install `WasmEdge` with the `-e image` command.
* For using this extension, the tag `image` when building is required:

```bash
go build -tags image
```

Users can also turn on the multiple extensions when building:

```bash
go build -tags image,tensorflow
```
> Note: Please refer to the [install guide for plug-ins](https://wasmedge.org/docs/start/install/#install-wasmedge-plug-ins-and-dependencies) to check that you've installed the plug-ins with their dependencies.
For examples, please refer to the [example repository](https://github.com/second-state/WasmEdge-go-examples/).

## WasmEdge-go Documentation

Please refer to the [API Documentation](https://wasmedge.org/book/en/embed/go/ref.html) for details.
Please refer to the [API Documentation](https://wasmedge.org/docs/embed/go/reference/latest) for details.
11 changes: 11 additions & 0 deletions wasmedge/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ func RunWasmEdgeCLI(argv []string) int {
freeCStringArray(cargv)
return int(ret)
}

func RunWasmEdgeUnifiedCLI(argv []string) int {
cargv := toCStringArray(argv)
var ptrcargv *(*C.char) = nil
if len(cargv) > 0 {
ptrcargv = &cargv[0]
}
ret := C.WasmEdge_Driver_UniTool(C.int(len(cargv)), ptrcargv)
freeCStringArray(cargv)
return int(ret)
}
15 changes: 14 additions & 1 deletion wasmedge/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (self *Executor) RegisterImport(store *Store, module *Module) error {
return nil
}

func (self *Executor) Invoke(store *Store, funcinst *Function, params ...interface{}) ([]interface{}, error) {
func (self *Executor) Invoke(funcinst *Function, params ...interface{}) ([]interface{}, error) {
ftype := funcinst.GetFunctionType()
cparams := toWasmEdgeValueSlide(params...)
creturns := make([]C.WasmEdge_Value, ftype.GetReturnsLength())
Expand All @@ -92,6 +92,19 @@ func (self *Executor) Invoke(store *Store, funcinst *Function, params ...interfa
return fromWasmEdgeValueSlide(creturns), nil
}

func (self *Executor) AsyncInvoke(funcinst *Function, params ...interface{}) *Async {
cparams := toWasmEdgeValueSlide(params...)
var ptrparams *C.WasmEdge_Value = nil
if len(cparams) > 0 {
ptrparams = (*C.WasmEdge_Value)(unsafe.Pointer(&cparams[0]))
}
async := C.WasmEdge_ExecutorAsyncInvoke(self._inner, funcinst._inner, ptrparams, C.uint32_t(len(cparams)))
if async == nil {
return nil
}
return &Async{_inner: async, _own: true}
}

func (self *Executor) Release() {
if self._own {
C.WasmEdge_ExecutorDelete(self._inner)
Expand Down
19 changes: 0 additions & 19 deletions wasmedge/extension_image.go

This file was deleted.

28 changes: 0 additions & 28 deletions wasmedge/extension_tensorflow.go

This file was deleted.

27 changes: 0 additions & 27 deletions wasmedge/extension_tensorflowlite.go

This file was deleted.

0 comments on commit bbd93f8

Please sign in to comment.