Skip to content

Commit 2ba6e5b

Browse files
committed
Do a better job with crate doc
1 parent 97fedc1 commit 2ba6e5b

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[package]
22
name = "notcc"
33
description = "A compiler for a subset of C written in Rust. Based on the book \"Writing a C Compiler\" by Nora Sandler."
4+
readme = "rust_src/README.md"
45
version = "0.1.0"
56
edition = "2024"
7+
repository = "https://github.com/rlivings39/learning-compilers"
68

79
[dependencies]
810
clap = { version = "4.5.44", features = ["derive"] }

rust_src/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# notcc - A compiler for a subset of C
2+
3+
This Crate implements a compiler for a subset of C based on the book "Writing a C Compiler" by Nora Sandler.
4+
5+
## Usage
6+
7+
Build the crate and view the CLI help
8+
9+
```bash
10+
cargo run --- -h
11+
```
12+
13+
To use this crate as a library have a look at the function `driver_main` which invokes the entire compiler driver as library interface.
14+
15+
## Full documentation
16+
17+
The full status of the compiler is described in [https://github.com/rlivings39/learning-compilers](https://github.com/rlivings39/learning-compilers)

rust_src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![doc = include_str!("README.md")]
12
mod driver;
23
pub mod error;
34

0 commit comments

Comments
 (0)