console-rs / console-rs/console
Wasm terminal color always detected as unsupported
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 144
- Avg merge
- 8h 24m
- Merged PRs (30d)
- 4
Description
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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