Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cpubits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Implemented as `macro_rules!`.

[Documentation][docs-link]

## Example

Below is a basic example of how you can use the `cpubits!` macro:

```rust
cpubits::cpubits! {
16 => { pub type Word = u16; }
32 => { pub type Word = u32; }
64 => { pub type Word = u64; }
}
```

## License

Licensed under either of:
Expand Down
14 changes: 1 addition & 13 deletions cpubits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,10 @@
//! - `64`
//!
//! This matches the available options for `target_pointer_width` in `rustc`:
//!
//! ```text
//! expected values for `target_pointer_width` are: `16`, `32`, and `64`
//! ```
//!
//! # Example
//!
//! See the [`cpubits`] macro itself for more detailed usage examples including other syntax
//! variations.
//!
//! ```
//! cpubits::cpubits! {
//! 16 => { pub type Word = u16; }
//! 32 => { pub type Word = u32; }
//! 64 => { pub type Word = u64; }
//! }
//! ```

// End of toplevel rustdoc, beginning of macro documentation. We put the detailed docs on the macro
// itself so we can re-export it, and people can easily get to these docs from the re-exported
Expand Down