diff --git a/elixir/lib/extism/context.ex b/elixir/lib/extism/context.ex index 092d6e9..93effcf 100644 --- a/elixir/lib/extism/context.ex +++ b/elixir/lib/extism/context.ex @@ -49,7 +49,7 @@ defmodule Extism.Context do ## Parameters - ctx: The Context to manage this plugin - - manifest: The String or Map of the WASM module or manifest + - manifest: The String or Map of the WASM module or [manifest](https://extism.org/docs/concepts/manifest) - wasi: A bool you set to true if you want WASI support """ diff --git a/elixir/lib/extism/plugin.ex b/elixir/lib/extism/plugin.ex index 8d8fea2..1ccd608 100644 --- a/elixir/lib/extism/plugin.ex +++ b/elixir/lib/extism/plugin.ex @@ -44,6 +44,14 @@ defmodule Extism.Plugin do @doc """ Updates the manifest of the given plugin + + ## Parameters + + - ctx: The Context to manage this plugin + - manifest: The String or Map of the WASM module or [manifest](https://extism.org/docs/concepts/manifest) + - wasi: A bool you set to true if you want WASI support + + """ def update(plugin, manifest, wasi) when is_map(manifest) do {:ok, manifest_payload} = JSON.encode(manifest) diff --git a/extism.go b/extism.go index 797dc3d..c097cdd 100644 --- a/extism.go +++ b/extism.go @@ -194,7 +194,7 @@ func (plugin Plugin) SetConfig(data map[string][]byte) error { return nil } -/// FunctionExists returns true when the name function is present in the plugin +// FunctionExists returns true when the named function is present in the plugin func (plugin Plugin) FunctionExists(functionName string) bool { name := C.CString(functionName) b := C.extism_plugin_function_exists(plugin.ctx.pointer, C.int(plugin.id), name) @@ -202,7 +202,7 @@ func (plugin Plugin) FunctionExists(functionName string) bool { return bool(b) } -/// Call a function by name with the given input, returning the output +// Call a function by name with the given input, returning the output func (plugin Plugin) Call(functionName string, input []byte) ([]byte, error) { ptr := makePointer(input) name := C.CString(functionName) diff --git a/node/src/index.ts b/node/src/index.ts index b1cb8a3..ebf5e55 100644 --- a/node/src/index.ts +++ b/node/src/index.ts @@ -161,6 +161,8 @@ export type ManifestWasm = ManifestWasmFile | ManifestWasmData; /** * The manifest which describes the {@link Plugin} code and * runtime constraints. + * + * @see [Extism > Concepts > Manifest](https://extism.org/docs/concepts/manifest) */ export type Manifest = { wasm: Array; @@ -216,7 +218,7 @@ export class Context { /** * Create a plugin managed by this context * - * @param manifest - The Manifest describing the plugin code and config + * @param manifest - The {@link Manifest} describing the plugin code and config * @param wasi - Set to `true` to enable WASI * @param config - Config details for the plugin * @returns A new Plugin scoped to this Context @@ -275,7 +277,7 @@ export class Plugin { * Constructor for a plugin. @see {@link Context#plugin}. * * @param ctx - The context to manage this plugin - * @param manifest - The manifest + * @param manifest - The {@link Manifest} * @param wasi - Set to true to enable WASI support * @param config - The plugin config */ @@ -324,7 +326,7 @@ export class Plugin { /** * Update an existing plugin with new WASM or manifest * - * @param manifest - The new manifest data + * @param manifest - The new {@link Manifest} data * @param wasi - Set to true to enable WASI support * @param config - The new plugin config */ diff --git a/python/extism/extism.py b/python/extism/extism.py index 9f64d37..f4c8db3 100644 --- a/python/extism/extism.py +++ b/python/extism/extism.py @@ -168,7 +168,7 @@ class Context: Parameters ---------- manifest : Union[str, bytes, dict] - A manifest dictionary describing the plugin or the raw bytes for a module + A manifest dictionary describing the plugin or the raw bytes for a module. See [Extism > Concepts > Manifest](https://extism.org/docs/concepts/manifest/). wasi : bool Set to `True` to enable WASI support config : dict @@ -220,7 +220,7 @@ class Plugin: Parameters ---------- plugin : Union[str, bytes, dict] - A manifest dictionary describing the plugin or the raw bytes for a module + A manifest dictionary describing the plugin or the raw bytes for a module. See [Extism > Concepts > Manifest](https://extism.org/docs/concepts/manifest/). wasi : bool Set to `True` to enable WASI support config : dict diff --git a/ruby/lib/extism.rb b/ruby/lib/extism.rb index abdbc55..0231290 100644 --- a/ruby/lib/extism.rb +++ b/ruby/lib/extism.rb @@ -86,7 +86,7 @@ module Extism # Create a new plugin from a WASM module or JSON encoded manifest # - # @param wasm [Hash, String] The manifest for the plugin + # @param wasm [Hash, String] The manifest for the plugin. See https://extism.org/docs/concepts/manifest/. # @param wasi [Boolean] Enable WASI support # @param config [Hash] The plugin config # @return [Plugin] @@ -121,7 +121,7 @@ module Extism # # @see Extism::Context#plugin # @param context [Context] The context to manager this plugin - # @param wasm [Hash, String] The manifest or WASM binary + # @param wasm [Hash, String] The manifest or WASM binary. See https://extism.org/docs/concepts/manifest/. # @param wasi [Boolean] Enable WASI support # @param config [Hash] The plugin config def initialize(context, wasm, wasi = false, config = nil) @@ -151,7 +151,7 @@ module Extism # Update a plugin with new WASM module or manifest # - # @param wasm [Hash, String] The manifest or WASM binary + # @param wasm [Hash, String] The manifest or WASM binary. See https://extism.org/docs/concepts/manifest/. # @param wasi [Boolean] Enable WASI support # @param config [Hash] The plugin config # @return [void]