Skip to content

Match the Hello World page to current stellar contract init output - #2893

Merged
ElliotFriend merged 1 commit into
stellar:mainfrom
theluckystrike:docs/hello-world-init-output
Oct 6, 2026
Merged

ElliotFriend merged 1 commit into
stellar:mainfrom
theluckystrike:docs/hello-world-init-output

Conversation

@theluckystrike

Copy link
Copy Markdown
Contributor

The Hello World page shows a project layout that stellar contract init no longer creates. I ran stellar contract init soroban-hello-world with stellar-cli 28.1.0 and compared the output with the page.

What the CLI creates today:

.
├── .gitignore
├── AGENTS.md
├── Cargo.toml
├── README.md
└── contracts
    └── hello-world
        ├── Cargo.toml
        ├── Makefile
        └── src
            ├── lib.rs
            └── test.rs

Changes on the page:

  • The contract directory is contracts/hello-world, not contracts/hello_world. The --name default in init.rs is "hello-world", and the directory uses the name as is. I updated the tree, the prose and the four file titles. The hello_world.wasm output path stays, since Cargo turns the dash into an underscore.
  • The tree listed Cargo.lock, which init does not create, and missed AGENTS.md.
  • The workspace Cargo.toml pins soroban-sdk = "28", not "26".
  • The contract Cargo.toml has crate-type = ["lib", "cdylib"]. That changed in contract init: generate a contract that's compatible with fuzzing stellar-cli#1814 so fuzz targets can import the contract. I added one sentence on why lib is there, with a link to the fuzzing guide.

Prettier check passes on the file. No URLs change.

@theluckystrike

Copy link
Copy Markdown
Contributor Author

Friendly follow-up on this PR — happy to adjust anything (scope, approach, or details) if it helps review. Thanks for your time!

stellar-cli 28.1.0 creates contracts/hello-world (the --name default),
adds AGENTS.md, pins soroban-sdk "28" and sets crate-type to
["lib", "cdylib"]. Update the tree, file titles, Cargo.toml snippets
and the crate-type sentence to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theluckystrike
theluckystrike force-pushed the docs/hello-world-init-output branch from 52c2aef to 6316580 Compare October 6, 2026 15:42

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are some great catches! thanks for the contribution, @theluckystrike!!

@ElliotFriend
ElliotFriend merged commit 3f603fe into stellar:main Oct 6, 2026
6 checks passed
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Preview: torn down

@gre3n3yes34

gre3n3yes34 commented Oct 6, 2026 via email

Copy link
Copy Markdown

@gre3n3yes34

gre3n3yes34 commented Oct 6, 2026 via email

Copy link
Copy Markdown

@gre3n3yes34

gre3n3yes34 commented Oct 6, 2026 via email

Copy link
Copy Markdown

@gre3n3yes34

gre3n3yes34 commented Oct 6, 2026 via email

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants