Skip to main content

Crate evenframe_plugin

Crate evenframe_plugin 

Source
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§

EventOverride
Event definition for schemasync.
FieldContext
Context passed to mock data plugin functions.
FieldOverride
Field-level override from a rule plugin.
OutputRulePluginOutput
Output from an output rule plugin.
PermissionsOverride
Permissions for schemasync DEFINE TABLE.
SyntheticContext
Full snapshot of everything evenframe knows about so far, handed to each synthetic plugin call.
SyntheticPluginOutput
Output from a synthetic-item plugin.
TypeContextBuilder
Builder for constructing a TypeContext in tests.
TypeFieldInfo
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.
TypeOverride
Type-level override from a rule plugin.

Enums§

TypeContext
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