product-farm-core
Core domain types and abstractions for the Product-FARM rule engine ecosystem.
Overview
product-farm-core provides the foundational types used across the Product-FARM rule engine:
- Value - A flexible, JSON-compatible value type optimized for rule evaluation
- Attribute - Schema definitions for product attributes with validation
- Rule - Rule definitions with expression-based computation
- Product - Product configurations with attribute schemas and rule sets
- Error types - Comprehensive error handling across the ecosystem
Part of Product-FARM
This crate is part of Product-FARM, an enterprise-grade rule engine featuring:
- 3M+ evaluations/sec single-threaded, 22M+ multi-threaded
- Natural language YAML - Define rules in human-readable YAML with LLM-powered evaluation
- DAG-based execution - Automatic dependency resolution and parallel execution
- Bytecode compilation - 3.5x faster than AST interpretation
- 1 million rules tested at 96k rules/sec
Installation
[]
= "0.2"
Usage
use ;
// Create typed values
let price = Number;
let name = String;
let features = Array;
// Define attributes with validation
let attr = Attribute ;
Related Crates
| Crate | Description |
|---|---|
| product-farm-json-logic | JSON Logic parser with bytecode VM |
| product-farm-rule-engine | DAG executor with parallel evaluation |
| product-farm-farmscript | Human-friendly DSL for rules |
| product-farm-llm-evaluator | LLM-powered rule evaluation |
| product-farm-yaml-loader | YAML-based product definitions |
Documentation
License
MIT License - see LICENSE for details.