This build mode looks for a Rust toolchain in the same environment as the one in which the script is running, i.e. no build container.

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 BuildRaw

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: "Raw" = 'Raw'

Unique identifier of this builder implementation.

log: BuildConsole = ...

Logging handle.

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.

runtime: string = ...

Node.js runtime that runs the build subprocess. Defaults to the same one that is running this script.

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

  • Parameters

    • buildable: Buildable
    • Optional workspace: string
    • Optional revision: string

    Returns {
        env: {
            _BUILD_GID: string;
            _BUILD_UID: string;
            _OUTPUT: string;
            _REGISTRY: string;
            _TOOLCHAIN: null | string;
        };
        tmpBuild: null | Path;
        tmpGit: null | Path;
    }

    • env: {
          _BUILD_GID: string;
          _BUILD_UID: string;
          _OUTPUT: string;
          _REGISTRY: string;
          _TOOLCHAIN: null | string;
      }
      • _BUILD_GID: string
      • _BUILD_UID: string
      • _OUTPUT: string
      • _REGISTRY: string
      • _TOOLCHAIN: null | string
    • tmpBuild: null | Path
    • tmpGit: null | Path
  • 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

  • Parameters

    • buildable: Buildable
    • env: {
          _OUTPUT: string;
      }
      • _OUTPUT: string

    Returns Promise<Path>

  • Overridable.

    Parameters

    • Rest ...args: [command: string, args: readonly string[], options: SpawnOptions]

    Returns ChildProcess

Generated using TypeDoc