chore(*): drop everything that is not required for Tvix
Co-Authored-By: edef <edef@edef.eu> Co-Authored-By: Ryan Lahfa <raito@lix.systems> Change-Id: I9817214c3122e49d694c5e41818622a08d9dfe45
This commit is contained in:
parent
bd91cac1f3
commit
df4500ea2b
2905 changed files with 34 additions and 493328 deletions
133
tvix/README.md
133
tvix/README.md
|
|
@ -1,133 +0,0 @@
|
|||
<div align="center">
|
||||
<img src="https://tvix.dev/logo.webp">
|
||||
</div>
|
||||
|
||||
-----------------
|
||||
|
||||
Tvix is a new implementation of the Nix language and package manager. See the
|
||||
[announcement post][post-1] for information about the background of this
|
||||
project.
|
||||
|
||||
Tvix is developed by [TVL][tvl] in our monorepo, the `depot`, at
|
||||
[//tvix][tvix-src]. Code reviews take place on [Gerrit][tvix-gerrit], bugs are
|
||||
filed in [our issue tracker][b].
|
||||
|
||||
For more information about Tvix, feel free to reach out. We are interested in
|
||||
people who would like to help us review designs, brainstorm and describe
|
||||
requirements that we may not yet have considered.
|
||||
|
||||
Development discussion is focused around two IRC channels, which are also
|
||||
available [via XMPP][hackint-xmpp] and [via Matrix][hackint-matrix].
|
||||
|
||||
1. TVL runs the [`#tvl` channel][tvl-getting-in-touch] on [hackint][].
|
||||
Tvix-related discussion in this channel is focused on eval, and on (almost)
|
||||
1:1 replacements of C++ Nix with Rust components.
|
||||
|
||||
2. The separate [`#tvix-dev`][tvix-dev-irc] channel ([on
|
||||
Matrix][tvix-dev-matrix]) focuses on the content-addressed store model,
|
||||
innovating on the plain files approach used in C++ Nix.
|
||||
|
||||
There is also a low-traffic [mailing list][] with occasional design discussions.
|
||||
|
||||
Contributions to Tvix follow the TVL [review flow][review-docs] and
|
||||
[contribution guidelines][contributing].
|
||||
|
||||
[post-1]: https://tvl.fyi/blog/rewriting-nix
|
||||
[tvl]: https://tvl.fyi
|
||||
[tvix-src]: https://code.tvl.fyi/tree/tvix/
|
||||
[tvix-gerrit]: https://cl.tvl.fyi/q/path:%255Etvix.*
|
||||
[b]: https://b.tvl.fyi
|
||||
[tvl-getting-in-touch]: https://tvl.fyi/#getting-in-touch
|
||||
[mailing list]: https://inbox.tvl.su
|
||||
[review-docs]: https://code.tvl.fyi/about/docs/REVIEWS.md
|
||||
[contributing]: https://code.tvl.fyi/about/docs/CONTRIBUTING.md
|
||||
[tvix-dev-irc]: ircs://irc.hackint.org:6697/#tvix-dev
|
||||
[hackint]: https://hackint.org/
|
||||
[hackint-xmpp]: https://hackint.org/transport/xmpp
|
||||
[tvix-dev-xmpp]: xmpp:#tvix-dev@irc.hackint.org?join
|
||||
[hackint-matrix]: https://hackint.org/transport/matrix
|
||||
[tvix-dev-matrix]: https://matrix.to/#/#tvix-dev:hackint.org
|
||||
[tvix-dev-webchat]: https://webirc.hackint.org/#ircs://irc.hackint.org/#tvix-dev
|
||||
|
||||
WARNING: Tvix is not ready for use in production. None of our current APIs
|
||||
should be considered stable in any way.
|
||||
|
||||
WARNING: Any other instances of this project or repository are
|
||||
[`josh`-mirrors][josh]. We do not accept code contributions or issues outside of
|
||||
the methods outlined above.
|
||||
|
||||
[josh]: https://github.com/josh-project/josh
|
||||
|
||||
## Components
|
||||
|
||||
This folder contains the following components:
|
||||
|
||||
* `//tvix/boot` - tooling to boot MicroVMs off of `tvix-[ca]store`
|
||||
* `//tvix/build` - a generic (Nix-unaware) builder protocol and various implementations
|
||||
* `//tvix/castore` - subtree storage/transfer in a content-addressed fashion
|
||||
* `//tvix/cli` - preliminary REPL & CLI implementation for Tvix
|
||||
* `//tvix/docs` - standalone documentation
|
||||
* `//tvix/eval` - an implementation of the Nix programming language
|
||||
* `//tvix/glue` - combines tvix-eval with tvix-[ca]store and tvix-build, implementation of build- and import-related builtins
|
||||
* `//tvix/nar-bridge` - a HTTP webserver providing a Nix HTTP Binary Cache interface in front of a tvix-store
|
||||
* `//tvix/nix-compat` - a Rust library for compatibility with C++ Nix, features like encodings and hashing schemes and formats
|
||||
* `//tvix/nix-daemon` - a Nix-compatible store daemon backed by Tvix
|
||||
* `//tvix/serde` - a Rust library for using the Nix language for app configuration
|
||||
* `//tvix/store` - a "filesystem" linking Nix store paths and metadata with the content-addressed layer
|
||||
* `//tvix/tracing` - unified library to configure logging, tracing, instrumentation and progress concerns
|
||||
|
||||
Some additional folders with auxiliary things exist and can be explored at your
|
||||
leisure.
|
||||
|
||||
## Building the CLI
|
||||
|
||||
The CLI can also be built with standard Rust tooling (i.e. `cargo build`),
|
||||
as long as you are in a shell with the right dependencies.
|
||||
|
||||
- If you cloned the full monorepo, it can be provided by
|
||||
`mg shell //tvix:shell`.
|
||||
- If you cloned the `tvix` workspace only
|
||||
(`git clone https://code.tvl.fyi/depot.git:workspace=views/tvix.git`),
|
||||
`nix-shell` provides it.
|
||||
|
||||
If you're in the TVL monorepo, you can also run `mg build //tvix/cli`
|
||||
(or `mg build` from inside that folder) for a more incremental build.
|
||||
|
||||
Please follow the depot-wide instructions on how to get `mg` and use the depot
|
||||
tooling.
|
||||
|
||||
### Compatibility
|
||||
**Important note:** We only use and test Nix builds of our software
|
||||
against Nix 2.3. There are a variety of bugs and subtle problems in
|
||||
newer Nix versions which we do not have the bandwidth to address,
|
||||
builds in newer Nix versions may or may not work.
|
||||
|
||||
## Rust projects, crate2nix
|
||||
|
||||
Some parts of Tvix are written in Rust. To simplify the dependency
|
||||
management on the Nix side of these builds, we use `crate2nix` in a
|
||||
single Rust workspace in `//tvix` to maintain the Nix build
|
||||
configuration.
|
||||
|
||||
When making changes to Cargo dependency configuration in any of the
|
||||
Rust projects under `//tvix`, be sure to run
|
||||
`mg run //tools:crate2nix-generate` in `//tvix` itself and commit the changes
|
||||
to the generated `Cargo.nix` file. This only applies to the full TVL checkout.
|
||||
|
||||
When adding/removing a Cargo feature for a crate, you will want to add it to the
|
||||
features power set that gets tested in CI. For each crate there's a default.nix with a
|
||||
`mkFeaturePowerset` invocation, modify the list to include/remove the feature.
|
||||
Note that you don't want to add "collection" features, such as `fs` for tvix-[ca]store or `default`.
|
||||
|
||||
## License structure
|
||||
|
||||
All code implemented for Tvix is licensed under the GPL-3.0, with the
|
||||
exception of the protocol buffer definitions used for communication
|
||||
between services which are available under a more permissive license
|
||||
(MIT).
|
||||
|
||||
The idea behind this structure is that any direct usage of our code
|
||||
(e.g. linking to it, embedding the evaluator, etc.) will fall under
|
||||
the terms of the GPL3, but users are free to implement their own
|
||||
components speaking these protocols under the terms of the MIT
|
||||
license.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# Build pipeline for the filtered //views/tvix workspace of depot. This
|
||||
# pipeline is triggered by each build of canon.
|
||||
#
|
||||
# Pipeline status is visible on https://buildkite.com/tvl/tvix
|
||||
|
||||
steps:
|
||||
- label: ":crab: cargo build"
|
||||
command: |
|
||||
nix-shell --run "cargo build && cargo test"
|
||||
timeout_in_minutes: 10
|
||||
|
|
@ -5,7 +5,8 @@
|
|||
runTests = true;
|
||||
|
||||
# Make C++ Nix available, to compare eval results against.
|
||||
testInputs = [ pkgs.nix ];
|
||||
# This needs Nix 2.3, as nix_oracle.rs fails with pkgs.nix
|
||||
testInputs = [ pkgs.nix_2_3 ];
|
||||
}).overrideAttrs (old: rec {
|
||||
meta.ci.targets = lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru);
|
||||
passthru = old.passthru // (depot.tvix.utils.mkFeaturePowerset {
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash ../.. -A tvix.shell
|
||||
|
||||
# Benchmark script that runs inside the Windtunnel build agent
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Running benchmarks for tvix..."
|
||||
pushd "$(dirname "$(dirname "$0")")"
|
||||
cargo bench
|
||||
windtunnel-cli report -f criterion-rust .
|
||||
popd
|
||||
|
||||
echo "Running tvix macrobenchmarks..."
|
||||
pushd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
depot_nixpkgs_path="$(nix eval --raw '("${((import ../third_party/sources {}).nixpkgs)}")')"
|
||||
pinned_nixpkgs_path="$(nix eval --raw '(builtins.fetchTarball {url = "https://github.com/NixOS/nixpkgs/archive/91050ea1e57e50388fa87a3302ba12d188ef723a.tar.gz"; sha256 = "1hf6cgaci1n186kkkjq106ryf8mmlq9vnwgfwh625wa8hfgdn4dm";})')"
|
||||
|
||||
cargo build --release --bin tvix
|
||||
hyperfine --export-json ./results.json \
|
||||
-n 'tvix-eval-depot-nixpkgs-hello' "target/release/tvix -E '(import ${depot_nixpkgs_path} {}).hello.outPath'" \
|
||||
-n 'tvix-eval-depot-nixpkgs-cross-hello' "target/release/tvix -E '(import ${depot_nixpkgs_path} {}).pkgsCross.aarch64-multiplatform.hello.outPath'" \
|
||||
-n 'tvix-eval-pinned-nixpkgs-hello' "target/release/tvix -E '(import ${pinned_nixpkgs_path} {}).hello.outPath'" \
|
||||
-n 'tvix-eval-pinned-nixpkgs-cross-hello' "target/release/tvix -E '(import ${pinned_nixpkgs_path} {}).pkgsCross.aarch64-multiplatform.hello.outPath'"
|
||||
windtunnel-cli report -f hyperfine-json ./results.json
|
||||
popd
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<img class="tvl-logo" src="./logo.webp"
|
||||
alt="A candy bar in different shades of blue that says 'Tvix by TVL' on it">
|
||||
|
||||
------------------
|
||||
|
||||
Tvix is a new implementation of Nix, a purely-functional package manager. It
|
||||
aims to have a modular implementation, in which different components can be
|
||||
reused or replaced based on the use-case.
|
||||
|
||||
Tvix is developed as a GPLv3-licensed open-source project by
|
||||
[TVL][], with source code available in the [TVL monorepo][].
|
||||
|
||||
There are several projects within Tvix, such as:
|
||||
|
||||
* `//tvix/castore` - subtree storage/transfer in a content-addressed fashion
|
||||
* `//tvix/cli` - preliminary REPL & CLI implementation for Tvix
|
||||
* `//tvix/eval` - an implementation of the Nix programming language
|
||||
* `//tvix/nar-bridge[-go]` - a HTTP webserver providing a Nix HTTP Binary Cache interface in front of a tvix-store
|
||||
* `//tvix/nix-compat` - a Rust library for compatibility with C++ Nix, features like encodings and hashing schemes and formats
|
||||
* `//tvix/serde` - a Rust library for using the Nix language for app configuration
|
||||
* `//tvix/store` - a "filesystem" linking Nix store paths and metadata with the content-addressed layer
|
||||
* ... and a handful others!
|
||||
|
||||
The language evaluator can be toyed with in [Tvixbolt][], and you can check out
|
||||
the [Tvix README][] ([GitHub mirror][gh]) for additional information on the
|
||||
project and development workflows.
|
||||
|
||||
Developer documentation for some parts of Tvix is [available online][docs].
|
||||
|
||||
[TVL]: https://tvl.fyi
|
||||
[TVL monorepo]: https://code.tvl.fyi/tree/tvix
|
||||
[Tvixbolt]: https://bolt.tvix.dev
|
||||
[Tvix README]: https://code.tvl.fyi/about/tvix
|
||||
[gh]: https://github.com/tvlfyi/tvix/
|
||||
[docs]: https://docs.tvix.dev
|
||||
|
||||
-------------------
|
||||
|
||||
Check out the latest Tvix-related blog posts from TVL's website:
|
||||
Loading…
Add table
Add a link
Reference in a new issue