Commit Graph

13 Commits

Author SHA1 Message Date
Colin Walters
351d9ffbdc Enable trust_return_value_nullability
Several commonly used APIs currently unnecessarily return
`Option<T>`, like `ostree_deployment_get_csum()`.

Flip the gir flag for this to on; I think our annotations are
correct.
2023-03-17 08:13:13 -04:00
Colin Walters
f913e53c2e bindings: Consistently check for dox feature
This fixes the build on docs.rs:

https://docs.rs/crate/ostree-ext/0.10.2/builds/699039
```
[INFO] running `Command { std: "docker" "start" "-a" "7d90466f040d987cbcc393bc89f5f0688f052f49e2339c354dd731fdaf0f9667", kill_on_drop: false }`
[INFO] [stderr]     Checking ostree v0.17.0
[INFO] [stderr] error[E0063]: missing field `process_passthrough_whiteouts` in initializer of `repo_checkout_at_options::RepoCheckoutAtOptions`
[INFO] [stderr]   --> /opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/ostree-0.17.0/rust-bindings/src/repo_checkout_at_options/mod.rs:61:9
[INFO] [stderr]    |
[INFO] [stderr] 61 |         RepoCheckoutAtOptions {
[INFO] [stderr]    |         ^^^^^^^^^^^^^^^^^^^^^ missing `process_passthrough_whiteouts`
```
2023-01-26 14:34:32 -05:00
Colin Walters
8d08e563b4 rust: Drop openat dependency
We can use cap-std in our tests.
2022-11-13 09:47:53 -05:00
Luca BRUNO
dbb6daf101
rust/ostree: regenerate for gtk-rs 0.15 2022-10-26 13:49:35 +00:00
Luca BRUNO
ed6678ce5f
rust/tests: fix static delta generation testcase 2022-10-13 16:30:00 +00:00
Manuel Stühn
14f513cf02
Add test for generating static delta to file 2022-10-13 16:29:58 +00:00
Colin Walters
b55054ec24 rust: Bind ostree_repo_list_commits_starting_with
I wanted to use this as a fallback for
30dee81c22
2022-08-24 09:44:34 -04:00
Colin Walters
55292e4007 rust-bindings: Fix cargo fmt 2022-07-22 15:20:05 -04:00
Colin Walters
e0417957ea rust: Add a test case for ed25519
Specifically, I verified that *before* the previous patch to the
ed25519 C code, the last bit of code would fail with a SIGSEGV when
trying to read the empty signature.
2022-07-14 17:13:51 -04:00
Colin Walters
be2075eef0 repo: Metadata return values from load_file are not nullable
The pattern this API uses in C is to allow the input parameters
pointer targets to be `NULL`, and it doesn't return values in that
case.

A further complexity here is that the API will still return `NULL`
for symbolic links.

But Rust can't express this pattern as is, so we were always
returning values but in `Option<T>` wrappers that the caller needed
to unwrap for the metadata.

(We really want an even more efficient API here that avoids the glib
 objects entirely, e.g. no reason not to pass directly back a type
 that lets Rust directly read from the fd for bare repos, but
 that can come later)
2022-06-23 17:43:42 -04:00
Colin Walters
eee0eea58b rust-bindings: Wire up tests/
Because the source is in a subdirectory, we lose out on cargo target
autodiscovery.

I noticed this when I edited one of the tests in a way that
should have failed, but didn't...
2022-06-12 14:34:02 -04:00
Colin Walters
a5ef4cd5cc Add a repo() accessor to TransactionGuard
I want to write APIs that *require* the caller to have set up
an ostree transaction.  It's natural to require passing a guard
to do so.  But then we want an accessor for the repo.
2022-05-06 12:53:57 -04:00
Luca BRUNO
3fc55a524b ostree/cargo: bump to ostree-sys 0.9.2 2022-05-06 12:53:57 -04:00