Skip to content

Commit

Permalink
[refactor] Introduce WasmEdge_FunctionInstanceGetData to drop host …
Browse files Browse the repository at this point in the history
…data (WasmEdge#84)

* feat(rust-sys): drop host_data in `Function::drop`

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): update `drop` of `ImportModule` and `Function`

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sdk): update test code

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): update `drop` of `ImportModule` and `Function`

Signed-off-by: Xin Liu <sam@secondstate.io>

* refactor(rust-sys): update `ImportModule::drop`

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): remove debug code

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sdk): remove debug code

Signed-off-by: Xin Liu <sam@secondstate.io>

* version(rust-sdk): bump to `0.13.0`

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): supress clippy warning

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(ci-build): update rust version

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci(standalone): update rust version

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): update rustdoc

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sdk): update rustdoc and `README`

Signed-off-by: Xin Liu <sam@secondstate.io>

* chore(rust-sys): update dependencies

Signed-off-by: Xin Liu <sam@secondstate.io>

* ci: update to `macos-13`

Signed-off-by: Xin Liu <sam@secondstate.io>

---------

Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss authored Nov 7, 2023
1 parent 3146e89 commit c80ddb4
Show file tree
Hide file tree
Showing 12 changed files with 266 additions and 48 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]
container:
image: wasmedge/wasmedge:ubuntu-build-clang

Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]
container:
image: fedora:latest

Expand Down Expand Up @@ -166,8 +166,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12]
rust: [1.72, 1.71, 1.70.0]
os: [macos-12, macos-13]
rust: [1.73, 1.72, 1.71]

steps:
- name: Checkout sources
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]
env:
WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge
WASMEDGE_BUILD_DIR: ${{ github.workspace }}\WasmEdge\build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]

steps:
- name: Checkout WasmEdge Rust SDK
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]

steps:
- name: Checkout WasmEdge Rust SDK
Expand Down Expand Up @@ -89,8 +89,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12]
rust: [1.72, 1.71, 1.70.0]
os: [macos-12, macos-13]
rust: [1.73, 1.72, 1.71]

steps:
- name: Checkout sources
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.72, 1.71, 1.70.0]
rust: [1.73, 1.72, 1.71]
container:
image: fedora:latest

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
name = "wasmedge-sdk"
readme = "README.md"
repository = "https://github.com/WasmEdge/wasmedge-rust-sdk"
version = "0.12.3-dev"
version = "0.13.0"

[dependencies]
anyhow = "1.0"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This crate depends on the WasmEdge C API. In linux/macOS the crate can download

| wasmedge-sdk | WasmEdge lib | wasmedge-sys | wasmedge-types| wasmedge-macro| async-wasi|
| :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | :-------: |
| 0.13.0 | 0.13.5 | 0.17.3 | 0.4.4 | 0.6.1 | 0.1.0 |
| 0.12.2 | 0.13.4 | 0.17.2 | 0.4.4 | 0.6.1 | 0.1.0 |
| 0.12.1 | 0.13.4 | 0.17.1 | 0.4.4 | 0.6.1 | 0.1.0 |
| 0.12.0 | 0.13.4 | 0.17.0 | 0.4.4 | 0.6.1 | 0.1.0 |
Expand Down Expand Up @@ -58,7 +59,7 @@ The following architectures are supported for automatic downloads:

This crate uses `rust-bindgen` during the build process. If you would like to use an external `rust-bindgen` you can set the `WASMEDGE_RUST_BINDGEN_PATH` environment variable to the `bindgen` executable path. This is particularly useful in systems like Alpine Linux (see [rust-lang/rust-bindgen#2360](https://github.com/rust-lang/rust-bindgen/issues/2360#issuecomment-1595869379), [rust-lang/rust-bindgen#2333](https://github.com/rust-lang/rust-bindgen/issues/2333)).

**Notice:** The minimum supported Rust version is 1.70.
**Notice:** The minimum supported Rust version is 1.71.

## API Reference

Expand Down
4 changes: 2 additions & 2 deletions crates/wasmedge-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/WasmEdge/wasmedge-rust-sdk"
version = "0.17.3"

[dependencies]
fiber-for-wasmedge = { version = "8.0.1", optional = true }
fiber-for-wasmedge = { version = "14.0.4", optional = true }
libc = "0.2.94"
paste = "1.0.5"
scoped-tls = "1"
Expand All @@ -32,7 +32,7 @@ async-wasi = { workspace = true, optional = true }
setjmp = "0.1"

[build-dependencies]
bindgen = { version = "0.65", default-features = false, features = ["runtime"] }
bindgen = { version = "0.69", default-features = false, features = ["runtime"] }
cmake = "0.1"
reqwest = { version = "0.11", default-features = false, features = [
"blocking",
Expand Down
2 changes: 1 addition & 1 deletion crates/wasmedge-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn main() {
.clang_arg(format!("-I{inc_dir}"))
.prepend_enum_name(false) // The API already prepends the name.
.dynamic_link_require_all(true)
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate()
.expect("failed to generate bindings")
.write_to_file(out_file)
Expand Down
Loading

0 comments on commit c80ddb4

Please sign in to comment.