3 ms·
For somebody who hasn't used Nix yet, but heard good things about it, why use Tvix instead of Nix? The page didn't seem to mention the reason(s) behind the proj
by Izmaki 3y ago
For somebody who hasn't used Nix yet, but heard good things about it, why use Tvix instead of Nix? The page didn't seem to mention the reason(s) behind the project.
- tmountain 3y agoIt looks like they’ve factored out the main features of Nix into modules to allow for more flexibility regarding the implementation details of each underlying service.
- RaitoBezarius 3y agoNot ready, so not a good reason to use it yet.
- aidenn0 3y agoI would recommend against using Tvix at this time, but if you are wondering why they wrote it, they wrote an article: https://tvl.fyi/blog/rewriting-nix https://tvl.fyi/blog/rewriting-nix The goals they list are: > Creating an alternative implementation of Nix that is fully compatible with nixpkgs. No explanation needed. > More efficient Nix language evaluation, leading to greatly increased performance. The Nix language is evaluated whenever doing the Nix equivalent of installing a package, or rebuilding your configuration. Note that most of the time it's "fast enough" but the authors of Tvix are doing more with the Nix language (which leads into) > No more strict separation of evaluation and build phases: Generating Nix data structures from build artefacts ("IFD") should be supported first-class and not incur significant performance cost. and > Well-defined interaction protocols for how the three different components (evaluator, builder, store) interact. As it currently works, the Nix language is evaluated to something called a derivation, which is a specific format for defining how to build something (including a list of dependencies). The derivation is then used to actually build the artifact. This is about when you want the metaphorical snake to eat its tail and have the results of a derivation be more nix language to evaluate. > A builder implementation using OCI instead of custom sandboxing code. Hermetic builds require some sandboxing; Using OCI containers seems like an obvious choice, but didn't exist when Nix was first created.
- thomastjeffery 3y ago> us evakyated huh?
- michaeljsmith 3y agopresumably meant to be 'is evaluated'.
- dietr1ch 3y ago"evaluated", but with a small key shift on qwerty
- thomastjeffery 3y agoOh, I see. I was having a hard time with that one. Thanks!
- aidenn0 3y agotypo, fixed.
- otabdeveloper4 3y ago> A builder implementation using OCI instead of custom sandboxing code. A complete non-starter, never in a thousand years am I gonna use something that requires a Docker installation for building derivations.
- sshine 3y agoPodman is also an option.
- otabdeveloper4 3y agoNo, I don't want "dollar store Docker" either.
- tazjin 3y agoMaybe once you learn what OCI is, you'll rethink that ;)