@imp/rules/imp/toolchain

Module: @imp/rules/imp/toolchain.

bin(exec, tool, options)

The absolute host path of one executable in an installed toolchain.

Call it in a task body. tool is a core.tool() handle that the task declares as an input. Options:

exe Executable filename, with any platform suffix. Necessary. sub_dir Directory that holds the executable, relative to the named cache root. The default is ".".

Source: rules/imp/toolchain/index.luau:140.

define(name)

Return a kind table for the toolchain name. name is used in error messages. The kind table has these functions:

declare(version, options) Record version and return its instance { version, lockfile, unverified }. options.default = true also makes it the default. options.lockfile and options.unverified are copied to the instance. default() The default instance, or nil. default_version() The version of the default instance, or nil. resolve_version(version) version if it is set, else the default version, or nil. require_version(version) As resolve_version, but fails when no version is set and no default is set. instance_for_version(version) The instance that declared version, else the default instance, or nil. resolve_unverified(version) The unverified option of instance_for_version(version), else false. clear_default() Forget the default and every declared version.

Source: rules/imp/toolchain/index.luau:67.

register(name, resolver)

Register a zero-argument resolver for imp @name.

Source: rules/imp/toolchain/index.luau:22.

resolve(name)

Return the registered tool's path output. The host executes this output.

Source: rules/imp/toolchain/index.luau:36.