Commit Graph

7 Commits

Author SHA1 Message Date
Steve Manuel
6b5f7999b7 fix: removes the stdout print of extism.h in php sdk (#112) 2022-11-30 16:30:06 -08:00
Steve Manuel
821661d391 fix: resolve php sdk issues (#95) 2022-11-28 18:04:27 -07:00
zach
87be73570d Add ExtismContext to SDK + better errors for failed register/update (#19)
- Adds `ExtismContext` instead of global `PLUGINS` registry
- Adds `extism_context_new`, `extism_context_free` and
`extism_context_reset`
- Requires updating nearly every SDK function to add context parameter
- Renames some SDK functions to follow better naming conventions
   - `extism_plugin_register` -> `extism_plugin_new`
   - `extism_output_get` -> `extism_plugin_output_data`
   - `extism_output_length` -> `extism_plugin_output_length`
   - `extism_call` -> `extism_plugin_call`
- Updates `extism_error` to return the context error when -1 issued for
the plug-in ID
- Adds `extism_plugin_free` to remove an existing plugin
- Updates SDKs to include these functions
- Updates SDK examples and comments

Co-authored-by: Steve Manuel <steve@dylib.so>
2022-09-20 14:53:15 -06:00
zach
7b27d4f883 feat: add extism_plugin_update (#6)
This gives host the ability to re-use plugin descriptors instead of
loading a new plugin each time. The plugin memory and everything is
reset, so no state is shared with the newly loaded plugin.

Co-authored-by: Steve Manuel <steve@dylib.so>
2022-09-09 00:39:57 -06:00
Steve Manuel
63ff9da8dc chore: remove runtime target, work on php release 2022-09-01 22:13:46 -06:00
Steve Manuel
263864e629 chore: prep php example to use composer 2022-09-01 20:38:12 -06:00
Steve Manuel
bd3de24218 chore: prepare repo for php packagist release 2022-09-01 19:53:31 -06:00