Configuration Values

maelstrom-run supports the following configuration values:

ValueTypeDescriptionDefault
log-levelstringminimum log level"info"
cache-sizestringtarget cache disk space usage"1 GB"
inline-limitstringmaximum amount of captured standard output and error"1 MB"
slotsnumberjob slots available1 per CPU
container-image-depot-rootstringcontainer images cache directory$XDG_CACHE_HOME/maelstrom/containers
accept-invalid-remote-container-tls-certsbooleanallow invalid container registry certificatesfalse
brokerstringaddress of brokerstandalone mode
state-rootstringdirectory for client process's log file$XDG_STATE_HOME/maelstrom/run
cache-rootstringdirectory for local worker's cache and cached layers$XDG_CACHE_HOME/maelstrom/run
escape-charstringTTY escape character for --tty mode"^]"

log-level

This is a setting common to all Maelstrom programs. See here for details.

maelstrom-run always prints log messages to standard error. It also passes the log level to maelstrom-client, which will log its output in a file named client-process.log in the state directory.

cache-size

This is a local-worker setting, common to all clients. See here for details.

inline-limit

This is a local-worker setting, common to all clients. See here for details.

slots

This is a local-worker setting, common to all clients. See here for details.

container-image-depot-root

This is a container-image setting, common to all clients. See here for details.

accept-invalid-remote-container-tls-certs

This is a container-image setting, common to all clients. See here for details.

broker

This is a setting common to all clients. See here for details.

state-root

This is a directory setting common to all clients. See here for more details.

cache-root

This is a directory setting common to all clients. See here for more details.

escape-char

This configuration value specifies the terminal escape character when maelstrom-run is run in TTY mode (with the --tty command-line option).

In TTY mode, all key presses are sent to the job's terminal. So, a ^C typed at the user's terminal be transmitted to the job's terminal, where it will be interpreted however the job interprets it. This is true for all control characters. As a result, typing ^C will not kill the maelstrom-run, nor will typing ^Z suspend maelstrom-run.

This what the terminal escape character is for. Assuming, the escape character is ^], then typing ^]^C will kill maelstrom-run, and typing ^]^Z will suspend maelstrom-run. To transmit the escape character to the job, it must be typed twice: ^[^[ will send ^[ to the job.

If the escape character is followed by any character other than ^C, ^Z, or itself, then it will have no special meaning. The escape character and the following character will both be transmitted to the job. Similarly, if no character follows the escape character for 1.5 seconds, then the escape character will be transmitted to the job.

The escape character must be specified as a string in one of three forms:

  • As a one-character string. In this case, the one character will be the escape character.
  • A two-character string in caret notation. For example: ^C, ^], etc.
  • A Rust byte literal starting with \. For example: \n, \x77, etc. Note that TOML and the shell may perform their own backslash escaping before Maelstrom sees the string. Be sure to either double the backslash or use a string form that isn't subject to backslash escaping.

Whatever form it takes, the character must be an ASCII character: it can't have a numeric value larger than 127.