Skip to content

Use owo-colors instead of colored#5029

Open
onx2 wants to merge 2 commits into
clockworklabs:masterfrom
onx2:chore/use-owo-colors
Open

Use owo-colors instead of colored#5029
onx2 wants to merge 2 commits into
clockworklabs:masterfrom
onx2:chore/use-owo-colors

Conversation

@onx2
Copy link
Copy Markdown
Contributor

@onx2 onx2 commented May 15, 2026

Description of Changes

Replaces direct usage of colored with owo-colors in the CLI and update crates.

owo-colors provides similar styling ergonomics while avoiding colored's lazy_static dependency. It is also zero-allocation for common styling operations, so slightly faster, and has a smaller implementation footprint.

API and ABI breaking changes

None.

Expected complexity level and risk

1

This is a small dependency and import replacement for terminal styling in CLI-facing output.

Testing

  • cargo check -p spacetimedb-cli -p spacetimedb-update
  • Reviewer: verify CLI colored output still renders as expected for common commands.
image


loop {
let readline = rl.readline(&format!("🪐{}>", &database).green());
let readline = rl.readline(&format!("🪐{}>", &database).green().to_string());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Macros like format and println are ok with anything that impl Display but this readline needs a &str so we need to first call to_string to convert unlike before which was automatically alloc a string for us.

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.

1 participant