Skip to content

feat: implement issues #621 #622 #626 #637 — No-Std Compliance, WASM Metadata, Integration Mocks & Rustdoc - #661

Merged
Sadeequ merged 1 commit into
StellarFlow-Network:mainfrom
Hotmopo:No-Std-Compliance
Jul 25, 2026
Merged

feat: implement issues #621 #622 #626 #637 — No-Std Compliance, WASM Metadata, Integration Mocks & Rustdoc#661
Sadeequ merged 1 commit into
StellarFlow-Network:mainfrom
Hotmopo:No-Std-Compliance

Conversation

@Hotmopo

@Hotmopo Hotmopo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Pull Request Summary

This PR implements four issues across the StellarFlow contracts workspace:

#621 - 🚫 No-Std Compliance | Strict #![no_std] Verification

  • Added default-features = false to all soroban-sdk and soroban-token-sdk dependency declarations across the workspace (root Cargo.toml + all 7 sub-crate Cargo.toml files)
  • Added [target.'cfg(target_arch = "wasm32")'] rustflags in .cargo/config.toml with stack-size=16384 for wasm32 target
  • #![no_std] is declared in all workspace crates; this PR enforces strict no_std at the dependency level
  • All sub-dependencies now conform strictly to Rust's no_std environment requirements

#622 - 🏷 Binary-Metadata | Embedded WASM Interface Metadata (contractmeta!)

  • Added contractmeta! macro to src/lib.rs with version, author, description, interface, build_time, git_sha
  • Created build.rs that exports GIT_SHA and BUILD_TIME at compile time
  • Metadata is inspectable via stellar contract inspect CLI command

#626 - 🎭 Integration-Mocks | Cross-Contract Invocation Mock Framework

  • Created tests/mocks/token_mocks.rs — mock token approvals, transfers, allowances
  • Created tests/mocks/oracle_mocks.rs — mock oracle price feeds and updates
  • Created tests/mocks/mod.rs — module declarations
  • Created tests/integration.rs — integration tests using mock environments, no live network required

#637 - 📚 Documentation | Comprehensive Rustdoc Inline API Specifications

  • Added module-level //! docs and /// field/method documentation across public APIs
  • Added # Parameters, # Returns, # Errors sections to public functions
  • Compatible with cargo doc --no-deps

Related Issues

…, StellarFlow-Network#626, StellarFlow-Network#637

## Changes Summary

### StellarFlow-Network#621 - No-Std Compliance
- Added `default-features = false` to all soroban-sdk and soroban-token-sdk
  dependency declarations in workspace and all sub-crate Cargo.toml files
- Added `[target.'cfg(target_arch = "wasm32")']` rustflags in .cargo/config.toml
  with stack-size=16384 for wasm32 target
- Confirmed `#![no_std]` is declared across all workspace crates

### StellarFlow-Network#622 - Binary Metadata (contractmeta!)
- Added `contractmeta!` macro to `src/lib.rs` with version, author, description,
  interface name, build_time, and git_sha fields
- Created `build.rs` that exports GIT_SHA (from `git rev-parse HEAD`) and
  BUILD_TIME (UNIX timestamp) as cargo rustc-env vars
- Metadata is inspectable via `stellar contract inspect` CLI command

### StellarFlow-Network#626 - Integration Mock Framework
- Created `tests/mocks/` directory with mock implementations
- `tests/mocks/token_mocks.rs` - mock token approvals, transfers, and allowances
- `tests/mocks/oracle_mocks.rs` - mock oracle price feeds and updates
- `tests/mocks/mod.rs` - module declarations
- `tests/integration.rs` - integration tests using mock environments,
  no live network connectivity required

### StellarFlow-Network#637 - Comprehensive Rustdoc
- Added module-level `//!` documentation to `src/storage.rs` explaining
  gas-optimized storage keys and helpers
- Added `///` field documentation to `DataKey` enum variants
- Added `///` method documentation for public API functions
- Added `///` struct documentation for `NodeProfile` and other public types
- Added `//!` module docs covering purpose and usage for key modules
- All documentation uses ``# Parameters``, ``# Returns``, ``# Errors`` sections

Co-authored-by: OpenCode Agent
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Hotmopo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Sadeequ
Sadeequ merged commit 1a740c2 into StellarFlow-Network:main Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants