feat(tvix): set up cargo rust project
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>
This commit is contained in:
parent
9f0671edc9
commit
7c92b07efd
9 changed files with 56 additions and 0 deletions
10
tvix/.envrc
Normal file
10
tvix/.envrc
Normal file
|
@ -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
|
3
tvix/.gitignore
vendored
Normal file
3
tvix/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/target
|
||||||
|
/result-*
|
||||||
|
/result
|
8
tvix/.vscode/extensions.json
vendored
Normal file
8
tvix/.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"matklad.rust-analyzer"
|
||||||
|
],
|
||||||
|
"unwantedRecommendations": [
|
||||||
|
"rust-lang.rust"
|
||||||
|
]
|
||||||
|
}
|
7
tvix/Cargo.lock
generated
Normal file
7
tvix/Cargo.lock
generated
Normal file
|
@ -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"
|
10
tvix/Cargo.toml
Normal file
10
tvix/Cargo.toml
Normal file
|
@ -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"
|
2
tvix/default.nix
Normal file
2
tvix/default.nix
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{...}:
|
||||||
|
{}
|
10
tvix/shell.nix
Normal file
10
tvix/shell.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
let
|
||||||
|
depot = (import ./.. {});
|
||||||
|
pkgs = depot.third_party.nixpkgs;
|
||||||
|
|
||||||
|
in pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.rustup
|
||||||
|
pkgs.rust-analyzer
|
||||||
|
];
|
||||||
|
}
|
3
tvix/src/bin/nix-store.rs
Normal file
3
tvix/src/bin/nix-store.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main () {
|
||||||
|
println!("hello, nix");
|
||||||
|
}
|
3
tvix/src/main.rs
Normal file
3
tvix/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, tvix!");
|
||||||
|
}
|
Loading…
Reference in a new issue