Skip to content

Commit

Permalink
Document raw import interface
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelx committed Jul 17, 2024
1 parent 6a3c50a commit 93a430c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,19 @@ python3 app.py
# => An argument to send to Python!
```

## Raw Import Interface

Like exports, with imports we do some magic to turn the parameters and returns into pointers for you.
In some rare situations, you might wish to pass raw wasm values to the host (not pointers).
If you do, you need to drop down into a raw interface.
E.g, imagine an interface that sums two i64s

```rust
extern "C" {
fn sum(a: i64, b: i64) -> i64;
}
```

### Reach Out!

Have a question or just want to drop in and say hi? [Hop on the Discord](https://extism.org/discord)!
Binary file added count_vowels.wasm
Binary file not shown.
Binary file modified test/code.wasm
Binary file not shown.
Binary file modified test/host_function.wasm
Binary file not shown.
Binary file modified test/http.wasm
Binary file not shown.

0 comments on commit 93a430c

Please sign in to comment.