airbender_guest/commit.rs
1//! Commit helpers for mapping values into output registers.
2
3pub use airbender_core::guest::Commit;
4
5/// Commit values to the default output registers and exit successfully.
6pub fn commit<T: Commit>(value: T) -> ! {
7 let words = value.commit_words();
8 airbender_rt::sys::exit_success(&words)
9}
10
11/// Exit with an error.
12pub fn exit_error() -> ! {
13 airbender_rt::sys::exit_error()
14}