Basic Linking
Link resources in your infrastructure code:sst.config.ts
src/main.rs
Automatic Permissions
Linking automatically grants IAM permissions:Multiple Resources
Link multiple resources:Linking Secrets
sst.config.ts
src/main.rs
Building Rust Functions
SST automatically builds your Rust functions:sst.config.ts
Cargo.toml should include:
Cargo.toml
Best Practices
Link Only What You Need
Create Type-Safe Resource Structs
Use Once Cell for Static Initialization
Related
Resource Access
Learn more about the Resource API for Rust
Rust Functions
Deploy Rust Lambda functions