Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ jobs:
run: just clippy-test
- name: Unit Tests
run: just test
- name: Fixture tests (import_contract! + register_import!)
run: just test-register-import
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Note: the `justfile` still carries some recipes from the monorepo. Prefer the `c
| `stellar-registry-cli` | The `stellar registry` CLI: `publish`, `deploy`, `download`, `install`/`create-alias`, `upgrade`, `register-contract`, and `account` (`account register`, `account preauthorize`, ...) |
| `stellar-registry-build` | Library for interacting with the registry at build time |
| `stellar-registry-macro` | Macro crate defining procedural macros `import_contract!`, `import_contract_client!`, and `import_asset`. Proc-macro crates are special and need to only export proc-macros. |
| `stellar-registry` | Re-exports the `import_contract!`, `import_contract_client!`, and `import_asset!` macros from `stellar-registry-macro`. Might export more behavior later. (published to crates.io; dev-dependency of `stellar-registry/contracts`) |
| `stellar-registry` | Re-exports the `import_contract!`, `import_contract_client!`, and `import_asset!` macros from `stellar-registry-macro`. Its `testutils` feature adds `testutils::register_import!` for testing contracts that use `import_contract!`. Might export more behavior later. (published to crates.io; dev-dependency of `stellar-registry/contracts`) |
| `stellar-registry-name` | Defines standard name parsing/formatting used by `stellar-registry-macro` and `stellar-registry-cli` |
| `stellar-registry-test` | Unpublished testing tools used throughout this monorepo as a dev-dependency |

Expand All @@ -57,6 +57,8 @@ Note: the `justfile` still carries some recipes from the monorepo. Prefer the `c

- Unit tests run without external dependencies.
- Integration tests require a local Stellar RPC (Docker `stellar/quickstart`) and the `integration-tests` feature flag.
- `just test-register-import` runs the `hello_caller` fixture, which is excluded from the workspace because `import_contract!` needs seeded cache files to compile.
- `just test-register-import-testnet` runs the `token_caller` fixture against testnet; it needs network access, so CI doesn't run it.
- Command tests use `stellar_registry_test::RegistryTest`, defined in local crate `crates/stellar-registry-test`

## Cross-repo dependencies
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
resolver = "2"
default-members = ["crates/*"]
members = ["crates/*", "crates/stellar-registry-test/fixtures/contracts/*"]
# Needs seeded `import_contract!` cache files to compile; see its Cargo.toml.
exclude = [
"crates/stellar-registry-test/fixtures/contracts/hello_caller",
"crates/stellar-registry-test/fixtures/contracts/token_caller",
]

[workspace.package]
repository = "https://github.com/stellar-registry/cli"
Expand All @@ -21,6 +26,7 @@ stellar-cli = { version = "28.1.0", package = "soroban-cli", default-features =
soroban-rpc = { package = "stellar-rpc-client", version = "28.0.0" }
soroban-sdk = { version = "28.0.0" }
soroban-spec-tools = "28.1.0"
soroban-spec = "28.0.0"

admin-sep = "0.28.1"
stellar-xdr = "=30.0.0"
Expand Down
1 change: 1 addition & 0 deletions crates/stellar-registry-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ stellar-build = { workspace = true }
stellar-registry-name = { workspace = true }
stellar-strkey = { workspace = true }
stellar-xdr = { workspace = true }
soroban-spec = { workspace = true }

[dev-dependencies]
sha2 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/stellar-registry-macro/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# stellar-registry-macro

The [macro crate] defining `import_contract!`, `import_contract_client!`, and `import_asset!` which get re-exported by the [stellar-registry] crate.
The [macro crate] defining `import_contract!`, `import_contract_client!`, `import_asset!`, and the test helper `register_import!`, which get re-exported by the [stellar-registry] crate.

[macro crate]: https://www.reddit.com/r/rust/comments/tuxawv/why_do_procedural_macros_have_to_be_defined_in_a/
[stellar-registry]: https://crates.io/crates/stellar-registry
Loading
Loading