Skip to content

Lix support #229

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

Open
nrabulinski opened this issue Mar 13, 2025 · 1 comment
Open

Lix support #229

nrabulinski opened this issue Mar 13, 2025 · 1 comment

Comments

@nrabulinski
Copy link

Hey, I maintain https://git.lix.systems/nrabulinski/attic which (very loosely) follows both attic's and lix's main for my own personal use. Previously it wasn't feasible for me to offer any more maintenance than that which is why that fork only supports Lix, and only the commit my own configuration is at. Nowadays it's a bit different so my question is whether upstream support for Lix would be welcome? My plan would be to follow stable Lix releases and (roughly) main for those living on the edge. If you don't want that, that's fine but if you think you could accept that - I'll prepare a PR :)

zhaofengli added a commit that referenced this issue Mar 16, 2025
Fixes #229.

Co-authored-by: Nikodem Rabuliński <nikodem@rabulinski.com>
zhaofengli added a commit that referenced this issue Mar 17, 2025
Fixes #229.

Co-authored-by: Nikodem Rabuliński <nikodem@rabulinski.com>
zhaofengli added a commit that referenced this issue Mar 17, 2025
Currently we auto-detect the available implementation and prefer Nix,
and we need to add a Cargo feature to explicitly select the
implementation to link against.

Fixes #229.

Co-authored-by: Nikodem Rabuliński <nikodem@rabulinski.com>
zhaofengli added a commit that referenced this issue Mar 17, 2025
Currently we auto-detect the available implementation and prefer Nix,
and we need to add a Cargo feature to explicitly select the
implementation to link against.

Fixes #229.

Co-authored-by: Nikodem Rabuliński <nikodem@rabulinski.com>
zhaofengli added a commit that referenced this issue Mar 17, 2025
Currently we auto-detect the available implementation and prefer Nix,
and we need to add a Cargo feature to explicitly select the
implementation to link against.

Fixes #229.

Co-authored-by: Nikodem Rabuliński <nikodem@rabulinski.com>
@nrabulinski
Copy link
Author

@zhaofengli I've seen you porting my changes, thanks! As a heads up, between Lix 2.92 (current stable) and 2.93 (unreleased yet) Lix moved to using kj-async for pretty much all store-related tasks inside the codebase. This means it no longer plays nicely with Rust's async as the ffi cannot be created on one thread and destroyed on another as that'll result in an exception.
What I did is I created a dedicated thread solely for ffi and the rest of the app talks to it over channels. It's not the most elegant and I don't think it's production ready as it stands, but I wanted something that works for my needs for now. I'm pretty sure this implementation should be backwards compatible so you may want to start thinking about similar solution, if you want to be compatible in the future.
Ref: https://git.lix.systems/nrabulinski/attic/commit/100eae5b9d2e182fb654ed31392d26747f0bcfbb

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

No branches or pull requests

1 participant