Commit Graph

32 Commits

Author SHA1 Message Date
Colin Walters
8b6e96cf52 rust: Add missing feature versions
- We missed 2022_2, which specifically includes
  https://docs.rs/ostree/latest/ostree/static.PATH_BOOTED.html
  and I was really confused why that was missing
- Add more recent upstream versions too
2023-12-19 21:02:59 -05:00
Colin Walters
26dcd4f575 rust: Switch to using include
This way we don't randomly pick up bits from the C library
unintentionally as things change on that side.

I think the support for `!` in `include` may be relatively new
and that's why the original author here chose to do things
via `exclude`.  But using `include` with a few specific exclusions
is just way better.
2023-09-11 17:16:41 -04:00
Colin Walters
2db17d2107 rust: Drop composefs from crate
This greatly reduces the size.  TODO: switch to using `include`.
2023-09-08 07:38:31 -04:00
Colin Walters
e52530b5e0 rust/sys: Also bump semver for this
Since we bumped the glib major.
2023-09-07 14:54:56 -04:00
Colin Walters
aee1ab2c99 rust: Bump semver to 0.19
- New glib 0.18 dependency
- Drop cap-std APIs and features
- Other minor changes
2023-09-01 08:44:25 -04:00
Colin Walters
cccc0f1a5b rust: Port to glib 0.18
- Also rolls up a few other changes in the C API
- Drop `&mut` from `OstreeKernelArgs`; it now confuses type inference.
  More generally while using `&mut` here was well intentioned, it
  goes against the glib standard of mapping everything to `&` and
  accepting interior mutability.
2023-09-01 08:44:25 -04:00
Colin Walters
242a901524 rust: Bump rust-version = 1.70
To pick up the new `AsFd` etc.
2023-08-31 15:34:26 -04:00
Colin Walters
eec67ec109 Drop cap-std from our public APIs
Since it bumped semver (when I didn't expect it to; xref
963eebf3ab (r121651362)

It's not load-bearing enough here to matter versus just passing
an untyped file descriptor.

This mainly means that it will be the `glib` ecosystem which
forces transitive semver bumps for us, not both.
2023-08-31 15:34:26 -04:00
Colin Walters
1b43b39574 rust: Bump MSRV to 1.64
Since a dependency `winnow` bumped to this in a recent update.
2023-04-29 17:11:58 -04:00
Colin Walters
3f27cff6cb rust: Bump semver
Since we did a bunch of API changes due to nullability and
other introspection cleanups.
2023-03-17 08:13:13 -04:00
Colin Walters
31d5f9e13e Release rust/ bindings 0.17.1 2023-02-17 13:06:14 -05:00
Benno Rice
b4667c1b31 Replace the radix64 crate with base64
The radix64 crate was last updated over 3 years ago. On the other
hand the base64 crate appears to be far more actively maintained,
supports all the needed features and has a few orders of magnitude
more users.
2023-01-03 12:02:57 +11:00
Colin Walters
3807b84ef9 rust: Bump to 0.17
We switched gio and cap-std versions, so we need to bump
our own semver.
2022-11-23 13:28:29 -05:00
Colin Walters
1a76f45fd7 rust: Update to gio 0.16
This was quite seamless; the only thing I had to tweak was adding
`+ Send` bounds in the `Box<dyn Error>` manual checksum_async API.
2022-11-21 13:18:51 -05:00
Luca BRUNO
fe8dec9090
cargo: bump minimum Rust version to 1.63
This bumps MSRV to 1.63, in order to prepare for the next version
of gtk-rs stack.

Ref: https://gtk-rs.org/blog/2022/10/18/new-release.html
2022-11-21 15:20:07 +00:00
Joseph Marrero Corchado
0dbd87c017
Merge pull request #2765 from cgwalters/drop-openat
rust: Drop `openat` dependency
2022-11-13 13:08:43 -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
Colin Walters
6f68e3dc4e rust: Update to cap-std 1.0
This was one source of our semver bumps; let's switch to 1.0.
2022-11-11 17:09:35 -05:00
Luca BRUNO
33cf347117
cargo: prepare ostree 0.16.0 and ostree-sys 0.11.0
This prepares for a new release of both crates, now using the
gtk-rs 0.15 stack.
2022-10-27 14:21:23 +00:00
Luca BRUNO
dbb6daf101
rust/ostree: regenerate for gtk-rs 0.15 2022-10-26 13:49:35 +00:00
Luca BRUNO
f689ca098f
rust: regenerate bindings after latest release (2022.6) 2022-10-26 09:26:54 +00:00
Colin Walters
63499747b9 Bump to cap-std 0.25 and io-lifetimes 0.7
Prep for bumping ostree-rs-ext, which will help bump rpm-ostree,
which will get it out of having two copies of rustix.
2022-06-23 14:59:03 -04:00
Colin Walters
b87c8a8e23 rust: Bump semver to 0.15
Prep for some breaking changes.
2022-06-23 14:58:22 -04:00
Colin Walters
e65c8e72c8
Merge pull request #2643 from cgwalters/rust-2021
rust: Switch to 2021 edition, bump MSRV, a few `format!` updates
2022-06-13 09:10:36 -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
99c122d219 rust: Switch to 2021 edition
No real changes.

```
$ cargo fix --edition
note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
This may cause some dependencies to be built with fewer features enabled than previously.
More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
When building the following dependencies, the given features will no longer be used:

  libc v0.2.126 removed features: extra_traits

The following differences only apply when building with dev-dependencies:

  getrandom v0.2.6 removed features: std
```

which looks OK to me.
2022-06-09 15:55:41 -04:00
Colin Walters
d7802c27dd rust-bindings: Update cargo package list
When we did the merger, it turns out cargo by default is basically
going to include all of stuff in the git repository root directory
which is "libostree".  We just want the stuff in `rust-bindings/`.

I initially tried adding `include = "rust-bindings/"` but
according to
https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields
specifying `include` means that `exclude` is
ignored, which is kind of annoying.  Further, doing so *also*
turns off the cargo automatic rules for handling e.g. `gitignore`.

So for now I went with the approach of adding everything from the C
library stuff into `exclude/`.
2022-06-09 15:50:17 -04:00
Colin Walters
61dd54f940 rust-bindings: use correct README.md
I noticed at https://crates.io/crates/ostree/0.14.0
that the `README.md` was wrong...
2022-06-09 14:55:25 -04:00
Colin Walters
dc13645299 rust-bindings: Fix repository reference
Since the repo merge.
2022-06-09 14:53:06 -04:00
Colin Walters
4806d84f56 rust: Bump semver, add feature for current release
There were some changes to the sys API for introspection fixes.
And add a feature for the current release, which is something
I'll add to the checklist for releases.
2022-06-08 09:37:57 -04:00
Colin Walters
252060906b build-sys: Adjust for merge of ostree-rs
Fix up the paths for the crates now that the Rust bindings are in
`rust/`.

We can't today include the test suite because it depends on `ostree-rs-ext`
which would make everything circular.

(Building that now requires a separate `cd tests/inst && cargo build`)
2022-05-06 12:53:57 -04:00
Colin Walters
46a0911c6d build-sys: Add toplevel workspace Cargo.toml
rust-analyzer is happier with this because it understands
the project structure out of the box.

We aren't actually again adding a dependency on Rust/cargo in the core,
this is only used to make `cargo build` work out of the box to build
the Rust test code.
2021-04-15 12:33:34 -04:00