Skip to content

docs: add rust_icu hello world example#366

Open
arnavnagzirkar wants to merge 2 commits into
google:mainfrom
arnavnagzirkar:fix-196
Open

docs: add rust_icu hello world example#366
arnavnagzirkar wants to merge 2 commits into
google:mainfrom
arnavnagzirkar:fix-196

Conversation

@arnavnagzirkar
Copy link
Copy Markdown

Adds a concise Hello World section to the README showing how to use rust_icu_umsg MessageFormat with rust_icu_common, rust_icu_uloc, and rust_icu_ustring dependencies.\n\nThis is a docs-only change.

@filmil
Copy link
Copy Markdown
Member

filmil commented Jun 3, 2026

How about an actual "examples subdir with the configurations you want to demo?

Address review: move the Hello, World! demo into a standalone, runnable
examples/hello_world crate (Cargo.toml + src/main.rs) instead of an inline
README snippet. The crate is excluded from the workspace so the CI feature
matrix is unaffected, and the top-level README now links to it.
@arnavnagzirkar
Copy link
Copy Markdown
Author

Good call — done. I moved the demo into a standalone, runnable examples/hello_world crate:

  • examples/hello_world/Cargo.toml — the exact dependency configuration to demo (rust_icu_common, rust_icu_uloc, rust_icu_umsg, rust_icu_ustring), with a comment showing the crates.io version alternative for downstream users.
  • examples/hello_world/src/main.rscargo run prints Hello, World!.
  • examples/hello_world/README.md — how to run it.

The crate is added to exclude in the root Cargo.toml so the CI feature matrix (cargo test --no-default-features --features ...) is unaffected, and the top-level README now links to the example instead of inlining the code.

@filmil
Copy link
Copy Markdown
Member

filmil commented Jun 3, 2026

Is this something that could be tied into presubmits? It would be much more useful if it's actually checked that it works.

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.

2 participants