Skip to main content

Module config

Module config 

Source
Expand description

The user’s configuration of threads, memory and the disk cache: one table of settings (Config::KEYS), each taken from (first wins) a command-line flag, its environment variable, the config file (Config::file_path), or its default. auto defaults follow the machine (Device) and the user’s other busy processes.

Values are text in every layer: sizes are bytes with an optional K/M/G/T suffix (binary; a bare number is MiB), shares are percentages (25%), switches are on/off, durations take ms/s/m/h (a bare number is the key’s unit).

Structs§

Bytes
A size in bytes.
Config
The resolved settings (Config::resolve).
Decompiler
One [decompilers.<name>] table. Defaults follow §4.
Key
One row of Config::KEYS.
MaybePath
A file, or none (decompile.mapping).
Millis
A duration whose bare numbers are milliseconds.
Name
A name that is never empty (decompile.default).
Names
Names, in order (decompile.fallback); none is the empty list.
Seconds
A duration whose bare numbers are seconds.
Setting
A value and where it came from.
Tiers
The disk cache tiers in use.

Enums§

Amount
A budget: auto, a size, or a percentage of what the key names.
CacheDir
The disk cache directory: the platform default or a path.
ConfigError
Why a configuration could not be read.
Count
A count of threads: auto or a positive number.
Source
Where a setting’s value came from.

Constants§

ARKDEC_DECOMPILER
The name of the HarmonyOS backend, asc-arkdec-worker: built in like dexdec, but only used where its worker is found (it is not installed).
BUILT_IN_DECOMPILER
The name of asc’s own backend, asc-dexdec-worker.
BUILT_IN_DECOMPILERS
The backends asc knows without a table: a table of this name needs no command.
CONFIG_ENV
Environment variable naming the config file; empty: none.
DEFAULT_RELEASE_URL
The downloads of the latest asc-dexdec-worker release, the default decompile.release_url.

Traits§

Value
A setting’s value type: parsed from and shown as the same text.