Convert the bundled backend/internal/plugins/smartblock package into a standalone reactor-mode wasm plugin: - package smartblock -> package main; add wasip1 main.go with wasmguest.Serve(Registration). - Add go.mod (module git.dev.alexdunmow.com/block/smartblock) pinning block/core v0.18.2; no replace directives. - Flesh out plugin.mod (scope=ninja, kind=plugin, categories, tags, display_name, description). - Point web/eslint.config.js at ../../../cms/web/eslint.config.js and switch @block-ninja/ui from workspace:* to the ^0.1.0 registry version; rebuild web/dist. - Add .gitignore (*.bnp, *.wasm, web/node_modules). Behavior unchanged: registers the "smart" block; assets served from web/dist. Builds to smartblock-1.0.0.bnp; check-safety passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
497 B
Go
14 lines
497 B
Go
//go:build wasip1
|
|
|
|
// Package main compiles the Smart Block plugin to a wasip1 reactor-mode wasm
|
|
// guest. `ninja plugin build` produces the .bnp artifact the registry serves;
|
|
// the host runs `_initialize` once per pooled instance, invoking this init
|
|
// (hence wasmguest.Serve) before any ABI hook call. main is never called.
|
|
package main
|
|
|
|
import "git.dev.alexdunmow.com/block/core/plugin/wasmguest"
|
|
|
|
func init() { wasmguest.Serve(Registration) }
|
|
|
|
func main() {} // never called — reactor mode
|