/extism-init

extism-init is a tool used to initialize a Zig Extism Plug-in

Primary LanguageGoOtherNOASSERTION

extism-init ✨

This is a command line tool that acts as a companion to the Extism 💀 zig-pdk module for Zig

extism-init is used to create a directory containing code that allows you to promptly get started coding on a plugin for Extism using Zig.

The Zig build .target is declared as .{ .abi = .musl, .os_tag = .freestanding, .cpu_arch = .wasm32 } and .optimize is set to .ReleaseSmall

Important

No need to specify -Doptimize=ReleaseSmall

Installation

(Requires you to have Go installed)

go install github.com/extism/cli/extism@latest
go install github.com/peterhellberg/extism-init@latest

Usage

(Requires you to have an up to date (nightly) version of Zig installed, as well as the Extism CLI.

extism-init myplugin
cd myplugin
zig build
extism call ./zig-out/bin/myplugin.wasm greet --input "Jane Doe"

🌱