Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.
/ lgpl-docs Public archive

LGPL-licensed docs for Gtk-rs crates

License

Notifications You must be signed in to change notification settings

gtk-rs/lgpl-docs

Folders and files

NameName
Last commit message
Last commit date
Apr 2, 2020
Jul 4, 2020
Oct 21, 2020
Dec 15, 2019
Jul 4, 2020
Feb 19, 2021
Feb 19, 2021
Feb 19, 2021
Jul 5, 2020
Jul 4, 2020
Dec 15, 2019
Aug 13, 2019
Feb 19, 2021
Jul 4, 2020
Feb 19, 2021
Jul 4, 2020
Jun 23, 2019
Jun 23, 2019
Feb 19, 2021
Feb 2, 2016
Mar 2, 2019
Oct 4, 2020
Feb 1, 2016
Jun 5, 2017

Repository files navigation

lgpl-docs

LGPL-licensed docs for Gtk-rs crates.

Structure

The docs for each library come from two files:

  • docs.rs is maintained manually, its entries take precedence over the vendor.rs file. PRs should normally target this file.

  • vendor.rs is generated by gir via simple transformation of the upstream docs found in GIR definitions. It serves as a fallback, the docs in it are tailored for C not Rust. This file should not be hand-edited.

You can generate it as follows:

cd gir
cargo run --release -- -c ../your-repo/Gir.toml -d ../gir-files/ -o ../your-repo/ -m doc

Cairo, which lacks GIR definitions, doesn't have a vendor.rs file.

Format

The format of the files is Markdown with extra metadata in HTML-like comments, which ties each entry to a specific Rust item. For example, this rustdoc snippet:

impl Button {
    /// Creates a new `Button` widget. To add a child widget to the button,
    /// use `Container::add`.
    ///
    /// # Returns
    ///
    /// The newly created `Button` widget.
    pub fn new() -> Button {

corresponds to this entry in gtk/vendor.md:

<!-- impl Button::fn new -->
Creates a new `Button` widget. To add a child widget to the button,
use `Container::add`.

# Returns

The newly created `Button` widget.

License

LGPL