extism / php-sdk

Extism PHP Host SDK - easily run WebAssembly modules / plugins from PHP applications
https://extism.org
BSD 3-Clause "New" or "Revised" License
20 stars 4 forks source link

extism.h inconsistent #9

Closed davidbuzz closed 10 months ago

davidbuzz commented 10 months ago

why is src/extism.h in this repo differnet to what gets installed by either of these: sudo extism lib install latest sudo extism lib install --version git

sudo extism lib install latest Installing v1.0.0 to /usr/local Fetching https://github.com/extism/extism/releases/download/v1.0.0/libextism-x86_64-unknown-linux-gnu-v1.0.0.tar.gz Copying extism.h to /usr/local/include/extism.h Copying libextism.so to /usr/local/lib/libextism.so Copying libextism.a to /usr/local/lib/libextism.a Copying extism.pc.in to /usr/local/lib/pkgconfig/extism.pc Copying extism-static.pc.in to /usr/local/lib/pkgconfig/extism-static.pc

diff ~/php-sdk/src/extism.h /usr/local/include/extism.h 99a100,105

/**

  • Log drain callback / typedef void (ExtismLogDrainFunctionType)(const char *data, ExtismSize size);

100a107,109

ifdef __cplusplus

extern "C" {

endif // __cplusplus

253a263,279

  • Enable a custom log handler, this will buffer logs until extism_log_drain is called
  • Log level should be one of: info, error, trace, debug, warn / bool extism_log_custom(const char log_level);

/**

  • Calls the provided callback function for each buffered log line.
  • This is only needed when extism_log_custom is used. */ void extism_log_drain(ExtismLogDrainFunctionType handler);

/**

  • Reset the Extism runtime, this will invalidate all allocated memory / bool extism_plugin_reset(ExtismPlugin plugin);

/** 256a283,286

ifdef __cplusplus

} // extern "C"

endif // __cplusplus

'sudo extism lib install --version git' gives the same result as above

cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=23.04 DISTRIB_CODENAME=lunar DISTRIB_DESCRIPTION="Ubuntu 23.04"

davidbuzz commented 10 months ago

someone wanna approve the workflow run for my first PR? https://github.com/extism/php-sdk/pull/10 nudge.

nilslice commented 10 months ago

@davidbuzz done! thank you