Skip to content
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

Split off a nix-store-pure #12272

Open
Ericson2314 opened this issue Jan 15, 2025 · 4 comments
Open

Split off a nix-store-pure #12272

Ericson2314 opened this issue Jan 15, 2025 · 4 comments
Labels
portability Supporting more platforms

Comments

@Ericson2314
Copy link
Member

Ericson2314 commented Jan 15, 2025

Motivation

  • The nix-store library is too big!
  • Having a WASM/enscripten build would be very nice. That build cannot have e.g. LocalStore anyways.
    • https://nixcloud.io/tour is a cool thing made from an ancient enscripten build of Nix. I would like for it to be more official, and easy to update to new versions of Nix.
  • We could have a CPP soup to disable things for the WASM build, but that is hard to maintain. A library split is better because then people doing regular builds won't regress the intended separation.

Method

We could either split of a nix-store-pure or a nix-store-io --- in essence this is asking which of the two resulting libraries should inherit the nix-store name, and which should have to get a new name. For compat, making nix-store the downstream library which has the same interface is better.

  • nix-expr should only depend on nix-store-pure
  • We may also need a nix-util-pure
@Ericson2314 Ericson2314 changed the title Split off a libnixstorepure Split off a libnix-store-pure Jan 15, 2025
@Ericson2314 Ericson2314 changed the title Split off a libnix-store-pure Split off a nix-store-pure Jan 15, 2025
@roberth roberth added the portability Supporting more platforms label Jan 15, 2025
@Ericson2314
Copy link
Member Author

CC

  • @qknight for making https://nixcloud.io/tour
  • @tomberek for also being involved in the enscripten build
  • @puffnfresh because I think this is also an opportunity for making sure we get the SourceAccess and CanonPath usage right.
    • We have the option of simulating a single-root Unix-style file system or a multi-root Windows-style files system in the browser :)

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-01-15-nix-team-meeting-minutes-208/58993/1

@tomberek
Copy link
Contributor

Another really dirty example of an emscripten build: https://github.com/flox/nix/tree/wasm

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-01-22-nix-team-meeting-minutes-210/59239/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
portability Supporting more platforms
Projects
None yet
Development

No branches or pull requests

4 participants