Update readme a lot

This commit is contained in:
Felix Krull 2018-10-18 20:13:48 +02:00 committed by Colin Walters
parent 67c318164b
commit 84b8a35791
1 changed files with 64 additions and 16 deletions

View File

@ -1,22 +1,28 @@
# Rust bindings for libostree # rust-libostree
libostree is both a shared library and suite of command line tools that combines a "git-like" model for committing and [![pipeline status](https://gitlab.com/fkrull/rust-libostree/badges/master/pipeline.svg)](https://gitlab.com/fkrull/rust-libostree/commits/master)
downloading bootable filesystem trees, along with a layer for deploying them and managing the bootloader configuration. [![Crates.io](https://img.shields.io/crates/v/libostree.svg)](https://crates.io/crates/libostree)
The core OSTree model is like git in that it checksums individual files and has a content-addressed-object store. It's
unlike git in that it "checks out" the files via hardlinks, and they thus need to be immutable to prevent corruption.
[libostree site](https://ostree.readthedocs.io) | [libostree git repo](https://github.com/ostreedev/ostree) **Rust** bindings for [libostree](https://ostree.readthedocs.io).
This project provides [Rust](https://rust-lang.org) bindings for libostree. They are automatically generated, but rather libostree is both a shared library and suite of command line tools that combines
incomplete as of yet. a "git-like" model for committing and downloading bootable filesystem trees,
along with a layer for deploying them and managing the bootloader configuration.
## Setup ## Status
The `libostree` crate requires libostree and the libostree development headers. On Debian/Ubuntu, they can be installed The bindings are quite incomplete right now. Most of it can be autogenerated,
with: 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:
```ShellSession ```ShellSession
$ sudo apt-get install libostree-1 libostree-dev $ sudo apt-get install libostree-1 libostree-dev
``` ```
### Installing
To use the crate, add it to your `Cargo.toml`: To use the crate, add it to your `Cargo.toml`:
```toml ```toml
@ -24,7 +30,8 @@ To use the crate, add it to your `Cargo.toml`:
libostree = "0.1" libostree = "0.1"
``` ```
To use features from later libostree versions, you need to specify the release version as well: To use features from later libostree versions, you need to specify the release
version as well:
```toml ```toml
[dependencies.libostree] [dependencies.libostree]
@ -32,8 +39,49 @@ version = "0.1"
features = ["v2018_7"] features = ["v2018_7"]
``` ```
## License ## Developing
The libostree crate is licensed under the MIT license. See the LICENSE file for details. The `libostree` and `libostree-sys` crates can be built and tested using regular
Cargo commands.
libostree itself is licensed under the LGPL2+. See its [licensing information](https://ostree.readthedocs.io#licensing) ### Generated code
for more information. Most code is generated based on the gir files using the
[gir](https://github.com/gtk-rs/gir) tool. These parts can be regenerated using
the included Makefile:
```ShellSession
$ make generate-libostree-sys generate-libostree
```
Run the following command to update the bundled gir files:
```ShellSession
$ 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:
```ShellSession
$ 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](https://ostree.readthedocs.io#licensing) for more
information.