Skip to content

Example files will not compile or run -- broken imports and APIs #481

Closed

Description

@DeFiVC

What

Multiple example files have compilation/runtime errors:

  1. examples/rust_client.rs:26 -- Uses Address::from_str(&env, ...) which does not exist in soroban_sdk. The correct method is Address::from_string(...). The entire file is non-functional (main body is just a println).

  2. examples/javascript_client_example.js:4 -- Imports from stellar-sdk but the current package is @stellar/stellar-sdk. Will fail with MODULE_NOT_FOUND.

  3. examples/cli_usage_examples.sh:4 -- Exports a placeholder STELLAR_SECRET_KEY="S..." that overwrites any existing env var. Sourcing this file destroys the user's actual key.

  4. examples/javascript_client.js:229 -- Admin and learner use the same secret key, masking authorization issues in the example flow.

  5. examples/rust_client_example.rs:2 -- Uses #![no_std] which is inappropriate for a client example (not a contract).

Why

Examples are the first thing new developers try. Broken examples create a terrible first impression and block adoption. The README points users to these files (line 781).

Scope

Fix each example:

  • rust_client.rs: Use correct Address::from_string API, or convert to a working example
  • javascript_client_example.js: Update import to @stellar/stellar-sdk
  • cli_usage_examples.sh: Remove the secret key export, use a placeholder comment instead
  • javascript_client.js: Use separate keypairs for admin and learner
  • rust_client_example.rs: Remove #![no_std]

Acceptance Criteria

  • Rust examples compile with cargo build --target wasm32-unknown-unknown
  • JavaScript examples have correct imports
  • CLI examples do not overwrite environment variables
  • Examples use separate admin/learner addresses

Technical Context

  • examples/rust_client.rs
  • examples/rust_client_example.rs
  • examples/javascript_client.js
  • examples/javascript_client_example.js
  • examples/cli_usage_examples.sh

Activity

  1. added
    bugSomething isn't working
    rustRust language
    Stellar WaveIssues in the Stellar wave program
    mediumFunctionality impaired but workaround exists, edge case, partial feature
    on Sep 30, 2026
  2. FreshTVMax commented on Sep 30, 2026

    @FreshTVMax

    @FreshTVMax has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Good morning Dearest maintainer , please I am begging you for God sake let me work on this issue🙏🙏

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @FreshTVMax to this issue.

  3. Victoria-Devo commented on Sep 30, 2026

    @Victoria-Devo

    @Victoria-Devo has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello maintainer let me work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Victoria-Devo to this issue.

  4. KingYuss commented on Sep 30, 2026

    @KingYuss

    @KingYuss has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer, I am a Full-Stack and Web3 developer with 4+ years of experience. I have carefully read and understand the description of this issue, and I would like to take on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @KingYuss to this issue.

  5. Sureplus30 commented on Sep 30, 2026

    @Sureplus30

    @Sureplus30 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    kindly assign me to this issues

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Sureplus30 to this issue.

  6. Divine639700 commented on Sep 30, 2026

    @Divine639700

    @Divine639700 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer based on my experiences as a computer software developer I think I am v

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Divine639700 to this issue.

  7. EmmanuelAjogu commented on Sep 30, 2026

    @EmmanuelAjogu

    @EmmanuelAjogu has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer, I’d like to work on this issue. I’ll fix the broken APIs and imports across the listed Rust, JavaScript, and CLI examples, remove the secret-key overwrite, separate the admin and learner keypairs, and remove #![no_std] from the Rust client example. I’ll build the Rust examples, check the JavaScript imports, and verify the CLI example no longer overwrites an existing STELLAR_SECRET_KEY.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @EmmanuelAjogu to this issue.

  8. dhikbass commented on Sep 30, 2026

    @dhikbass

    @dhikbass has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello, I analyzed the problem and understand the expected changes. I'll ensure the implementation follows your project's structure and coding conventions.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @dhikbass to this issue.

  9. ravimahatonp commented on Oct 10, 2026

    @ravimahatonp

    Hello!

    I can take ownership of this task. I'll address Example files will not compile or run -- broken imports and APIs around examples/rust_client.rs and examples/rust_client_example.rs and make sure automated checks and CI workflows stay green. Would love to take this on — please assign!

    Best,

  10. od-hunter commented on Oct 16, 2026

    @od-hunter
    Contributor

    @od-hunter has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi can I be assigned this issue please?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @od-hunter to this issue.

  11. drips-wave commented on Oct 16, 2026

    @drips-wave

    Congratulations, @od-hunter! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @od-hunter: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  12. added a commit that references this issue on Oct 19, 2026
  13. grantfox-oss commented on Oct 19, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @od-hunter's PR #648 was approved and merged by @DeFiVC.

    🏆 @od-hunter: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,748 total points). Track your full progress on GrantFox.

    👏 Great work, @od-hunter! Keep contributing to ChainLearnOfficial.

  14. drips-wave commented on Oct 19, 2026

    @drips-wave

    This issue has been completed by @od-hunter as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @od-hunter: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingmediumFunctionality impaired but workaround exists, edge case, partial featurerustRust language

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions