athenavm / athena

Athena monorepo
https://www.athenavm.org/
Apache License 2.0
6 stars 0 forks source link

Call return values #36

Open lrettig opened 3 days ago

lrettig commented 3 days ago

To keep things simple, the call syscall was implemented without support for a return value (#5). We probably want to add additional syscalls with signatures like:

pub fn set_return_value(buf: *const u8, length: u64);
pub fn get_return_value(buf: *mut u8, length: u64);

EVM achieves this using the RETURN and REVERT opcodes. Solana has syscalls that are very similar to these. Here are some helpful resources: