Error Message:
error: failed to parse manifest at `/home/.../.cargo/registry/src/.../time-core-0.1.8/Cargo.toml`
Caused by:
feature `edition2024` is required
Root Cause:
Running cargo build from the root directory tries to resolve dependencies for all contracts in the workspace, including those that require newer Rust features.
Solution: Always use the full path to the stellar-save contract manifest:
# ✅ CORRECT - Use full path
cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# ❌ WRONG - Don't use root
cargo build --manifest-path Stellar-Save/Cargo.toml
# ❌ WRONG - Don't use root
cargo buildWhy This Works: The stellar-save contract only depends on Soroban SDK 23.0.3, which doesn't require nightly Rust. Other contracts in the workspace have dependencies that need newer features.
Error Message:
error: cannot find module `pool` in this crate
Root Cause: The pool module wasn't properly added to lib.rs, or you're building the wrong contract.
Solution:
-
Verify
lib.rsincludes the pool module:pub mod pool; pub use pool::{PoolInfo, PoolCalculator};
-
Use the correct manifest path:
cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
Error Message:
error: no tests to run
Root Cause:
Not using the --lib flag to run library tests.
Solution:
Always use --lib for library tests:
# ✅ CORRECT
cargo test --lib --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# ❌ WRONG - Missing --lib
cargo test --manifest-path Stellar-Save/contracts/stellar-save/Cargo.tomlSymptoms:
- First build takes several minutes
- Subsequent builds are slow
Solutions:
-
Use incremental compilation:
CARGO_INCREMENTAL=1 cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
-
Use parallel compilation:
cargo build -j 4 --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
-
Use release mode for faster runtime:
cargo build --release --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
-
Clear cache if stuck:
rm -rf Stellar-Save/.cargo Stellar-Save/Cargo.lock cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
Error Message:
error: failed to download `package-name v0.0.0`
Caused by:
unable to get packages from source
Root Cause: Network issue or corrupted cache.
Solutions:
-
Clear the cargo cache:
rm -rf ~/.cargo/registry/cache rm -rf Stellar-Save/Cargo.lock -
Update cargo index:
cargo update
-
Try again:
cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
Error Message:
error: could not compile `stellar-save` (lib)
Root Cause: Syntax error or missing dependency.
Solutions:
-
Check for syntax errors:
cargo check --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
-
View detailed error:
cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml 2>&1 | head -50
-
Verify pool.rs is valid:
cargo check --lib --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
Error Message:
test result: FAILED. X failed; Y passed
Solutions:
-
Run tests with output:
cargo test --lib pool -- --nocapture --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml -
Run specific failing test:
cargo test --lib pool::tests::test_name --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml -
Check for recent changes:
- Verify pool.rs wasn't modified
- Check lib.rs includes pool module
- Verify storage.rs is unchanged
Error Message:
error: failed to run custom build command for `soroban-env-host`
Root Cause: Missing WASM target or build tools.
Solutions:
-
Install WASM target:
rustup target add wasm32-unknown-unknown
-
Verify installation:
rustup target list | grep wasm32 -
Try build again:
cargo build --target wasm32-unknown-unknown --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
Error Message:
error: package requires rustc 1.XX or newer
Solutions:
-
Update Rust:
rustup update
-
Check version:
rustc --version
-
Verify minimum version (1.81.0):
rustc --version | grep -E "1\.(8[1-9]|9[0-9]|[1-9][0-9]{2})"
Error Message:
error: permission denied (os error 13)
Root Cause: File permissions issue.
Solutions:
-
Fix permissions:
chmod -R u+w Stellar-Save/
-
Clear and rebuild:
rm -rf Stellar-Save/target cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# Build
cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# Test all
cargo test --lib --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# Test pool
cargo test --lib pool --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# Check
cargo check --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
# WASM
cargo build --target wasm32-unknown-unknown --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml# ❌ From root without manifest path
cargo build
cargo test
# ❌ Wrong manifest path
cargo build --manifest-path Stellar-Save/Cargo.toml
# ❌ Missing --lib for library tests
cargo test --manifest-path Stellar-Save/contracts/stellar-save/Cargo.tomlRUST_LOG=debug cargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.tomlcargo build --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml 2>&1 | grep warningcargo tree --manifest-path Stellar-Save/contracts/stellar-save/Cargo.tomlcargo doc --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml --no-deps-
Check documentation:
- POOL_CALCULATION.md - API reference
- BUILD_GUIDE.md - Build instructions
- POOL_QUICK_REFERENCE.md - Quick start
-
Review error message:
- Read the full error output
- Check line numbers in error
- Look for "note:" sections
-
Search for similar issues:
- Check Soroban documentation
- Search Rust error codes
- Review GitHub issues
-
Verify setup:
- Check Rust version:
rustc --version - Check Cargo version:
cargo --version - Check WASM target:
rustup target list | grep wasm32
- Check Rust version:
-
Always use full manifest path:
--manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml
-
Use --lib for library tests:
cargo test --lib -
Keep Rust updated:
rustup update
-
Clear cache periodically:
rm -rf Stellar-Save/Cargo.lock
-
Commit working state:
- Before making changes
- After successful build
- Before major updates
-
Verify pool.rs exists:
ls -la Stellar-Save/contracts/stellar-save/src/pool.rs
-
Check lib.rs includes pool:
grep "pub mod pool" Stellar-Save/contracts/stellar-save/src/lib.rs -
Verify tests pass:
cargo test --lib pool --manifest-path Stellar-Save/contracts/stellar-save/Cargo.toml -
Check documentation:
- See DELIVERY_COMPLETE.md for overview
- See BUILD_GUIDE.md for build help
- See POOL_CALCULATION.md for API help
Last Updated: February 21, 2026
Status: Complete ✅