OS Manuals

/usr/bin/solar

Solidity parser and compiler from the Foundry toolkit

From foundry-solar 1.9.0-r0 (enterprise-packages), captured 2026-11-08 by running solar --help (exit 0). permalink

Blazingly fast Solidity compiler

Usage: solar [OPTIONS] [INPUT]...

Arguments:
  [INPUT]...
          Files to compile, or import remappings.

          `-` specifies standard input.

          In Standard JSON mode, no input or `-` reads from standard input; otherwise, exactly one
          input file may be specified.

          Import remappings are specified as `[context:]prefix=path`. See
          <https://docs.soliditylang.org/en/latest/path-resolution.html#import-remapping>.

Options:
  -j, --threads <THREADS>
          Number of threads to use. Zero specifies the number of logical cores

          [default: 8]
          [alias: --jobs]

      --evm-version <EVM_VERSION>
          EVM version

          [default: osaka]
          [possible values: homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople,
          petersburg, istanbul, berlin, london, paris, shanghai, cancun, prague, osaka, amsterdam]

      --stop-after <STOP_AFTER>
          Stop execution after the given compiler stage

          [possible values: parsing, lowering, analysis]

  -O, --optimize <OPTIMIZATION>
          MIR optimization objective

          [default: gas]
          [possible values: none, gas, size]

      --optimize-runs <RUNS>
          Expected executions per deployment used by lifetime-aware optimizer decisions

      --revert-strings <REVERT_STRINGS>
          Strip revert (and require) reason strings or add additional debugging information.

          `verboseDebug` is not implemented, matching solc.

          [default: default]
          [possible values: default, strip, debug, verboseDebug]

      --libraries <NAME=ADDRESS>
          Library addresses for linking, as `LibraryName=0xADDRESS`.

          An optional `path.sol:` prefix restricts the address to that source. A `public`/`external`
          library function whose library has a linked address is called through `DELEGATECALL` at
          that address instead of being inlined into the caller.

      --out-dir <OUT_DIR>
          Directory to write output files

      --emit <EMIT>
          Comma separated list of types of output for the compiler to emit.

          Outputs are collected in JSON on stdout, or `combined.json` in `--out-dir`.

          [possible values: abi, bin, bin-runtime, hashes, ethdebug, ethdebug-runtime,
          ethdebug-resources, srcmap, srcmap-runtime]

      --standard-json
          Switch to Standard JSON input/output mode

  -Z <FLAG>
          Unstable flags. WARNING: these are completely unstable, and may change at any time.

          See `-Zhelp` for more details.

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Input options:
      --base-path <BASE_PATH>
          Use the given path as the root of the source tree

  -I, --include-path <INCLUDE_PATH>
          Directory to search for files.

          Can be used multiple times.

      --allow-paths <ALLOW_PATHS>
          Allow a given path for imports

Display options:
      --color <COLOR>
          Coloring

          [default: auto]
          [possible values: auto, always, never]

  -v, --verbose
          Use verbose output

      --pretty-json
          Pretty-print JSON output.

          Does not include errors. See `--pretty-json-err`.

      --pretty-json-err
          Pretty-print error JSON output

      --error-format <ERROR_FORMAT>
          How errors and other messages are produced

          [default: human]
          [possible values: human, json, rustc-json]

      --error-format-human <VALUE>
          Human-readable error message style

          [default: unicode]
          [possible values: ascii, unicode, short]

      --diagnostic-width <WIDTH>
          Terminal width for error message formatting

      --no-warnings
          Whether to disable warnings

      --allow <CODE>
          Comma separated list of diagnostic codes to allow
Options (25)
OptionDescriptionSource
-j, --threads THREADSNumber of threads to use.help
--evm-version EVM_VERSIONEVM versionhelp
--stop-after STOP_AFTERStop execution after the given compiler stagehelp
-O, --optimize OPTIMIZATIONMIR optimization objectivehelp
--optimize-runs RUNSExpected executions per deployment used by lifetime-aware optimizer decisionshelp
--revert-strings REVERT_STRINGSStrip revert (and require) reason strings or add additional debugging information.help
--libraries NAME=ADDRESSLibrary addresses for linking, as `LibraryName=0xADDRESS`.help
--out-dir OUT_DIRDirectory to write output fileshelp
--emit EMITComma separated list of types of output for the compiler to emit.help
--standard-jsonSwitch to Standard JSON input/output modehelp
-Z FLAGUnstable flags.help
-h, --helpPrint help (see a summary with '-h')help
-V, --versionPrint versionhelp
--base-path BASE_PATHUse the given path as the root of the source treehelp
-I, --include-path INCLUDE_PATHDirectory to search for files.help
--allow-paths ALLOW_PATHSAllow a given path for importshelp
--color COLORColoringhelp
-v, --verboseUse verbose outputhelp
--pretty-jsonPretty-print JSON output.help
--pretty-json-errPretty-print error JSON outputhelp
--error-format ERROR_FORMATHow errors and other messages are producedhelp
--error-format-human VALUEHuman-readable error message stylehelp
--diagnostic-width WIDTHTerminal width for error message formattinghelp
--no-warningsWhether to disable warningshelp
--allow CODEComma separated list of diagnostic codes to allowhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.