Arbitrum Stylus logo

Stylus by Example

Hello World

Using the console! macro from the stylus_sdk allows you to print output to the terminal for debugging purposes. To view the output, you'll need to run a local Stylus dev node as described in the Arbitrum docs and set the debug feature flag in the Cargo.toml file below.

The console! macro works similar to the built-in println! macro that comes with Rust.

Examples

src/lib.rs

1Loading...
1Loading...

Cargo.toml

1Loading...
1Loading...