mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 19:51:03 +00:00
@@ -7,3 +7,5 @@ repository.workspace = true
|
||||
authors.workspace = true
|
||||
description = "revive compiler rust backend runtime library"
|
||||
|
||||
[dependencies]
|
||||
alloy-core = { workspace = true, default-features = false }
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
//! The revive Rust backend contract runtime library configuration.
|
||||
@@ -0,0 +1,4 @@
|
||||
//! The revive Rust backend contract runtime library configuration.
|
||||
|
||||
/// The Ethereum Virtual Machine word size in bytes.
|
||||
pub const EVM_WORD_SIZE_BYTES: usize = 32;
|
||||
@@ -2,16 +2,5 @@
|
||||
|
||||
#![no_std]
|
||||
|
||||
pub const EVM_WORD_SIZE_BYTES: usize = 32;
|
||||
|
||||
/// The emulated linear EVM heap memory size.
|
||||
pub const MEMORY_SIZE: usize = 1024 * 64;
|
||||
|
||||
/// The emulated linear EVM heap memory size.
|
||||
pub const MEMORY: [u8; MEMORY_SIZE] = [0; MEMORY_SIZE];
|
||||
|
||||
pub struct Function<const VARIABLES: usize> {
|
||||
pub variables: [u8; VARIABLES],
|
||||
}
|
||||
|
||||
impl<const VARIABLES: usize> Function<VARIABLES> {}
|
||||
pub mod configuration;
|
||||
pub mod memory;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
//! The revive Rust backend contract runtime emulated linear EVM heap memory.
|
||||
|
||||
/// The emulated linear EVM heap memory size.
|
||||
pub const MEMORY_SIZE: usize = 1024 * 64;
|
||||
|
||||
/// The emulated linear EVM heap memory size.
|
||||
pub const MEMORY: [u8; MEMORY_SIZE] = [0; MEMORY_SIZE];
|
||||
|
||||
pub struct Function<const VARIABLES: usize> {
|
||||
pub variables: [u8; VARIABLES],
|
||||
}
|
||||
|
||||
impl<const VARIABLES: usize> Function<VARIABLES> {}
|
||||
@@ -20,7 +20,7 @@ hex-literal = { version = "0.4.1", default-features = false }
|
||||
polkavm-derive = { version = "0.27.0" }
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
opt-level = z
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
"#;
|
||||
@@ -51,8 +51,7 @@ pub const MEMORY: [u8; MEMORY_SIZE] = [0; MEMORY_SIZE];
|
||||
const EXPORT_FUNCTION: &str = r#"
|
||||
#[no_mangle]
|
||||
#[polkavm_derive::polkavm_export]
|
||||
pub extern "C" fn
|
||||
"#;
|
||||
pub extern "C" fn "#;
|
||||
|
||||
fn emit(constructor_code: &str, runtime_code: &str) -> String {
|
||||
let mut buffer = String::from(HEADER);
|
||||
|
||||
Reference in New Issue
Block a user