Skip to content

Conversation

@zshipko
Copy link

@zshipko zshipko commented Sep 10, 2024

Closes #4
Closes #5
Closes #6

  • Adds ability to call imports
  • Converts exports from being specified using __all__ to using the plugin_fn decorator
  • Also adds CI

@zshipko
Copy link
Author

zshipko commented Sep 12, 2024

This is currently in a working state, but failing with wazero in compiler mode: wazero/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.

@zshipko zshipko marked this pull request as ready for review September 16, 2024 21:05
asset_name: extism-py-aarch64-macos-${{ github.event.release.tag_name }}
shasum_cmd: shasum -a 256
target: aarch64-apple-darwin
# - name: windows
Copy link
Contributor

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

Copy link
Author

@zshipko zshipko Sep 16, 2024

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.

Comment on lines 4 to 15
@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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :)

Copy link
Contributor

@bhelx bhelx left a 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

@zshipko zshipko merged commit b5aad15 into main Sep 17, 2024
@zshipko zshipko deleted the imports branch September 17, 2024 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants