rules/oci/toolchain/index.js
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
CRANE_TOOL
const CRANE_TOOL
Undocumented.
craneArtifactName()
craneArtifactName(version, plat)
Return the crane release artifact filename for a version and platform.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| plat | { os: string, arch: string } |
Returns: string
craneDownloadUrl()
craneDownloadUrl(version, plat)
Return the crane release download URL for a version and platform.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| plat | { os: string, arch: string } |
Returns: string
craneSupportedPlatforms()
craneSupportedPlatforms()
Return the platforms crane publishes release archives for.
Returns: Array<{ os: string, arch: string }>
craneCacheKey()
craneCacheKey(version, plat)
Return the named-cache key for a crane toolchain version and platform.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| plat | { os: string, arch: string } |
Returns: string
CraneToolchain (implementation class)
class CraneToolchain
Implementation class. BUILD files should use craneToolchain().
Undocumented.
craneToolchain()
craneToolchain(version, opts = {})
Declare a crane toolchain version and optionally set it as the default. matching lockfile entry (warns instead of failing).
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| [opts] | object | |
| [opts.default=false] | boolean | |
| [opts.unverified=false] | boolean | Allow downloading without a |
Returns: object Target handle for this crane toolchain.
installCraneToolchain()
installCraneToolchain(version, source)
Install a local crane toolchain directory into the named cache.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| source | string | Path to the toolchain root. |
Returns: string|null Local path to the cached toolchain root.
acquireCraneToolchain
const acquireCraneToolchain
Acquire a crane toolchain, downloading and caching it if not already installed in the named cache.
| Parameter | Type | Description |
|---|---|---|
| version | string |
Returns: Promise<string> Local path to the toolchain root.
resolveCraneToolchainVersion()
resolveCraneToolchainVersion(version)
Resolve an explicit or default crane toolchain version.
| Parameter | Type | Description |
|---|---|---|
| [version] | string |
Returns: string|null
defaultCraneToolchainVersion()
defaultCraneToolchainVersion()
Return the currently configured default crane toolchain version.
Returns: string|null
defaultCraneToolchain()
defaultCraneToolchain()
Return the currently configured default crane toolchain target handle.
Returns: object|null