SQ in silver chrome letters, a lab's gear stacked against the S: a rack, two oscilloscopes, pizza boxes and a six-pack. Strange Query Lab

CARDIAC › rust-cardiac › Message codes › RCE0041

RCE0041error

A single file that uses the cardiac crate.

error[RCE0041]: {file}: a single file can't use the cardiac crate: build it in a package, or define the built-ins it calls in the file itself

A program built as a single file (cargo cardiac build FILE.rs) that uses the cardiac crate.

A single file is compiled by rustc on its own, with no Cargo package to say where the cardiac crate is.

Make it a package with cargo cardiac new, which depends on cardiac, or define the built-ins the file calls in the file itself, as stubs the compiler recognises by name:

#[inline(never)]
pub fn out(_v: i16) {}
#[inline(never)]
pub fn inp() -> i16 { 0 }

In a terminal: cargo cardiac help RCE0041.