diff options
author | Profpatsch <mail@profpatsch.de> | 2021-12-28T13·29+0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2022-01-06T15·38+0000 |
commit | 7c92b07efd6d3a183c2b6970102647fea08fc49a (patch) | |
tree | 0b15804d2022e57e9e179be7e6d98817f6520437 /tvix | |
parent | 9f0671edc9e26b145d0f694e07c44718cbb5b389 (diff) |
feat(tvix): set up cargo rust project r/3521
First steps for baba Change-Id: Id6a68c5630cb85f280f4dcc7b2acf10c02454fd6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4732 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/.envrc | 10 | ||||
-rw-r--r-- | tvix/.gitignore | 3 | ||||
-rw-r--r-- | tvix/.vscode/extensions.json | 8 | ||||
-rw-r--r-- | tvix/Cargo.lock | 7 | ||||
-rw-r--r-- | tvix/Cargo.toml | 10 | ||||
-rw-r--r-- | tvix/default.nix | 2 | ||||
-rw-r--r-- | tvix/shell.nix | 10 | ||||
-rw-r--r-- | tvix/src/bin/nix-store.rs | 3 | ||||
-rw-r--r-- | tvix/src/main.rs | 3 |
9 files changed, 56 insertions, 0 deletions
diff --git a/tvix/.envrc b/tvix/.envrc new file mode 100644 index 000000000000..ea1ec94e436c --- /dev/null +++ b/tvix/.envrc @@ -0,0 +1,10 @@ +source_env ../.envrc + +if type lorri &>/dev/null; then + echo "direnv: using lorri from PATH ($(type -p lorri))" + eval "$(lorri direnv)" +else + # fall back to using direnv's builtin nix support + # to prevent bootstrapping problems. + use nix +fi diff --git a/tvix/.gitignore b/tvix/.gitignore new file mode 100644 index 000000000000..f807dfa42c0e --- /dev/null +++ b/tvix/.gitignore @@ -0,0 +1,3 @@ +/target +/result-* +/result diff --git a/tvix/.vscode/extensions.json b/tvix/.vscode/extensions.json new file mode 100644 index 000000000000..dd7012c107b5 --- /dev/null +++ b/tvix/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "matklad.rust-analyzer" + ], + "unwantedRecommendations": [ + "rust-lang.rust" + ] +} diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock new file mode 100644 index 000000000000..75581ea7d9f1 --- /dev/null +++ b/tvix/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "tvix" +version = "0.1.0" diff --git a/tvix/Cargo.toml b/tvix/Cargo.toml new file mode 100644 index 000000000000..2a59a77eaff5 --- /dev/null +++ b/tvix/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "tvix" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + + +[[bin]] +name = "nix-store" diff --git a/tvix/default.nix b/tvix/default.nix new file mode 100644 index 000000000000..82cd87cda452 --- /dev/null +++ b/tvix/default.nix @@ -0,0 +1,2 @@ +{...}: +{} diff --git a/tvix/shell.nix b/tvix/shell.nix new file mode 100644 index 000000000000..600d96d76d28 --- /dev/null +++ b/tvix/shell.nix @@ -0,0 +1,10 @@ +let + depot = (import ./.. {}); + pkgs = depot.third_party.nixpkgs; + +in pkgs.mkShell { + buildInputs = [ + pkgs.rustup + pkgs.rust-analyzer + ]; +} diff --git a/tvix/src/bin/nix-store.rs b/tvix/src/bin/nix-store.rs new file mode 100644 index 000000000000..7bf5442cb9ed --- /dev/null +++ b/tvix/src/bin/nix-store.rs @@ -0,0 +1,3 @@ +fn main () { + println!("hello, nix"); +} diff --git a/tvix/src/main.rs b/tvix/src/main.rs new file mode 100644 index 000000000000..40086e6f27ee --- /dev/null +++ b/tvix/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, tvix!"); +} |