expose custom PVM settings in the standard json interface (#318)

Exposes the following PolkaVM specific options via the standard json
interface:
- Heap size
- Stack size
- Whether to emit source level debug information

Additionally it is now forbidden to specify those as CLI option in
standard JSON mode. They are bytecode altering options and having
multiple ways to specify them creates unnecessary room for confusion:
The standard JSON input description should be sufficient and succint for
reproducible builds.

Closes #290

---------

Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-05-13 15:19:00 +02:00
committed by GitHub
parent 1b8fcc4649
commit bb2f829361
16 changed files with 102 additions and 29 deletions
+4
View File
@@ -98,6 +98,7 @@ pub fn build_solidity_with_options(
),
None,
None,
None,
)?;
let mut output = solc.standard_json(input, None, vec![], None)?;
@@ -162,6 +163,7 @@ pub fn build_solidity_with_options_evm(
),
None,
None,
None,
)?;
let mut output = solc.standard_json(input, None, vec![], None)?;
@@ -213,6 +215,7 @@ pub fn build_solidity_and_detect_missing_libraries(
SolcStandardJsonInputSettingsOptimizer::new(true, None, &solc_version.default, false),
None,
None,
None,
)?;
let mut output = solc.standard_json(input, None, vec![], None)?;
@@ -286,6 +289,7 @@ pub fn check_solidity_warning(
SolcStandardJsonInputSettingsOptimizer::new(true, None, &solc_version.default, false),
None,
suppressed_warnings,
None,
)?;
let output = solc.standard_json(input, None, vec![], None)?;