@imp/rules/imp/archive

Module: @imp/rules/imp/archive.

extract_archive(options)

Extract an archive into a directory, and return a directory artifact handle immediately.

The rule declares its own native tools from format, so it rejects a tools option. named_cache publishes dest at a stable absolute path in the tool cache. A toolchain install needs this, because callers outside a sandbox use that path.

Options: archive Graph handle of the archive, for example the result of download_tool_artifact. dest Sandbox-relative extraction directory. format "tar.gz", "tar.xz", "tar", "zip", or "zip-unix". strip_components Optional tar --strip-components value. Zip formats accept only 1. named_cache Optional { name, key }. Publish dest as a named cache directory output. Each workspace on the computer shares the slot, and Imp does not write an existing slot again, so key must identify the contents, for example a version and a platform. display Optional task display label.

Source: rules/imp/archive/index.luau:80.

extract_archive_tools(format)

Return the native-tool names that the extraction script needs for a format. The hermetic sandbox finds only declared tools.

format is one of "tar.gz", "tar.xz", "tar", "zip", or "zip-unix". "zip" and "zip-unix" are equivalent: both use unzip.

Source: rules/imp/archive/index.luau:28.