Installation

Description:

How to install the SmartCache crate in your Rust project.

Main Content:

📦 Installation

You can add the crate to your project in two ways:

Option 1: Using Cargo Add

cargo add stylus-cache-sdk

Option 2: Manually in Cargo.toml

[dependencies]
stylus-cache-sdk = "0.1.0"

Once installed, you’re ready to start using the caching utilities in your smart contracts.

After saving this file, run:

cargo build

This ensures that the SDK is downloaded and compiled along with your project.

The crate is published on crates.ioarrow-up-right and also available on docs.rs for browsing full API docs.

🔹 Tip: Keep your SDK version updated to ensure compatibility with the latest SmartCache features and contract standards.

Last updated