-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add export_fn * feat: add Pointer type to help with export_fn * test: add nothing test * cleanup: rename Pointer -> MemoryPointer * cleanup: derives * cleanup: rename export_fn -> shared_fn * doc: add example to plugin_fn and shared_fn
- Loading branch information
Showing
6 changed files
with
171 additions
and
7 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#![no_main] | ||
|
||
use extism_pdk::*; | ||
|
||
#[shared_fn] | ||
pub fn host_reflect(input: String) -> SharedFnResult<Vec<u8>> { | ||
Ok(input.to_lowercase().into_bytes()) | ||
} | ||
|
||
#[shared_fn] | ||
pub fn nothing() -> SharedFnResult<()> { | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters