console-rs / console-rs/console

Wasm terminal color always detected as unsupported

Open
#154 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.2k
Forks
144
Avg merge
8h 24m
Merged PRs (30d)
4

Description

https://github.com/console-rs/console/blob/02fa5c0b428c1a5eb15a9411326bbad0a2b79d3b/src/wasm_term.rs#L16-L19

In the wasm terminal module, it sets is_a_color_terminal to always return false. But this should use detection similar to native terminals.

In my case, I'm trying to implement console with a wasm runner called lunatic, though coloring doesn't work unless I force it to be enabled, since the compiled module is a wasm module ran by lunatic.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/wasm_term.rs lines 16-19, where the wasm terminal color capability is hard-coded as unsupported. Compare that behavior with the native terminal detection in the repository and investigate how it behaves when a wasm module runs under lunatic. Done means supported color is detected appropriately instead of requiring forced enabling.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.