Skip to content

Stylus SDK 0.2.4

Compare
Choose a tag to compare
@rachel-bousfield rachel-bousfield released this 07 Sep 19:32
· 151 commits to stylus since this release
74df668

This backwards-compatible patch introduces new features, improved documentation, and minor bug fixes.

Import Raw Host I/Os

Using the new hostio feature flag, users may import the hostio module for direct access to the VM.
This allows users to opt out of Alloy and other large imports.

use stylus_sdk::hostio;
use stylus_sdk::{alloy_primitives::Address, msg};

let mut sender = Address::ZERO;
unsafe {
    hostio::msg_sender(sender.as_mut_ptr());
}

assert_eq!(sender, msg::sender());