MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / build

Method build

src/build.rs:313–366  ·  view source on GitHub ↗
(manifest: &BuildManifest)

Source from the content-addressed store, hash-verified

311pub enum StdlibPolicy {
312 None,
313 ForTarget,
314 Explicit(TargetMode),
315}
316
317#[derive(Clone, Copy, Debug, PartialEq, Eq)]
318pub enum ImportClosurePolicy {
319 Disabled,
320 Enabled { mangle_symbols: bool },
321}
322
323#[derive(Clone, Debug, PartialEq, Eq)]
324pub struct BuildPlan {
325 pub name: String,
326 pub target: TargetMode,
327 pub entry: Option<String>,
328 pub stdlib: StdlibPolicy,
329 pub import_closure: ImportClosurePolicy,
330 pub root: String,
331 pub extra_objects: Vec<String>,
332 pub abi_exports: Vec<String>,
333 pub has_source_prelude: bool,
334}
335
336#[derive(Clone, Debug)]
337pub struct BuiltUnit {
338 pub name: String,
339 pub assembled: AssembledOutput,
340}
341
342#[derive(Clone, Debug)]
343pub struct BuildArtifacts {
344 pub plan: BuildPlan,
345 pub units: Vec<BuiltUnit>,
346 pub linked: AssembledOutput,
347}
348
349#[derive(Debug)]
350pub enum BuildError {
351 Io(std::io::Error),
352 Manifest(String),
353 Compile(CompilationError),
354 Assemble(String),
355 Link(LinkerError),
356}
357
358impl fmt::Display for BuildError {
359 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
360 match self {
361 Self::Io(err) => write!(f, "I/O error: {err}"),
362 Self::Manifest(err) => write!(f, "manifest error: {err}"),
363 Self::Compile(err) => write!(f, "{err}"),
364 Self::Assemble(err) => write!(f, "assembler error: {err}"),
365 Self::Link(err) => write!(f, "{err}"),
366 }
367 }
368}
369

Callers

nothing calls this directly

Calls 8

pushMethod · 0.80
set_module_manglingMethod · 0.80
collectMethod · 0.80
cloneMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected