pub fn compile_polydat(source: &str) -> Result<Box<dyn Kernel>, KernelError>Expand description
Compile a .polydat source string under the default options, on the
engine those options name — which is Engine::default,
the most native form the build has.
This is the way in. The kernel comes back as dyn Kernel, which is
the surface every use of a kernel goes through, and the engine is a
value the options carry rather than a branch in the code: a caller
that wants a different one sets options.engine and calls
compile_polydat_kernel_with_options, rather than calling a
differently-named function.
Naming an engine is for the callers whose subject is the engine:
compile_polydat_interpreterfor the interpreter’s concrete kernel, when a test or diagnostic needs its own internals, or when it is being used as the semantic oracle a differential test compares a compiled engine against. That is a real need, and it says so by name — it used to be what this entry point quietly returned, which meant a host got the slowest engine by asking for none.compile_polydat_withto walk the tiers with one source.