https://github.com/peterhellberg/extism-init
extism-init is a tool used to initialize a Zig Extism Plug-in
https://github.com/peterhellberg/extism-init
Last synced: 8 months ago
JSON representation
extism-init is a tool used to initialize a Zig Extism Plug-in
- Host: GitHub
- URL: https://github.com/peterhellberg/extism-init
- Owner: peterhellberg
- License: other
- Created: 2024-01-16T12:30:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-16T12:43:14.000Z (about 2 years ago)
- Last Synced: 2025-03-04T01:49:46.882Z (12 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# extism-init :sparkles:
This is a command line tool that acts as a companion to the
[Extism](https://extism.org/) :skull:
[zig-pdk](https://github.com/extism/zig-pdk/) module
for [Zig](https://ziglang.org/) :zap:
`extism-init` is used to create a directory containing code
that allows you to promptly get started coding on a plugin
for [Extism](https://extism.org/) 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](https://go.dev/) installed)
```sh
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](https://ziglang.org/download/#release-master) installed,
as well as the [Extism CLI](https://extism.org/docs/install).
```sh
extism-init myplugin
cd myplugin
zig build
extism call ./zig-out/bin/myplugin.wasm greet --input "Jane Doe"
```
:seedling: