TVL depot development (mail to depot@tvl.su)
 help / color / mirror / code / Atom feed
From: Florian Klink <flokli@flokli•de>
To: Vincent Ambo <tazjin@tvl.su>
Cc: depot@tvl.su
Subject: Re: Tvix code structure
Date: Tue, 31 Jan 2023 12:11:03 +0100	[thread overview]
Message-ID: <20230131111103.pklvcew7qshoktn7@tp> (raw)
In-Reply-To: <20230131110117.eyoxvnged7szek2e@tp>

>>My current thinking is that what we actually want is something like this:
>>
>>* //tvix/eval: as above
>>* //tvix/serde: as above
>>* //tvix/nix-compat: types and logic related to compatibility with 
>>C++ Nix: NARs, derivations, store paths and so on.
>>* //tvix/store: store backend (!) implementation
>>* //tvix/cli: REPL and CLI interface tying the above together
>>
>>This would involve merging the nar and derivation crates, and moving 
>>the store path logic in there, too, to create the nix-compat crate.
>
>>
>>Doing this would also allow us to have a clear boundary where it's 
>>visible what is legacy from C++ Nix, and show where we have the 
>>ability to come up with substitute concepts (or decide that that is 
>>not necessary).
>
>Even with different concepts for calculating output paths, I'd still
>assume our store paths will probably look very similar, and we might
>need to end up keeping other functionality too.
>
>I'd be more in favor of keeping `derivation` and `nar` a separate crate
>for now. I'll send a CL splitting out `StorePath` from `//tvix/store`,
>that should solve the immediate concerns w.r.t. things pulled into eval
>directly.
>
>We can make sure we split things up further once we get to actually
>talking to the store from nix-compat or cli (as a client).

Alright, I tried this, but obviously nixbase32 is a dependency on
StorePath.

Let's put both these things in `nix-compat`, but let's make sure this
stays a library-only crate. Having CLI entrypoints there would be
confusing.

I'll leave a potential move of `//tvix/derivation` and `//tvix/nar` to
there as a followup, I need to think a bit more about the ergonomics.

      reply	other threads:[~2023-01-31 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30  7:27 Vincent Ambo
2023-01-31 11:01 ` Florian Klink
2023-01-31 11:11   ` Florian Klink [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230131111103.pklvcew7qshoktn7@tp \
    --to=flokli@flokli$(echo .)de \
    --cc=depot@tvl.su \
    --cc=tazjin@tvl.su \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://code.tvl.fyi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).