Update dependencies (#503)

- Rust dependencies
- JS dependencies
- Retester submodule

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus authored and GitHub committed 2026-04-13 14:59:24 +02:00
1 parent b3cd402549
commit 255f5cc31b
18 files changed
+3035 -2444

No files matched your search

+9 -2
View File
@@ -50,10 +50,17 @@ fn build_module(source_path: &str, bitcode_path: &str, rust_file: &str) {
let lib = Path::new(&out_dir).join(bitcode_path);
compile(source_path, lib.to_str().expect("$OUT_DIR should be UTF-8"));
let bitcode = fs::read(lib).expect("bitcode should have been built");
// `inkwell::MemoryBuffer::create_from_memory_range` requires a trailing nul byte
// (it subtracts one from the length to drop the terminator), so we embed the bitcode
// with an extra nul byte appended.
let mut bitcode = fs::read(lib).expect("bitcode should have been built");
bitcode.push(0);
let padded_name = format!("{bitcode_path}.nul");
let padded_path = Path::new(&out_dir).join(&padded_name);
fs::write(&padded_path, &bitcode).expect("should be able to write in $OUT_DIR");
let len = bitcode.len();
let src_path = Path::new(&out_dir).join(rust_file);
let src = format!("pub static BITCODE: &[u8; {len}] = include_bytes!(\"{bitcode_path}\");");
let src = format!("pub static BITCODE: &[u8; {len}] = include_bytes!(\"{padded_name}\");");
fs::write(src_path, src).expect("should be able to write in $OUT_DIR");
}
+11 -2
View File
@@ -16,6 +16,8 @@
//!
//! [0]: https://llvm.org/docs/LangRef.html#global-variables
use std::num::NonZeroU32;
/// The immutable data module name.
pub static MODULE_NAME: &str = "__evm_immutables";
/// The immutable data global pointer.
@@ -28,13 +30,20 @@ pub static IMMUTABLE_DATA_MAX_SIZE: u32 = 4 * 1024;
/// Returns the immutable data global type.
pub fn data_type(context: &inkwell::context::Context, size: u32) -> inkwell::types::ArrayType<'_> {
context
.custom_width_int_type(revive_common::BIT_LENGTH_WORD as u32)
.custom_width_int_type(
NonZeroU32::new(revive_common::BIT_LENGTH_WORD as u32).expect("const is non-zero"),
)
.expect("valid integer width")
.array_type(size)
}
/// Returns the immutable data size global type.
pub fn size_type(context: &inkwell::context::Context) -> inkwell::types::IntType<'_> {
context.custom_width_int_type(revive_common::BIT_LENGTH_X32 as u32)
context
.custom_width_int_type(
NonZeroU32::new(revive_common::BIT_LENGTH_X32 as u32).expect("const is non-zero"),
)
.expect("valid integer width")
}
/// Creates a LLVM module with the immutable data and its `size` in bytes.