Expand description
Helper crate for writing evenframe WASM plugins.
Supports three plugin types:
- Mock data plugins (
define_mock_data_plugin!): Generate mock data for individual fields. - Output rule plugins (
define_output_rule_plugin!): Provide convention-based annotations, permissions, events, derives, and field-level rules for existing structs. - Synthetic item plugins (
define_synthetic_item_plugin!): Emit new structs, tagged unions, and DB tables derived from the scanner results.
Eliminates all WASM boilerplate (alloc, dealloc, JSON serialization, pointer packing) so you only write your generation logic.
Macros§
- define_
mock_ data_ plugin - Define a mock data WASM plugin for field-level value generation.
- define_
output_ rule_ plugin - Define an output rule WASM plugin.
- define_
synthetic_ item_ plugin - Define a synthetic-item WASM plugin.
Structs§
- Event
Override - Event definition for schemasync.
- Field
Context - Context passed to mock data plugin functions.
- Field
Override - Field-level override from a rule plugin.
- Output
Rule Plugin Output - Output from an output rule plugin.
- Permissions
Override - Permissions for schemasync DEFINE TABLE.
- Synthetic
Context - Full snapshot of everything evenframe knows about so far, handed to each synthetic plugin call.
- Synthetic
Plugin Output - Output from a synthetic-item plugin.
- Type
Context Builder - Builder for constructing a
TypeContextin tests. - Type
Field Info - A single field (for structs/tables) or variant (for enums). Wraps the raw JSON node so callers can read any evenframe-side metadata; the common-case getters below cover stub parsing, annotations, and validators.
- Type
Override - Type-level override from a rule plugin.
Enums§
- Type
Context - Context passed to output rule plugin functions.
Functions§
- bool_
type - enum_
item - Build an enum-as-tagged-union JSON value. Variants are given as name-only strings (unit variants).
- f64_
type - i64_
type - option_
of - print_
plugin_ output - Print a summary of what the plugin produced.
- string_
type - struct_
item - Build a minimal
StructConfig-shaped JSON value. - table_
item - Build a
TableConfig-shaped JSON value wrapping a synthetic struct. - test_
plugin - Run a rule plugin function with a JSON roundtrip (simulates WASM IPC).
- vec_of