Make codespan-reporting more prominent in README

Since we are trying to now guide people to use `codespan-reporting` directly without relying on codespan, it makes sense to make it more prominent in the README.
This commit is contained in:
Brendan Zabarauskas
2020-03-09 16:23:32 +11:00
parent 9b69e05097
commit 0acf6d09fe
5 changed files with 52 additions and 62 deletions
+32 -25
View File
@@ -1,4 +1,4 @@
# codespan
# codespan-reporting
[![Continuous integration][actions-badge]][actions-url]
[![Crates.io][crate-badge]][crate-url]
@@ -7,46 +7,53 @@
[actions-badge]: https://img.shields.io/github/workflow/status/brendanzab/codespan/Continuous%20integration
[actions-url]: https://github.com/brendanzab/codespan/actions
[crate-url]: https://crates.io/crates/codespan
[crate-badge]: https://img.shields.io/crates/v/codespan.svg
[docs-url]: https://docs.rs/codespan
[docs-badge]: https://docs.rs/codespan/badge.svg
[crate-url]: https://crates.io/crates/codespan-reporting
[crate-badge]: https://img.shields.io/crates/v/codespan-reporting.svg
[docs-url]: https://docs.rs/codespan-reporting
[docs-badge]: https://docs.rs/codespan-reporting/badge.svg
[gitter-badge]: https://badges.gitter.im/codespan-rs/codespan.svg
[gitter-lobby]: https://gitter.im/codespan-rs/Lobby
Utilities for dealing with source code locations.
Beautiful diagnostic reporting for text-based programming languages.
## Supporting crates
## Running the CLI example
Codespan also allows you to easily set up pretty diagnostic formatting for
command line interfaces via the [`codespan-reporting`][codespan-reporting]
crate. This will give you output that looks like the following:
To get an idea of what the colored CLI output looks like,
clone the [repository](https://github.com/brendanzab/codespan)
and run the following shell command:
![screenshot](./codespan-reporting/assets/screenshot.png)
```sh
cargo run --example=term
cargo run --example=term -- --color never
```
[Rustdoc][codespan-reporting-docs]
You should see something like the following in your terminal:
In the future we would also like to make it easy for language developers to set
up language server protocols and interface with browser-embedded editors like
Ace or Monaco.
![screenshot](./assets/screenshot.png)
[codespan-reporting]: https://crates.io/crates/codespan-reporting
[codespan-reporting-docs]: https://docs.rs/codespan-reporting
We're still working on improving the output - stay tuned for updates!
## Codespan in use
Codespan is used in the following projects:
Codespan is currently used in the following projects:
- [Gluon](https://github.com/gluon-lang/gluon)
- [Pikelet](https://github.com/pikelet-lang/pikelet)
- [Gleam](https://github.com/lpil/gleam/)
- [Arret](https://arret-lang.org)
- [Gleam](https://github.com/lpil/gleam/)
- [Gluon](https://github.com/gluon-lang/gluon)
- [cargo-deny](https://github.com/EmbarkStudios/cargo-deny)
- [Pikelet](https://github.com/pikelet-lang/pikelet)
## Acknowledgments
## Alternatives
Inspired by [rustc's error reporting infrastructure][libsyntax], the [codemap][codemap]
crate, and [language-reporting][language-reporting] (a fork of codespan).
There are a number of alternatives to `codespan-reporting`, including:
[libsyntax]: https://github.com/rust-lang/rust/tree/master/src/libsyntax
- [annotate-snippets][annotate-snippets]
- [codemap][codemap]
- [language-reporting][language-reporting] (a fork of codespan)
These are all ultimately inspired by rustc's excellent [error reporting infrastructure][librustc_errors].
[annotate-snippets]: https://crates.io/crates/annotate-snippets
[codemap]: https://crates.io/crates/codemap
[language-reporting]: https://crates.io/crates/language-reporting
[librustc_errors]: https://github.com/rust-lang/rust/tree/master/src/librustc_errors
+2 -2
View File
@@ -1,10 +1,10 @@
[package]
name = "codespan-reporting"
version = "0.8.0" # CODESPAN
readme = "README.md"
readme = "../README.md"
license = "Apache-2.0"
authors = ["Brendan Zabarauskas <bjzaba@yahoo.com.au>"]
description = "Diagnostic reporting for text-based programming languages"
description = "Beautiful diagnostic reporting for text-based programming languages"
homepage = "https://github.com/brendanzab/codespan"
repository = "https://github.com/brendanzab/codespan"
documentation = "https://docs.rs/codespan-reporting"
-34
View File
@@ -1,34 +0,0 @@
# codespan-reporting
[![Continuous integration][actions-badge]][actions-url]
[![Crates.io][crate-badge]][crate-url]
[![Docs.rs][docs-badge]][docs-url]
[![Gitter][gitter-badge]][gitter-lobby]
[actions-badge]: https://img.shields.io/github/workflow/status/brendanzab/codespan/Continuous%20integration
[actions-url]: https://github.com/brendanzab/codespan/actions
[crate-url]: https://crates.io/crates/codespan-reporting
[crate-badge]: https://img.shields.io/crates/v/codespan-reporting.svg
[docs-url]: https://docs.rs/codespan-reporting
[docs-badge]: https://docs.rs/codespan-reporting/badge.svg
[gitter-badge]: https://badges.gitter.im/codespan-rs/codespan.svg
[gitter-lobby]: https://gitter.im/codespan-rs/Lobby
Diagnostic reporting for text-based programming languages.
## Running the CLI example
To get an idea of what the colored CLI output looks like with
`codespan-reporting`, clone the [repository](https://github.com/brendanzab/codespan)
and run the following shell command:
```sh
cargo run --example=term
cargo run --example=term -- --color never
```
You should see something like the following in your terminal:
![screenshot](./assets/screenshot.png)
We're still working on the output - stay tuned for updates!
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "codespan"
version = "0.8.0" # CODESPAN
readme = "../README.md"
readme = "README.md"
license = "Apache-2.0"
authors = ["Brendan Zabarauskas <bjzaba@yahoo.com.au>"]
description = "Data structures for tracking locations in source code"
+17
View File
@@ -0,0 +1,17 @@
# codespan
[![Continuous integration][actions-badge]][actions-url]
[![Crates.io][crate-badge]][crate-url]
[![Docs.rs][docs-badge]][docs-url]
[![Gitter][gitter-badge]][gitter-lobby]
[actions-badge]: https://img.shields.io/github/workflow/status/brendanzab/codespan/Continuous%20integration
[actions-url]: https://github.com/brendanzab/codespan/actions
[crate-url]: https://crates.io/crates/codespan
[crate-badge]: https://img.shields.io/crates/v/codespan.svg
[docs-url]: https://docs.rs/codespan
[docs-badge]: https://docs.rs/codespan/badge.svg
[gitter-badge]: https://badges.gitter.im/codespan-rs/codespan.svg
[gitter-lobby]: https://gitter.im/codespan-rs/Lobby
Utilities for dealing with source code locations.