You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: use extism:env namespace
* cleanup: rename namespaced functions
* fix: proc macro
* chore: use extism:user namespace by default for user-defined host functions
* cleanup: fix host_fn attr
* chore: bump version
* fix: use extism:host/user instead of extism:user
* fix: use extism:host/env and extism:host/user
* chore: clippy
* chore: fix ci test
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,6 +242,12 @@ extern "ExtismHost" {
242
242
}
243
243
```
244
244
245
+
To declare a host function in a specific namespace, pass the module name to the `host_fn` macro:
246
+
247
+
```rust
248
+
#[host_fn("extism:host/user")]
249
+
```
250
+
245
251
> **Note**: The types we accept here are the same as the exports as the interface also uses the [convert crate](https://docs.rs/extism-convert/latest/extism_convert/).
246
252
247
253
To call this function, we must use the `unsafe` keyword. Also note that it automatically wraps the
0 commit comments