extism / cpp-sdk

Extism C++ Host SDK
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

feat: passing wasm as via ptr and len in manifest, revamp extism::Wasm #17

Closed G4Vi closed 6 months ago

G4Vi commented 6 months ago

Adding support of https://github.com/extism/extism/pull/657

Manifest::json by default is self contained (serialized wasm as base64). Pass false to instead get WasmBytes encoded as ptr and length.

WasmBytes is now much more flexible, it still can store a copy of the wasm, but can also instead use a smart pointer.

Deprecated the Wasm constructor using WasmSource as std::variant is now used to manage the types.

Manifest can now be constructed with wasm(s).