2 unstable releases

0.2.0 Aug 16, 2023
0.1.0 Jul 11, 2023

#1220 in Development tools

40 downloads per month

MIT/Apache

9KB
89 lines

Bibliothek

When writing code based on existing publications, it's usually a good idea to cite the source right where you use it. Doing so is normally a bit cumbersome, but this crate aims to make it really easy by generating Structs from bibliography files such as bibtext. This way you can reference your sources just like you would reference any symbol in your source code.

Example

The idea is that you include your bibliography in lib.rs

pub mod bib {
    bibliothek::include_bibtex!("test.bib");
}

and then reference it somewhere else

/// Does some crazy stuff.
///
/// References: [crate::bib::CocoAccelerated]
fn some_algorithm() {
    unimplemented!();
}

lib.rs:

Citations for Rust.

When writing code based on existing publications, it's usually a good idea to cite the source right where you use it. Doing so is normally a bit cumbersome, but this crate aims to make it really easy by generating Structs from bibliography files such as bibtext. This way you can reference your sources just like you would reference any symbol in your source code.

The idea is that you include your bibliography in lib.rs

pub mod bib {
    bibliothek::include_bibtex!("test.bib");
}

and then reference it somewhere else

/// Does some crazy stuff.
///
/// References: [CocoAccelerated](crate::bib::CocoAccelerated)
fn some_algorithm() {
    unimplemented!();
}

The following sources are currently supported:

  • BibTeX: [include_bibtex!]

Other sources, such as yaml files would be welcome additions.

Dependencies

~13MB
~311K SLoC