-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I asked Augment to look at our current folder structure and suggest any improvements that might help developers better understand the project. It suggested this, which seems pretty reasonable:
--
Based on the current structure, here's a reorganized folder structure that puts the core library front and center while moving supporting tools to less prominent locations:
Proposed New Structure
xrpl-wasm-stdlib/
├── src/ # Core library source (moved up from xrpl-wasm-stdlib/src/)
├── xrpl-address-macro/ # Proc macro crate (moved up from xrpl-wasm-stdlib/xrpl-address-macro/)
├── examples/ # Example smart contracts (unchanged - these are important for users)
├── docs/ # Documentation (unchanged - important for users)
├── Cargo.toml # Main workspace config
├── README.md # Main project README
├── CHANGELOG.md
├── LICENSE
├── CONTRIBUTING.md
├── .github/ # GitHub workflows and templates
└── dev/ # Development and maintenance tools (new folder)
├── tools/ # Development scripts and utilities
│ ├── setup.sh
│ ├── build.sh
│ ├── run-tests.sh
│ ├── fmt.sh
│ ├── clippy.sh
│ └── create-example.sh
├── ui/ # Web testing interface
├── e2e-tests/ # Integration tests
└── benchmarks/ # Performance benchmarks (if any)Key Changes
- Flatten the main library: Move xrpl-wasm-stdlib/src/ to root src/ and xrpl-wasm-stdlib/xrpl-address-macro/ to root xrpl-address-macro/
- Create dev/ folder: Group all development/maintenance tools under one clearly labeled directory
- Keep user-facing content prominent: examples/, docs/, and README.md remain at the top level
Required Updates
/cargo.toml
[workspace]
resolver = "2"
members = [
".",
"xrpl-address-macro",
]
exclude = [
"examples",
"dev/e2e-tests",
]
[package]
name = "xrpl-wasm-stdlib"
version = "0.7.1"
edition = "2024"
description = "Standard library for XRPL WebAssembly smart contracts"
license = "ISC"
repository = "https://github.com/ripple/xrpl-wasm-stdlib"
homepage = "https://github.com/ripple/xrpl-wasm-stdlib"
readme = "README.md"
keywords = ["xrpl", "wasm", "smart-contracts", "no-std"]
categories = ["no-std", "embedded", "cryptography::cryptocurrencies"]
include = ["src/", "README.md", "docs/**/*"]
[lib]
crate-type = ["lib"]
[dependencies]
xrpl-address-macro = { version = "0.7.1", path = "xrpl-address-macro" }/xrpl-address-macro.toml
[package]
name = "xrpl-address-macro"
version = "0.7.1"
edition = "2024"
description = "Internal proc macro for xrpl-wasm-stdlib - use xrpl-wasm-stdlib instead"
license = "ISC"
repository = "https://github.com/ripple/xrpl-wasm-stdlib"
homepage = "https://github.com/ripple/xrpl-wasm-stdlib"
readme = "README.md"
keywords = ["xrpl", "macro", "address", "codec"]
categories = ["cryptography", "no-std", "encoding"]
[dependencies]
bs58 = "0.5"
sha2 = "0.10"
[lib]
proc-macro = true
[dependencies.syn]
version = "2.0"
features = ["full"]
[dependencies.quote]
version = "1.0"Benefits
- Clearer focus: The root directory immediately shows the core library structure
- Reduced cognitive load: Development tools are tucked away but still accessible
- Better first impression: New users see src/, examples/, and docs/ first
- Maintains functionality: All existing scripts and tools continue to work with path updates
- Standard Rust layout: Follows typical Rust project conventions with src/ at the root
This structure makes it much clearer that this is primarily a library project, with the supporting development infrastructure clearly separated but still organized.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels