A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
modules formatting rustfmt COMPONENT.md
6.0 kB · 85 lines
Markdown
at main

rustfmt component functions #

Requires FluentCI v0.17.3 or newer. The compiler derives native WIT signatures and embedded help from these typed PureScript functions. Optional arguments may be omitted.

run #

Execute arbitrary literal CLI arguments.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts string no Output artifacts to collect as NAME=PATH entries; names must be unique. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.
arguments string yes Literal native CLI argument tokens, passed without shell expansion. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.

Returns Contract.ExecutionResult.

version #

Print the CLI version.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts string no Output artifacts to collect as NAME=PATH entries; names must be unique. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.

Returns Contract.ExecutionResult.

format #

Format explicit Rust source files.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts string no Output artifacts to collect as NAME=PATH entries; names must be unique. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.
edition string no Edition supplied to the rustfmt format operation. Allowed values: 2015, 2018, 2021, 2024.
config-path string no Config Path supplied to the rustfmt format operation.
config string no Named configuration selected by the native tool.
files string yes Files selected for the native operation; paths are passed literally without shell expansion. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.

Returns Contract.ExecutionResult.

check #

Check explicit Rust source files.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts string no Output artifacts to collect as NAME=PATH entries; names must be unique. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.
edition string no Edition supplied to the rustfmt check operation. Allowed values: 2015, 2018, 2021, 2024.
config-path string no Config Path supplied to the rustfmt check operation.
files string yes Files selected for the native operation; paths are passed literally without shell expansion. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.

Returns Contract.ExecutionResult.

cargo-fmt #

Format a Cargo package or workspace.

Argument Type Required Description
project string no Working directory containing the source checkout; defaults to the current directory. Default: ".".
run-dir string yes Fresh directory for this invocation’s execution report and task logs; must not already exist.
executable string no Native CLI executable name or absolute path; defaults to this operation’s tool.
timeout-ms integer no Maximum task duration in milliseconds; defaults to 900000. Default: 900000.
artifacts string no Output artifacts to collect as NAME=PATH entries; names must be unique. Comma-separated values; whitespace is trimmed and empty entries are rejected. CSV quotes preserve literal commas.
all boolean no All supplied to the rustfmt cargo_fmt operation.
check boolean no Check supplied to the rustfmt cargo_fmt operation.
manifest-path string no Manifest Path supplied to the rustfmt cargo_fmt operation.

Returns Contract.ExecutionResult.