ostree/rust-bindings/rust
Felix Krull 2b76bf8330 Add back API docs merge to Makefile
I guess we can't do it as part of the crate, so we do it separately.
2022-05-06 12:53:53 -04:00
..
conf Add back API docs merge to Makefile 2022-05-06 12:53:53 -04:00
gir-files Add config file and gir files 2022-05-06 12:53:52 -04:00
libostree Bump versions 2022-05-06 12:53:53 -04:00
libostree-sys Bump versions 2022-05-06 12:53:53 -04:00
.gitignore Add workspace Cargo.toml 2022-05-06 12:53:53 -04:00
.gitlab-ci.yml Add back API docs merge to Makefile 2022-05-06 12:53:53 -04:00
Cargo.toml Add workspace Cargo.toml 2022-05-06 12:53:53 -04:00
LICENSE Keep only one license file in the repo root 2022-05-06 12:53:53 -04:00
Makefile Add back API docs merge to Makefile 2022-05-06 12:53:53 -04:00
README.md Add badge-with-link to docs 2022-05-06 12:53:53 -04:00

rust-libostree

pipeline status Crates.io master-docs

Rust bindings for libostree.

libostree is both a shared library and suite of command line tools that combines a "git-like" model for committing and downloading bootable filesystem trees, along with a layer for deploying them and managing the bootloader configuration.

Status

The bindings are quite incomplete right now. Most of it can be autogenerated, but I simply turned on what I needed and left the rest for later.

Using

Requirements

The libostree crate requires libostree and the libostree development headers. On Debian/Ubuntu, they can be installed with:

$ sudo apt-get install libostree-1 libostree-dev

Installing

To use the crate, add it to your Cargo.toml:

[dependencies]
libostree = "0.1"

To use features from later libostree versions, you need to specify the release version as well:

[dependencies.libostree]
version = "0.1"
features = ["v2018_7"]

Developing

The libostree and libostree-sys crates can be built and tested using regular Cargo commands.

Generated code

Most code is generated based on the gir files using the gir tool. These parts can be regenerated using the included Makefile:

$ make generate-libostree-sys generate-libostree

Run the following command to update the bundled gir files:

$ make update-gir-files

Documentation

The libostree API documentation is not included in the code by default because of its LGPL license. This means normal cargo doc runs don't include API docs for the generated code. Build the crate with the lgpl-docs feature to merge the API docs into the code:

$ cd libostree/
$ cargo doc --features "dox lgpl-docs"

(The dox feature enables all functions etc. regardless of version.) Keep in mind that if you build the crate with the lgpl-docs feature, it is effectively LGPL-licensed and you need to comply with the LGPL requirements (specifically, allowing users of your end product to swap out the LGPL'd parts).

Releases

Releases can be done using the publish_* jobs in the pipeline. There's no versioning helper yet so version bumps need to be done manually.

License

The libostree crate is licensed under the MIT license. See the LICENSE file for details.

libostree itself is licensed under the LGPL2+. See its licensing information for more information.