Expand description
DSL-to-assembly bridge: compile a parsed Polydat AST into a runtime kernel.
Walks the AST, resolves function names to node constructors, wires
the PolydatAssembler, and produces a PolydatKernel.
Structs§
- Compile
Options - The options every entry point compiles under. A host that names none gets the defaults: no source directory, no library paths, every binding an output, lax typing, the default context label, and no cursor limit.
Enums§
- Embedding
Error - Typed error ontology for the embedded-evaluation surface.
Traits§
- Host
Type - Host-facing type that polydat can return from the typed
embedding surfaces. The trait declares the polydat
PortTypethe Rust type corresponds to and the conversion from the returnedcrate::ast::Valueback to the host type.
Functions§
- compile_
ast Deprecated compile_ast_with_optionsunder the default options.- compile_
ast_ strict Deprecated compile_ast_with_optionswith a source directory and strictness alone.- compile_
ast_ with_ engine compile_polydat_with_enginefrom a parsed file: the parent compiles onenginethrough the assembler, and eachforbody compiles once for the interpreter as the traversal’s record and on any engine at activation (engine parity, step 8).- compile_
ast_ with_ libs Deprecated compile_ast_with_optionswith the source directory, library directories, outputs to keep, strictness, and context label as separate parameters.- compile_
ast_ with_ options compile_polydat_with_optionsfor an already parsed, possibly transformed, program.sourceis the text the program was parsed from and is used for diagnostics only.- compile_
ast_ with_ path Deprecated compile_ast_with_optionswith a source directory alone.- compile_
polydat - Compile a
.polydatsource string into the interpreter’s kernel, under the default options:compile_polydat_with_optionswithCompileOptions::default. The interpreter is the semantic oracle;compile_polydat_kernelis the same program on the default engine. - compile_
polydat_ checked - Compile with full diagnostics: errors, warnings, suggestions, on the default engine.
- compile_
polydat_ kernel compile_polydat_withonEngine::default: compiled code, with the JIT where the build has it.- compile_
polydat_ kernel_ with_ options compile_polydat_kernelwith the kernel path’s options (source directory, library paths, required outputs, strict typing, the error context label, the cursor limit) and the compile event log:compile_polydat_with_engineonEngine::default.- compile_
polydat_ kernel_ with_ tiles compile_polydat_with_tilesonEngine::default: the same program with the same tiles appended, as a compiled kernel.- compile_
polydat_ strict Deprecated compile_polydat_with_optionswith a source directory and strictness alone.- compile_
polydat_ tier1_ simd_ ordinal - Compile one selected scalar output into the conservative perfect-ordinal Tier-1 SIMD executor.
- compile_
polydat_ to_ assembler - Compile Polydat source to an assembler (not yet compiled to a kernel).
- compile_
polydat_ to_ assembler_ with compile_polydat_to_assemblerwith the options the kernel entry points take: a source directory for relative imports, library directories, required outputs, strict typing, a diagnostic context, and a cursor limit. The assembler it returns is the graphcompile_polydat_with_optionswould compile from the same source and options, ready for any engine.- compile_
polydat_ with - Compile
sourceforengine: the interpreter, the closure tier, the hybrid kernel, or pure native code. Every engine accepts every program the interpreter accepts, or refuses it with a reason (crate::KernelError::Refused); a host drives the result throughcrate::Kernelwithout knowing which engine it holds. The othercompile_polydat*entry points build the interpreter kernel and remain for that. - compile_
polydat_ with_ engine compile_polydat_withwith the kernel path’s options (source directory, library paths, required outputs, strict typing, the error context label, the cursor limit) and the compile event log. On the interpreter this is the whole kernel path, traversals included; on a compiled engine the assembler entry point followed byPolydatAssembler::compile_engine_with_log.- compile_
polydat_ with_ libs Deprecated compile_polydat_with_optionswith the source directory, library directories, outputs to keep, strictness, and context label as separate parameters.- compile_
polydat_ with_ libs_ and_ limit Deprecated compile_polydat_with_optionswith every option as a separate parameter.- compile_
polydat_ with_ log compile_polydat_with_optionsunder the default options, with the compile event log: the same kernelcompile_polydatbuilds, with every pragma, assembly, fold, and tile event recorded.- compile_
polydat_ with_ options - Compile Polydat source into the interpreter’s kernel under
options, recording pragma and assembly events inlogwhen one is given: the interpreter-typed entry point every other interpreter form reduces to.compile_polydat_with_engineis the same compile on any engine. - compile_
polydat_ with_ outputs Deprecated compile_polydat_with_optionswith a source directory, the outputs to keep, and strictness as separate parameters.- compile_
polydat_ with_ path Deprecated compile_polydat_with_optionswith a source directory alone.- compile_
polydat_ with_ tiles - Compile source together with tiles a host built from what it holds
(SRD 114 §5.6): template text, JSON text, or a parsed JSON value,
via
crate::tile. The tiles are appended astilestatements, so they see every wire the source defines and are wires themselves. - eval_
const_ expr - Evaluate a constant expression by compiling it as a one-binding
program: what a comprehension source such as
partitions("*\/4", 1000)goes through. Cached by source text, so the same text compiles once per process (SRD 113 §5.2). An expression that reaches a dynamic input is a lifecycle error. - eval_
const_ expr_ typed - Const-fold the expression and convert the typed
Valueinto the host’s requested Rust type. Compile-time type alignment per expression_engine.md §5.3 + E5 + E7. - eval_
const_ expr_ typed_ strict - Strict-mode variant of
eval_const_expr_typed. - eval_
kernel_ bound_ typed - Two-step: interpolate placeholders against
kernel, then const-fold + type-convert. The canonical pattern for kernel-bound typed embedding per expression_engine.md §3.2 + §5.3. - eval_
kernel_ bound_ typed_ strict - Strict-mode kernel-bound variant. Composes
crate::kernel::interp::interpolate_via_kernelwitheval_const_expr_typed_strict. - is_
lossless_ adapter - Classify a catalog adapter as lossless or lossy per
expression_engine.md§5.4.3. Lossless conversions preserve value identity (widening numeric types, to-string display roundtrips); lossy conversions change information content (truncation, boolean projection). - positional_
str_ lit - Extract a string literal from an optional positional argument. Re-exported for cursor-sugar handlers in node modules that validate string-literal-only constructor args.
- stdlib_
sources - Return the embedded standard library module sources.