google/comprehensive-rust

Colored output in the playground console?

Open

#407 ouverte le 14 févr. 2023

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Rust (2 009 forks)batch import
good first issuehelp wanted

Métriques du dépôt

Stars
 (32 954 stars)
Métriques de merge PR
 (Merge moyen 9j 23h) (36 PRs mergées en 30 j)

Description

One selling point of the Rust compiler is colorful error messages that point directly to the problem. However, the embedded playground doesn't illustrate that, because everything becomes monochrome.

While running the course, I occasionally switched to presenting my terminal to illustrate that, but this required some back-and-forth to present a different window, copy-paste the code, run Cargo, etc. This slowed down the course, so I rarely did that.

In principle, there could be a way to take cargo/rustc's colored output, and turn it into suitable HTML/CSS to display the colors in the embedded "console" as well.

Guide contributeur