Class BuildLocalAbstract

Can perform builds. Will only perform a build if a contract is not built yet or FADROMA_REBUILD=1 is set.

Hierarchy

Constructors

  • Parameters

    • options: Partial<{
          builder: string;
          caching: boolean;
          dockerImage: "ghcr.io/hackbg/fadroma:master";
          dockerSocket: "/var/run/docker.sock";
          dockerfile: string;
          noFetch: false;
          outputDir: string;
          outputGid: undefined | string;
          outputUid: undefined | string;
          podman: false;
          preferredRemote: undefined | string;
          quiet: false;
          raw: false;
          script: string;
          sshAuthSocket: undefined | string;
          toolchain: "";
          verbose: false;
          workspace: string;
      }>

    Returns BuildLocal

Properties

buildGid?: number = ...

Owner gid that is set on build artifacts.

buildUid?: number = ...

Owner uid that is set on build artifacts.

caching: boolean = true

Whether to enable build caching. When set to false, this builder will rebuild even when binary and checksum are both present in wasm/ directory

id: string = 'local'

Unique identifier of this builder implementation.

log: BuildConsole = ...

Logger.

noFetch: boolean = false

Whether to skip any git fetch calls in the build script.

outputDir: OpaqueDirectory

Name of directory where build artifacts are collected.

quiet: boolean = false

Whether the build log should be printed only on error, or always

revision: string = HEAD

Default Git reference from which to build sources.

script?: string

The build script.

toolchain: null | string = null

Version of Rust toolchain to use.

verbose: boolean = false

Whether the build process should print more detail to the console.

workspace?: string

The project workspace.

variants: Record<string, BuilderClass<Builder>> = {}

Global registry of builder variants. Populated downstream.

Methods

  • Up to the implementation. @hackbg/fadroma implements dockerized and non-dockerized variants on top of the build.impl.mjs script.

    Parameters

    Returns Promise<Built>

  • Parameters

    • location: string | Path

    Returns string

    the SHA256 hash of the file at the specified location

  • Check if artifact exists in local artifacts cache directory. If it does, don't rebuild it but return it from there.

    Parameters

    • outputDir: string
    • Optional crate: string
    • revision: string = HEAD

    Returns null | Built

Generated using TypeDoc