asset manager load by asset id and slot index

This commit is contained in:
2026-03-27 15:05:37 +00:00
parent e6978397ab
commit 201226b892
13 changed files with 154 additions and 186 deletions
@@ -2940,7 +2940,7 @@ mod tests {
module: "asset".into(),
name: "load".into(),
version: 1,
arg_slots: 3,
arg_slots: 2,
ret_slots: 2,
},
SyscallDecl {
@@ -2996,7 +2996,7 @@ mod tests {
module: "asset".into(),
name: "load".into(),
version: 1,
arg_slots: 3,
arg_slots: 2,
ret_slots: 1,
},
SyscallDecl {
@@ -3021,17 +3021,19 @@ mod tests {
let bytes = serialized_single_hostcall_module(syscall.clone());
let err = vm.initialize(bytes).expect_err("legacy ABI must be rejected");
match err {
VmInitError::LoaderPatchFailed(crate::vm_init_error::LoaderPatchError::ResolveFailed(
prometeu_hal::syscalls::DeclaredLoadError::AbiMismatch {
module,
name,
version,
declared_arg_slots,
declared_ret_slots,
expected_arg_slots,
expected_ret_slots,
},
)) => {
VmInitError::LoaderPatchFailed(
crate::vm_init_error::LoaderPatchError::ResolveFailed(
prometeu_hal::syscalls::DeclaredLoadError::AbiMismatch {
module,
name,
version,
declared_arg_slots,
declared_ret_slots,
expected_arg_slots,
expected_ret_slots,
},
),
) => {
assert_eq!(module, syscall.module);
assert_eq!(name, syscall.name);
assert_eq!(version, syscall.version);