Skip to content

[WIP] Aura 2 - ALPM Bindings#451

Closed
fosskers wants to merge 15 commits intomasterfrom
aura2-alpm-bindings
Closed

[WIP] Aura 2 - ALPM Bindings#451
fosskers wants to merge 15 commits intomasterfrom
aura2-alpm-bindings

Conversation

@fosskers
Copy link
Owner

@fosskers fosskers commented May 15, 2017

TODO

  • Minimal bindings to alpm_list
  • Enums
  • Bindings for structs
  • Bindings for db functions
  • Bindings for pkg functions
  • Bindings for transaction functions
  • ...
  • Fix Travis (missing alpm.h)

Motivation

Aura 2 has been a long time coming. The starting point for this has always been writing the ALPM bindings, which I have had a few false starts on. I've been at my new job for a year, and my schedule has settled to the point where I can finally begin this in earnest. Thanks to everyone for their patience.

The path forward is clear, and the main benefits to direct ALPM bindings are:

  • Much faster package DB lookups
  • No more reliance on calling pacman manually through shell calls
  • Complete control over the build process / package info output

FAQ

What about Aura 1.4?

This may not have a reason to continue, despite the work that has been put into it. I feel like starting from scratch with both alpm and freer-effects in mind from the get-go will produce a much cleaner Aura.

Seems like you're writing the bindings by hand.

I am. I surveyed the FFI landscape, where it seemed like c2hsc is the best option around. While a good option, I think it's overkill. We can produce cleaner low-level bindings ourselves that don't even need foreign imports to every function available (particularly in alpm_list). That, and that the dev process isn't as nice when dealing with .hsc files.

What about Nix?

Nix is probably the future of package management. That said, Arch is Arch, and pacman (alpm) is entrenched. Arch is healthy and will be long-lived, and will always need a good bridge to the AUR. pacman can be improved upon (concurrent builds!), and that is where Aura will shine.

@fosskers fosskers force-pushed the aura2-alpm-bindings branch 2 times, most recently from d174345 to 6491060 Compare May 17, 2017 03:01
fosskers added 8 commits May 17, 2017 16:58
- And some `Package` functions slipped in.
- Done on a plane to Winnipeg.
- Now I can finish the rest of the `Package` functions.

- Jared's wedding was good last night.
- This fixes some version parsing bugs, as well as letting the rest of
  our tests pass!
@fosskers fosskers force-pushed the aura2-alpm-bindings branch from 8f0138e to f57c438 Compare May 30, 2017 23:09
fosskers added 4 commits June 12, 2017 19:39
- This is a pattern I'm going to follow for the other modules. It
  makes it clear which functions should be used in real Haskell code,
  and which shouldn't.
@fosskers fosskers mentioned this pull request May 30, 2018
12 tasks
@fosskers fosskers closed this Jun 26, 2018
@fosskers fosskers deleted the aura2-alpm-bindings branch May 29, 2019 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant