-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment - Building Rustic, on Haiku #1390
Comments
This is probably more missing haiku checks in cfg metadata blocks |
Looks like fixes to Tokio, and Hyper-Util have landed, in their respective master branches, but I'm unsure about when they're going to arrive in new releases, given that there's mutual dependencies involved, from what I can tell. |
About the device id. This is indeed very platform specific:
And there are curently platform-specifc code lines in I don't know about the right type on Haiku, but most likely we have to change the BTW: Thanks a lot for your efforts to add Haiku support! Would you mind opening a PR on rustic_core once you get it compiled? |
Sure. At the moment, to get this far, it's a case of adding some extra Cargo.toml lines, to use newer dependencies, from upstream Git repositories, until they get put into releases - at least the Hyper-Util fixes are awaiting packaging, but the Tokio stuff has been ready, for a while, and seems to at least enable things to build. Extended attribute support is in a weird place, since there's technically a PR (Stebalien/xattr#67), and Haiku has a veneer API, that's compatible with the Linux one, but I can't test it, because some of the underlying libraries aren't plumbed in (at least bytecodealliance/rustix#1251), from what I can tell. I did have a quick hack, that copies the FreeBSD target stanza, for the S_IFBLK/S_IFCHR stuff, but I'm unsure if it's the correct approach, given that Haiku's system headers give 64-bit stat structures, and #defines, and the "nix" stuff uses 32-bit ones (nix-rust/nix#2586):
I also had issues, with trying to use a patched rustic-core crate, because of "virtual manifest" problems, so I haven't gotten around to testing it, yet. It's mostly been one of those "Let's see if it's possible" projects, given that Haiku has had a fairly-modern Rust part, for a while, and quite a lot of the dependencies already have some level of support, so the temptation to try building Rustic, and seeing what issues shake out, was there. (There's also a usability hole, in terms of having a Restic-compatible archiver, that would be nice, to fill, given that Haiku's GoLang support is absolutely ancient, so it made sense, to see how far I can get, in getting Rustic to work). :) |
Whilst I realise that Haiku isn't an officially supported platform, for Rustic, it recently gained a port of Rust 1.83.0 (as part of haikuports/haikuports#11369), and there's a working patch to Tokio (an annexe to tokio-rs/tokio#7002), that can be applied, by crowbarring the following into Rustic's Cargo.toml:
(That's after applying the patch from tokio-rs/tokio#7042, to a local copy of the Tokio repository, TAR-ing it up, and pushing it to a Haiku VM).
With those changes, I can get pretty far, in building, but it seems there's some issues, with the "Heck" library, that seem transient (reported at haikuports/haikuports#11502), and "Hyper-Util" (reported at haikuports/haikuports#11501), which seems to be a dependency of the WebDAV implementation, from what I can gather:
Since I'm far from fluent in Rust, and it's taken quite some effort, to even figure out how to get Rustic to build against a patched version of Haiku, I thought I'd leave this here, to track progress, in case there's any interest, in seeing this become alive.
I assume that, as a workaround, it's not possible to pass in a build flag, to disable the WebDAV/HTTP components, to push things along? :)
The text was updated successfully, but these errors were encountered: