Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Support creating host functions from closures #20

Merged
merged 38 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2304ccb
feat(rust-sys): new API `Function::create_async_from_closure`
apepkuss Jul 6, 2023
58a6738
feat(rust-sys): new API `Function::create_from_sync_closure` and `Fun…
apepkuss Jul 6, 2023
5c289bd
chore(rust-sys): update rustdoc
apepkuss Jul 6, 2023
ee58b39
feat(rust-sdk): new APIs `Func::wrap_sync_closure` and `Func::wrap_as…
apepkuss Jul 6, 2023
b296a1b
feat(rust-sdk): new APIs `with_sync_closure` and `with_async_closure`…
apepkuss Jul 6, 2023
2a8ec90
ci(ci-build): update the workflow
apepkuss Jul 7, 2023
80d2c44
feat(rust-macro): add `sys_host_function_new` proc-macro
apepkuss Jul 7, 2023
47a2d9b
feat!(rust-sys): new APIs in `Function` and `ImportModule`
apepkuss Jul 7, 2023
bb3d302
feat!(rust-sdk): new APIs in `Func` and `ImportObjectBuilder`
apepkuss Jul 7, 2023
e05df22
refactor!(rust-sys): refactor `Function`, `ImportModule` and `AsyncWa…
apepkuss Jul 10, 2023
6da8698
refactor!(rust-sdk): refactor `Func`, `ImportObjectBuilder` and `Plug…
apepkuss Jul 10, 2023
20e2abf
refactor!(rust-sys): refactor `Function` and `ImportModule`
apepkuss Jul 10, 2023
230cc19
refactor!(rust-sdk): refactor `Func`, `ImportObjectBuilder` and `Plug…
apepkuss Jul 10, 2023
c29f49b
chore(rust-sys): fix clippy issues
apepkuss Jul 10, 2023
c389381
chore(rust-sdk): fix clippy issues
apepkuss Jul 10, 2023
6e19df7
chore(rust-sys): add compilation config
apepkuss Jul 10, 2023
5efde4d
chore(rust-sdk): update code
apepkuss Jul 10, 2023
eee34b0
chore(rust-sys): fix clippy issues
apepkuss Jul 10, 2023
0f25848
chore(rust-sdk): fix clippy issue
apepkuss Jul 10, 2023
4e419d6
chore(rust-sys): update code
apepkuss Jul 10, 2023
f3b461a
chore(rust-sdk): update code
apepkuss Jul 10, 2023
0924d97
feat!(rust-macro): update `host_function` proc-macro
apepkuss Jul 11, 2023
a4715b1
refactor(rust-sdk): refactor code
apepkuss Jul 11, 2023
6e69bd5
feat(rust-macro): define `sys_wasi_host_function` and `sys_async_wasi…
apepkuss Jul 11, 2023
5f0ae87
chore(rust-sys): update code
apepkuss Jul 11, 2023
97e6dd4
chore(rust-sdk): update code
apepkuss Jul 11, 2023
3229b3f
chore(rust-sys): format code
apepkuss Jul 11, 2023
8f8381f
refactor!(rust-sdk): rename `with_func_new` to `with_func`
apepkuss Jul 12, 2023
3c11037
chore(rust-sys): update `PluginModule`
apepkuss Jul 12, 2023
78b37b0
chore(rust-sys): update `ImportModule`, `WasiModule` and `AsyncWasiMo…
apepkuss Jul 12, 2023
550b3b9
chore(rust-sys): update `PluginModule`
apepkuss Jul 12, 2023
07431b7
refactor!(rust-sys): update `PluginModule::create`
apepkuss Jul 13, 2023
318c9e1
refactor(rust-sdk): update `PluginModuleBuilder`
apepkuss Jul 13, 2023
ec946dd
chore(rust-sys): remove the debug code
apepkuss Jul 13, 2023
f047707
version(rust-macro): bump to `0.5.0`
apepkuss Jul 13, 2023
4d9616c
version(rust-sys): bump to `0.15.0`
apepkuss Jul 13, 2023
1614292
version(rust-sdk): bump to `0.10.0-dev`
apepkuss Jul 13, 2023
66fee7d
refactor(rust-sys): update `ImportModule`, `WasiModule`, `AsyncWasiMo…
apepkuss Jul 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/test.yml → .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
- name: Test Rust SDK
run: |
cargo +nightly -Z sparse-registry update
cargo test --workspace --locked --features aot,wasmedge_process,ffi -- --nocapture
cargo test --workspace --locked --features aot,wasmedge_process,ffi -- --nocapture --test-threads=1

- name: Test Rust SDK with async feature
run: |
cargo +nightly -Z sparse-registry update
cargo test --workspace --locked --features aot,async,wasmedge_process,ffi -- --nocapture
cargo test --workspace --locked --features aot,async,wasmedge_process,ffi -- --nocapture --test-threads=1

build_fedora:
name: Fedora
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
export WASMEDGE_PLUGIN_PATH="$(pwd)/WasmEdge/build/plugins/wasmedge_process"
export LD_LIBRARY_PATH="$(pwd)/WasmEdge/build/lib/api"
cargo +nightly -Z sparse-registry update
cargo test --workspace --locked --features aot,wasmedge_process,ffi -- --nocapture
cargo test --workspace --locked --features aot,wasmedge_process,ffi -- --nocapture --test-threads=1

- name: Test Rust SDK with async feature
run: |
Expand All @@ -153,7 +153,7 @@ jobs:
export WASMEDGE_PLUGIN_PATH="$(pwd)/WasmEdge/build/plugins/wasmedge_process"
export LD_LIBRARY_PATH="$(pwd)/WasmEdge/build/lib/api"
cargo +nightly -Z sparse-registry update
cargo test --workspace --locked --features aot,async,wasmedge_process,ffi -- --nocapture
cargo test --workspace --locked --features aot,async,wasmedge_process,ffi -- --nocapture --test-threads=1

build_macos:
name: MacOS
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
- name: Test Rust Bindings
run: |
cargo +nightly -Z sparse-registry update
cargo test --workspace --exclude async-wasi --locked --features aot,ffi -- --nocapture
cargo test --workspace --exclude async-wasi --locked --features aot,ffi -- --nocapture --test-threads=1

build_windows:
name: Windows
Expand Down Expand Up @@ -288,4 +288,4 @@ jobs:
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0"
$env:Path="$env:Path;C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;D:\a\wasmedge-rust-sdk\wasmedge-rust-sdk\WasmEdge\build\lib\api"
cargo +nightly -Z sparse-registry update
cargo test --workspace --exclude async-wasi --features aot,ffi --locked -- --nocapture
cargo test --workspace --exclude async-wasi --features aot,ffi --locked -- --nocapture --test-threads=1
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ license = "Apache-2.0"
name = "wasmedge-sdk"
readme = "README.md"
repository = "https://github.com/WasmEdge/WasmEdge/blob/master/bindings/rust/wasmedge-sdk"
version = "0.9.0"
version = "0.10.0-dev"

[dependencies]
anyhow = "1.0"
num-derive = "0.3"
num-traits = "0.2"
thiserror = "1.0.30"
wasmedge-macro = {path = "crates/wasmedge-macro", version = "0.4"}
wasmedge-sys = {path = "crates/wasmedge-sys", version = "0.14", default-features = false}
wasmedge-macro = {path = "crates/wasmedge-macro", version = "0.5"}
wasmedge-sys = {path = "crates/wasmedge-sys", version = "0.15", default-features = false}
wasmedge-types = {path = "crates/wasmedge-types", version = "0.4"}
wat = "1.0"

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

[lib]
proc-macro = true
Expand Down
Loading