mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 21:58:01 +00:00
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:
@@ -3,6 +3,7 @@
|
||||
pub mod metadata;
|
||||
pub mod metadata_hash;
|
||||
pub mod optimizer;
|
||||
pub mod polkavm;
|
||||
pub mod selection;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
@@ -13,6 +14,7 @@ use serde::Serialize;
|
||||
|
||||
use self::metadata::Metadata;
|
||||
use self::optimizer::Optimizer;
|
||||
use self::polkavm::PolkaVM;
|
||||
use self::selection::Selection;
|
||||
|
||||
/// The `solc --standard-json` input settings.
|
||||
@@ -43,6 +45,9 @@ pub struct Settings {
|
||||
/// The metadata settings.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub metadata: Option<Metadata>,
|
||||
/// The resolc custom PolkaVM settings.
|
||||
#[serde(skip_serializing)]
|
||||
pub polkavm: Option<PolkaVM>,
|
||||
}
|
||||
|
||||
impl Settings {
|
||||
@@ -54,6 +59,7 @@ impl Settings {
|
||||
output_selection: Selection,
|
||||
optimizer: Optimizer,
|
||||
metadata: Option<Metadata>,
|
||||
polkavm: Option<PolkaVM>,
|
||||
) -> Self {
|
||||
Self {
|
||||
evm_version,
|
||||
@@ -63,6 +69,7 @@ impl Settings {
|
||||
optimizer,
|
||||
metadata,
|
||||
via_ir: Some(true),
|
||||
polkavm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user