diff options
author | toastal <toastal@posteo.net> | 2024-06-25T11·28+0700 |
---|---|---|
committer | toastal <toastal@posteo.net> | 2024-06-27T07·16+0000 |
commit | ade078141612fb98cf7b93fc2dbcda640610d940 (patch) | |
tree | 34f2daf1af3118cce49c8bf8016889f23e4507f3 /tvix/docs/src/getting-started.md | |
parent | fbce56b8494998868b3fd841b1d43c2e272603c2 (diff) |
docs(tvix): create Welcome + Contributing sections r/8317
A lot of this content needs to be duplicated from the monorepo’s root directory. However, some of the content was not relevant or could have been more condensed in descriptions or split up for consumption that also matched the styles of some other library documentation I had been looking at for examples. I wanted to add the new access to Admonish callouts but also aimed at the readablitiy in one’s text editor for the user that needs to `cat` the docs. In the future, a “Introduction” page would be nice to add to “Welcome”, but I don’t think that is as clear. Change-Id: Ibfc169c5fc3501d7eeb9a76423c6f64cd68897aa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11869 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/docs/src/getting-started.md')
-rw-r--r-- | tvix/docs/src/getting-started.md | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tvix/docs/src/getting-started.md b/tvix/docs/src/getting-started.md new file mode 100644 index 000000000000..1cbb6de7d4f7 --- /dev/null +++ b/tvix/docs/src/getting-started.md @@ -0,0 +1,59 @@ +# Getting Started + +## Getting the code, a developer shell, & building the CLI + +Tvix can be built with the Rust standard `cargo build`. A Nix shell is provided +with the correctly-versioned tooling to build. + +### TVL monorepo + +```console +$ git clone https://code.tvl.fyi/depot.git +$ cd depot +``` + +[Direnv][] is highly recommended in order to enable [`mg`][mg], a tool for +workflows in monorepos. Follow the [Direnv installation +instructions][direnv-inst], then after it’s set up continue with: + +```console +$ direnv allow +$ mg shell //tvix:shell +$ cd tvix +$ cargo build +``` + +### Or just Tvix + +At present, this option isn’t suitable for contributions & lacks the tooling of +the monorepo, but still provides a `shell.nix` which can be used for building +the Tvix project. + +```console +$ git clone https://code.tvl.fyi/depot.git:workspace=views/tvix.git +$ cd tvix +$ nix-shell +$ cargo build +``` + + +# Builds & tests + +All projects are built using [Nix][] to avoid ‘build pollution’ via the user’s +local environment. + +If you have Nix installed and are contributing to a project tracked in this +repository, you can usually build the project by calling `nix-build -A +path.to.project`. + +For example, to build a project located at `//tools/foo` you would call +`nix-build -A tools.foo` + +If the project has tests, check that they still work before submitting your +change. + + +[Direnv]: https://direnv.net +[direnv-inst]: https://direnv.net/docs/installation.html +[Nix]: https://nixos.org/nix/ +[mg]: https://code.tvl.fyi/tree/tools/magrathea |