-
Notifications
You must be signed in to change notification settings - Fork 1
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: add imports, use decorator for exports #7
Conversation
This is currently in a working state, but failing with wazero in compiler mode: tetratelabs/wazero#2313 - waiting to see if there's a potential fix or if we should switch back to interpreter mode in the CLI before merging this. |
asset_name: extism-py-aarch64-macos-${{ github.event.release.tag_name }} | ||
shasum_cmd: shasum -a 256 | ||
target: aarch64-apple-darwin | ||
# - name: windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you have some issues with windows? not a blocker just curious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it was failing (maybe because of something about locating the python library?) but I want to try to figure out what's going on using an actual Windows machine instead of debugging on CI.
examples/imports.py
Outdated
@extism.import_fn("example", "do_something") | ||
def do_something(): | ||
pass | ||
|
||
@extism.import_fn("example", "reflect") | ||
def reflect(x: str) -> str: | ||
pass | ||
|
||
@extism.plugin_fn | ||
def count_vowels(): | ||
input = reflect(extism.input_str()) | ||
do_something() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! a few questions but no blockers
Closes #4
Closes #5
Closes #6
__all__
to using theplugin_fn
decorator