Releases: stellar/rs-soroban-sdk
Release list
27.0.2
What's Changed
- Fix register_at to switch to recording auth for constructors by @leighmcculloch in #1933
- Switch to recording auth for native constructors by @leighmcculloch in #1943
- Bump version to 27.0.2 by @github-actions[bot] in #1947
Full Changelog: v27.0.1...v27.0.2
27.0.1
What's Changed
- Rename allowance expiration argument to live_until_ledger by @fnando in #1932
- Update the version of stellar-env-* crates to fix a dependent version constraint by @leighmcculloch ef0f7e9
- Bump version to 27.0.1 by @github-actions[bot] in #1942
New Contributors
Full Changelog: v27.0.0...v27.0.1
26.1.1
What's Changed
- Update the version of stellar-env-* crates to fix a dependent version constraint 09564a7
Full Changelog: v26.1.0...v26.1.1
25.3.2
What's Changed
- Update the version of stellar-env-* crates to fix a dependent version constraint 076083c
Full Changelog: v25.3.1...v25.3.2
27.0.0
What's Changed
New Features
- CAP-71 — Auth delegation for custom accounts — Adds support for delegating a custom account's
__check_authto another address.CustomAccount::delegate_authhands authorization to a G- or C-address that performs the actual authentication logic, andCustomAccount::get_delegated_signersreturns the delegated signers supplied in the transaction's authorization payload for verification. (#1896)
Improvements
- Zero-copy
BytesN::fromfor[u8; N]—BytesN::fromnow usesBytesN::to_arrayinstead of allocating, avoiding extra memory allocation and significantly reducing CPU cost on conversions (up to ~80% on larger arrays in end-to-end benchmarks). (#1888)
What's Changed
- Update bytes-lit to 0.0.6 by @leighmcculloch in #1882
- Delete .github/workflows/claude-review.yml by @leighmcculloch in #1887
- Test BytesN into [u8; N] conversions by @leighmcculloch in #1889
- Zero Copy improvement:
BytesN::fromto useBytesN::to_arrayby @dkcumming in #1888 - Pin transitive sdk crates to local version in CI by @mootz12 in #1902
- Document wasm32v1-none as supported target by @leighmcculloch in #1900
- Update crate-git-revision to 0.0.9 by @leighmcculloch in #1909
- Update SDK to p27 and add CAP-71 auth delegation support. by @dmkozh in #1896
- Add migration docs for functional changes to cfg attributes and export args by @mootz12 in #1886
- Bump version to 27.0.0-rc.1 by @github-actions[bot] in #1912
- Add a delegated auth rustdoc example by @leighmcculloch in #1915
- Bump version to 27.0.0 by @github-actions[bot] in #1925
Full Changelog: v26.1.0...v27.0.0
27.0.0-rc.1
What's Changed
New Features
- CAP-71 — Auth delegation for custom accounts — Adds support for delegating a custom account's
__check_authto another address.CustomAccount::delegate_authhands authorization to a G- or C-address that performs the actual authentication logic, andCustomAccount::get_delegated_signersreturns the delegated signers supplied in the transaction's authorization payload for verification. (#1896)
Improvements
- Zero-copy
BytesN::fromfor[u8; N]—BytesN::fromnow usesBytesN::to_arrayinstead of allocating, avoiding extra memory allocation and significantly reducing CPU cost on conversions (up to ~80% on larger arrays in end-to-end benchmarks). (#1888)
All Changes
- Update bytes-lit to 0.0.6 by @leighmcculloch in #1882
- Delete .github/workflows/claude-review.yml by @leighmcculloch in #1887
- Test BytesN into [u8; N] conversions by @leighmcculloch in #1889
- Zero Copy improvement:
BytesN::fromto useBytesN::to_arrayby @dkcumming in #1888 - Pin transitive sdk crates to local version in CI by @mootz12 in #1902
- Document wasm32v1-none as supported target by @leighmcculloch in #1900
- Update crate-git-revision to 0.0.9 by @leighmcculloch in #1909
- Update SDK to p27 and add CAP-71 auth delegation support. by @dmkozh in #1896
- Add migration docs for functional changes to cfg attributes and export args by @mootz12 in #1886
- Bump version to 27.0.0-rc.1 by @github-actions[bot] in #1912
Full Changelog: v26.1.0...v27.0.0-rc.1
26.1.0
What's Changed
Deprecations
- Deprecate and ignore
exportfor spec generation in spec shaking v2 — Whenexperimental_spec_shaking_v2is enabled, theexportargument oncontracttype,contracterror, andcontracteventis ignored. A deprecation warning is emitted if used. (#1876)
Improvements
- Fix
cfghandling forcontracttraitandcontractimplblocks —#[contractimpl]methods withcfgattributes now correctly gate their generated args helpers and testutils registration.cfg-gated override methods in#[contractimpl(contracttrait)]blocks are also properly supported. Bothcfgandcfg_attrresult in compiler errors when used on#[contracttrait]default functions. (#1871)
All Changes
- Deprecate export for spec generation in spec shaking v2 by @mootz12 in #1876
- Fix cfg handling for contracttrait and contractimpl blocks by @mootz12 in #1871
- Fix failing OpenZeppelin CI jobs by @leighmcculloch in #1884
Full Changelog: v26.0.1...v26.1.0
26.0.1
What's Changed
Improvements
- Update docs clarifying guarantees of the
Hashtype (#1870) - Surface env!/include! deps in contractmeta! to dep-info (#1872)
- Zero-copy improvement for
U256andI256(#1867)
All Changes
- Set empty top-level permissions in claude-review by @leighmcculloch in #1864
- Harden Claude review workflow by @leighmcculloch in #1865
- Clarify guarantees for Hash by @mootz12 in #1870
- Surface env!/include! deps in contractmeta! to dep-info by @leighmcculloch in #1872
- Zero-copy improvement for
U256andI256by @dkcumming in #1867 - Bump version to 26.0.1 by @github-actions[bot] in #1877
New Contributors
- @dkcumming made their first contribution in #1867
Full Changelog: v26.0.0...v26.0.1
26.0.0
What's Changed
Breaking Changes
-
Renamed
assert_in_contracttodebug_assert_in_contract— Theassert_in_contractmacro has been renamed todebug_assert_in_contractand hidden from public documentation, as it is intended for internal use only. The old name has been deprecated. (#1806) -
Removed deprecated token event format from
soroban-token-sdk— The deprecatedTokenUtils::events()helper, the legacyeventmodule, and theEventswrapper have been removed. These were originally deprecated in v23. (#1822) -
Removed
#[macro_export]from internalimpl_bytesn_reprmacro — This macro was only intended as an internal helper. Its public export has been removed. (#1829)
Deprecations
- Deprecate BLS/BN short type aliases and disambiguate
Fr—bls12_381::Fris renamed toBls12381Frandbn254::Fris renamed toBn254Fr, with the original names kept as deprecated aliases. The other BLS12-381 short aliases (G1Affine,G2Affine,Fp,Fp2) and thecrypto::BnScalarre-export are also deprecated. Existing code continues to compile but will emit deprecation warnings pointing to the new names. This avoids a confusing case where a contract usingbn254::Fras a contract type would silently resolve to the BLS12-381 scalar in the spec mapping. (#1714)
New Features
-
CAP-73 — Stellar Asset Contract
trust()function: Enables the Stellar Asset Contract to create trustlines for classic G-accounts. The newtrust()function creates an unlimited trustline for a specified address, requiring the recipient's authorization viarequire_auth. (#1814) -
CAP-78 — Limited TTL extensions on contract data: Introduces new TTL extension methods that allow developers to set explicit maximum limits on TTL extensions for persistent and instance storage entries. (#1807)
-
CAP-79 — Muxed address strkey conversion: Adds host functions for converting between Stellar strkey format strings and muxed address objects (
strkey_to_muxed_addressandmuxed_address_to_strkey).MuxedAddressnow uses these forfrom_stringandto_strkey. (#1745) -
CAP-80 — Additional BN254 and BLS12-381 host functions: Adds new functions for BN254 MSM, BN254 modular arithmetic, and curve membership checks for BLS12-381 and BN254. (#1745)
-
CAP-82 — Checked arithmetic for 256-bit integers: Adds
checked_{add, sub, mul, pow, div, rem_euclid, shl, shr}functions for 256-bit integer types. These returnOptioninstead of trapping on overflow, allowing contracts to handle arithmetic errors gracefully. Also addsmin_valueandmax_valuehelpers and==operator support for 256-bit number types. (#1801, #1823)
Improvements
-
Updated
stellar-xdrandsoroban-env-*crates — Updatesstellar-xdrto26.0.1and thesoroban-env-common,soroban-env-guest, andsoroban-env-hostcrates to26.1.3. Includes adjustments to testutils for the renamed invocation hook/event API and dependency updates that patch compiler errors introduced in a recent nightly. (#1830, #1841) -
Return errors instead of panicking in
soroban-spec-rust— All code-generation functions insoroban-spec-rust(generate_struct,generate_union,generate_enum,generate_error_enum,generate_event,generate_function, and their_with_optionsvariants) are now fallible and return aGenerateError. Previously, the generator would panic on Wasm contracts with invalid UTF-8 bytes or non-identifier strings in spec entry names. (#1810) -
Fix
Resulttype generation for user-defined error enums namedError— When a contract defines its own error enum namedErrorand uses it in aResult<T, Error>return type, the generated client code now emitsResult<T, Error>(referencing the user-defined enum) instead ofResult<T, soroban_sdk::Error>. The on-the-wire spec format is unchanged, so already-deployed contracts benefit immediately the next time their Rust client is regenerated. (#1862) -
Normalize raw identifiers (
r#) in contract macros — Names, generated Rust idents, and downstream comparison/sort keys now consistently use the unraw'd form of a user'sIdentacross the Soroban macros. Tokens that must refer back to user fields, variants, or functions still preserve the rawIdentso the generated code remains valid Rust. (#1837) -
Document version support policy — A new Support section in the repository README, crate README, and
lib.rsdescribes whichsoroban-sdkversions receive security fixes, bug fixes, and new features. (#1855)
Feature: Experimental Spec Shaking V2
This release includes several improvements to the experimental_spec_shaking_v2 feature. It remains opt-in — users must enable the experimental_spec_shaking_v2 cargo feature to use it.
-
Cleaner failure when the build environment variable is missing — When
experimental_spec_shaking_v2is enabled andSOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2is not set (e.g. building withcargo builddirectly instead ofstellar-cli), the WASM build now exits with status code 1 and a clear message that the feature requires the CLI, instead of panicking. (#1846) -
Retain panic-only error enums — A
#[contracterror]enum used only viapanic_with_error!orassert_with_error!(i.e. never appearing in aResult<_, E>return type) is now correctly retained in the contract spec. Previously, such enums were stripped from the WASM even though they are part of the contract's observable error interface. (#1852) -
Keep alive subtype markers for container types via reference — Spec markers for nested types in
Vec<T>,Map<K, V>, and reference types are now preserved across the linker's DCE pass without invoking them at runtime. This fixes a stack overflow that could occur with recursive type definitions. Contracts may see a small size increase (~15 bytes per occurrence; ~100 bytes total in the SDK's test contracts). (#1835)
All Changes
- Update to v26 and add support for CAP-73, 78, 79, 80 and 82 by @mootz12 in #1814
- Enable spec shaking v2 by default by @leighmcculloch in #1812
- clean up macro
impl_bytesn_reprand remove export by @jayz22 in #1829 - Update
soroban-env-*crates to version=v26.1.2by @mootz12 in #1830 - Rename
assert_in_contracttodebug_assert_in_contractby @mootz12 in #1806 - Remove deprecated token event format from
soroban-token-sdkby @mootz12 in #1822 - Fallback to spec shaking v1 if env var is not set by @mootz12 in #1831
- Deprecate BLS/BN short type aliases and disambiguate
Frby @jayz22 in #1714 - Bump stellar-xdr and soroban-env crates by @mootz12 in #1841
- Return errors instead of panicking in soroban-spec-rust by @leighmcculloch in #1810
- Normalize raw identifiers (
r#) in contract macros by @mootz12 in #1837 - Revert #1831 and #1812 by @leighmcculloch in #1850
- Use
experimental_spec_shaking_v2for integration tests and improve WASM build failure by @mootz12 in #1846 - Retain panic-only error enums in spec shaking v2 by @leighmcculloch in #1852
- Add Claude auto-review workflow for pull requests by @leighmcculloch in #1853
- Document version support policy by @leighmcculloch in #1855
- Update spec shaking v2 to keep alive subtype markers via reference by @mootz12 in #1835
- Fix Result type generation for user-defined error enums named "Error" by @mootz12 in #1862
- Bump version to 26.0.0 by @github-actions[bot] in #1863
Full Changelog: v25.3.1...v26.0.0
26.0.0-rc.1
What's Changed
Breaking Changes
-
Spec shaking v2 enabled by default — The
experimental_spec_shaking_v2feature is now included in the default feature set, improving the specification optimization process. Users can still disable it via feature flags if needed. (#1812) -
Renamed
assert_in_contracttodebug_assert_in_contract— Theassert_in_contractmacro has been renamed todebug_assert_in_contractand hidden from public documentation, as it is intended for internal use only. The old name has been deprecated. (#1806) -
Removed deprecated token event format from
soroban-token-sdk— The deprecatedTokenUtils::events()helper, the legacyeventmodule, and theEventswrapper have been removed. These were originally deprecated in v23. (#1822) -
Removed
#[macro_export]from internalimpl_bytesn_reprmacro — This macro was only intended as an internal helper. Its public export has been removed. (#1829)
New Features
-
CAP-73 — Stellar Asset Contract
trust()function: Enables the Stellar Asset Contract to create trustlines for classic G-accounts. The newtrust()function creates an unlimited trustline for a specified address, requiring the recipient's authorization viarequire_auth. (#1814) -
CAP-78 — Limited TTL extensions on contract data: Introduces new TTL extension methods that allow developers to set explicit maximum limits on TTL extensions for persistent and instance storage entries. (#1807)
-
CAP-79 — Muxed address strkey conversion: Adds host functions for converting between Stellar strkey format strings and muxed address objects (
strkey_to_muxed_addressandmuxed_address_to_strkey).MuxesAddressnow uses these forfrom_stringandto_strkey. (#1745) -
CAP-80 — Additional BN254 and BLS12-381 host functions: Add new functions for BN254 MSM, BN254 modular arithmetic, and curve membership checks for BLS12-381 and BN254. (#1745)
-
CAP-82 — Checked arithmetic for 256-bit integers: Adds
checked_{add, sub, mul, pow, div, rem_euclid, shl, shr}functions for 256-bit integer types. These returnOptioninstead of trapping on overflow, allowing contracts to handle arithmetic errors gracefully. Also addsmin_valueandmax_valuehelpers and==operator support for 256-bit number types. (#1801) (#1823)
Improvements
-
Spec shaking v2 gracefully falls back to v1 — When the
SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2environment variable is not set (e.g. when building withcargo builddirectly instead ofstellar-cli), spec shaking v2 now falls back to v1 instead of panicking. A compiler warning is emitted on Wasm targets. (#1831) -
Updated
soroban-env-*crates to v26.1.2 — Updatessoroban-env-common,soroban-env-guest, andsoroban-env-hostto v26.1.2, including adjustments to testutils for the renamed invocation hook/event API. (#1830)
All Changes
- Update to v26 and add support for CAP-73, 78, 79, 80 and 82 by @mootz12 in #1814
- Enable spec shaking v2 by default by @leighmcculloch in #1812
- clean up macro
impl_bytesn_reprand remove export by @jayz22 in #1829 - Update
soroban-env-*crates to version=v26.1.2by @mootz12 in #1830 - Rename
assert_in_contracttodebug_assert_in_contractby @mootz12 in #1806 - Remove deprecated token event format from
soroban-token-sdkby @mootz12 in #1822 - Fallback to spec shaking v1 if env var is not set by @mootz12 in #1831
Full Changelog: v25.3.1...v26.0.0-rc.1