Skip to content

Conversation

chrisdickinson
Copy link
Contributor

@chrisdickinson chrisdickinson commented Oct 7, 2023

The Makefile and make.bat are autogenerated via sphinx-quickstart; generally we'll want to use just docs instead. I left them in in case they're load-bearing for readthedocs (which we'll want to enable when we make this repo public.)

I added some light typing support and, in the process, noticed some rough edges around the @host_fn API – it struck me like there was some work in progress here. In particular the original docstring mentions returning values from the host function, but we don't appear to do anything with them. I also wonder if we should return a full-fledged Function from the wrapper function instead of having to do a two-step:

@extism.host_fn(inputs=[ValType.I32], outputs=[ValType.I64]) # infer name from function name if not given
def hello_world(plugin, inputs, outputs):
   ...

# vs...
@extism.host_fn
def hello_world(plugin, params, results):
    ...
fn = extism.Function("hello_world", [extism.ValType.I64], [], hello_world)

If no one is opposed I'll take a look at taking this on!

@chrisdickinson chrisdickinson force-pushed the chris/20231006-sphinx branch 2 times, most recently from b9fec29 to e571c6c Compare October 7, 2023 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant