mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-14 06:21:14 +00:00
fix identation
This commit is contained in:
+25
-25
@@ -27,7 +27,7 @@ pub mod stack_height;
|
||||
|
||||
pub use build::{build, Error as BuildError, SourceTarget};
|
||||
pub use ext::{
|
||||
externalize, externalize_mem, shrink_unknown_stack, underscore_funcs, ununderscore_funcs,
|
||||
externalize, externalize_mem, shrink_unknown_stack, underscore_funcs, ununderscore_funcs,
|
||||
};
|
||||
pub use gas::inject_gas_counter;
|
||||
pub use optimizer::{optimize, Error as OptimizerError};
|
||||
@@ -37,47 +37,47 @@ pub use graph::{Module, parse as graph_parse, generate as graph_generate};
|
||||
pub use ref_list::{RefList, Entry, EntryRef, DeleteTransaction};
|
||||
|
||||
pub struct TargetSymbols {
|
||||
pub create: &'static str,
|
||||
pub call: &'static str,
|
||||
pub ret: &'static str,
|
||||
pub create: &'static str,
|
||||
pub call: &'static str,
|
||||
pub ret: &'static str,
|
||||
}
|
||||
|
||||
pub enum TargetRuntime {
|
||||
Substrate(TargetSymbols),
|
||||
PWasm(TargetSymbols),
|
||||
Substrate(TargetSymbols),
|
||||
PWasm(TargetSymbols),
|
||||
}
|
||||
|
||||
impl TargetRuntime {
|
||||
|
||||
pub fn substrate() -> TargetRuntime {
|
||||
TargetRuntime::Substrate(TargetSymbols {
|
||||
create: "deploy",
|
||||
call: "call",
|
||||
ret: "ext_return",
|
||||
})
|
||||
}
|
||||
pub fn substrate() -> TargetRuntime {
|
||||
TargetRuntime::Substrate(TargetSymbols {
|
||||
create: "deploy",
|
||||
call: "call",
|
||||
ret: "ext_return",
|
||||
})
|
||||
}
|
||||
|
||||
pub fn pwasm() -> TargetRuntime {
|
||||
TargetRuntime::PWasm(TargetSymbols {
|
||||
create: "deploy",
|
||||
call: "call",
|
||||
ret: "ret",
|
||||
})
|
||||
}
|
||||
pub fn pwasm() -> TargetRuntime {
|
||||
TargetRuntime::PWasm(TargetSymbols {
|
||||
create: "deploy",
|
||||
call: "call",
|
||||
ret: "ret",
|
||||
})
|
||||
}
|
||||
|
||||
pub fn symbols(&self) -> &TargetSymbols {
|
||||
match self {
|
||||
pub fn symbols(&self) -> &TargetSymbols {
|
||||
match self {
|
||||
TargetRuntime::Substrate(s) => s,
|
||||
TargetRuntime::PWasm(s) => s,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
mod std {
|
||||
pub use alloc::{borrow, boxed, string, vec};
|
||||
pub use core::*;
|
||||
pub use alloc::{borrow, boxed, string, vec};
|
||||
pub use core::*;
|
||||
|
||||
pub mod rc {
|
||||
pub use alloc::rc::Rc;
|
||||
|
||||
Reference in New Issue
Block a user