Skip to content

Clarify that Soroban contracts have no allocator by default #2594

Closed

Description

@kalepail

Finding

Current introductory wording turns the default no-allocator configuration into
an absolute platform restriction. Soroban contracts are no_std, but the SDK
alloc feature or a custom allocator can enable guest allocation at additional
CPU and code-size cost.

Evidence

Additional recorded evidence:

  • Hello World describes contracts as having no allocator
  • current Rust-dialect/allocator material and soroban-sdk v27 alloc module make allocation optional
  • SDK v27 alloc and no-default-feature compile probes passed

Recommendation

Say "no allocator by default" in introductory material, link the allocator
caveat, and keep the stronger invariant focused on no_std, unsupported
floating point, and the preference for host-backed SDK types.

Source Record

This was found by the downstream Raven eval/improvements loop and recorded as sd-022 (stellar-docs, discovered 2026-07-11).

Public source record: improvements/stellar-docs/sd-022-no-std-allocator-wording.md

Immutable source snapshot: bbb0d4f55527

Resolution Handoff

When a fix is deployed, please link the resolving issue or PR to the source record above and notify Raven through:

https://github.com/kalepail/stellar-raven/issues/new?template=upstream-improvement-ready.yml&title=%5Bupstream-ready%5D%20sd-022%3A%20

Include the finding id, resolving issue/PR, deployed version or timestamp, and the smallest live recheck. Raven independently verifies the upstream surface before changing the finding to fixed-upstream; issue closure or a merged PR alone is not treated as proof. After a distinct reviewer repeats the live check, the active finding is retired to Raven's resolved ledger while the immutable snapshot remains available.

Activity

  1. added
    raven
    good first issue
    on Jul 14, 2026
  2. kalepail commented on Jul 27, 2026

    @kalepail
    ContributorAuthor

    Raven independently rechecked sd-022 on 2026-07-27 and confirmed the original trigger is resolved live.

    Live recheck: 2026-07-27 GET https://developers.stellar.org/docs/build/smart-contracts/getting-started/hello-world - 'there is no allocator and no heap memory in Soroban contracts by default (the SDK does provide an opt-in allocator through its alloc feature - see the alloc example)'

    Thanks for the fix and for the deployment handoff. The active finding is being retired under the ephemeral improvements lifecycle. Immutable source snapshot: https://github.com/kalepail/stellar-raven/blob/773857262d462506947a324b7437b8499f886287/improvements/stellar-docs/sd-022-no-std-allocator-wording.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueraven

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions