Skip to content

Intro Exercise: Hello World - #2

Open
f01d-zero wants to merge 1 commit into
ratatui:mainfrom
f01d-zero:00_intro
Open

f01d-zero wants to merge 1 commit into
ratatui:mainfrom
f01d-zero:00_intro

Conversation

@f01d-zero

Copy link
Copy Markdown

Adds the first exercise. It teaches how to start a ratatui app 🧀.

The student uncomments ratatui::run(app) in main. The app draws "hello world" and exits on a key press.

Includes the reference solution and the info.toml entry.

- compile gate: main lacks tail expression until TODO uncommented
- drop .gitkeep files; rustlings dev check forbids extra files
- in-loop TTY check lets solution exit clean under piped stdout

@mo8it mo8it left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Uncommenting a line seems very boring, even for an introduction. What does the user learn out of this?

@f01d-zero

Copy link
Copy Markdown
Author

I thought this would serve as a good introduction for users that didn't go through rustlings.

It also showcases the minimal structure of a ratatui app.

@orhun

orhun commented Aug 21, 2026

Copy link
Copy Markdown
Member

Yeah, I think we should do something else as the first exercise. Maybe we could give the user init and expect them to render a text instead?

@shadowmkj

Copy link
Copy Markdown

Would having the user render a simple Span be enough for a first exercise?
Also, how can we show live output of the TUI? will we have to build some rendering submodule?

@mo8it

mo8it commented Sep 3, 2026

Copy link
Copy Markdown

Also, how can we show live output of the TUI? will we have to build some rendering submodule?

The easiest option would be to run it in a Zellij pane. Rustlings would open a dedicated pane and replace it every time the code changes.

@orhun

orhun commented Sep 6, 2026

Copy link
Copy Markdown
Member

Would having the user render a simple Span be enough for a first exercise?

I think a Line would be better. It's probably more understandable than Span.

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.

4 participants