pub fn build_artifact(
source: String,
filename: &str,
resolver: &ImportResolver,
options: &BuildOptions,
) -> Result<Vec<u8>, String>Expand description
Compiles a .cdl source string to a .cdlb artifact the way options
asks. build_bytecode is this with the defaults candela build uses.
Machine code covers the functions the code generator handles, and the VM
runs the bytecode for everything else, and for the whole program on a
machine the code was not generated for. A candela built without its
native feature generates none.
ยงErrors
Returns an error string if serialization fails, or if options names a
target candela does not generate code for. A compile diagnostic travels by
the error funnel, not through this Result.