build: vendor Rust crate dependencies

This commit is contained in:
2026-08-31 18:38:07 -04:00
parent 97cca46f4e
commit b20e9c90ce
70 changed files with 7920 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ rust_library(
name = "machoke_lib",
crate_name = "machoke",
srcs = ["lib.rs"],
deps = ["//third_party/crates:anyhow"],
)
rust_binary(

View File

@@ -1,7 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "machoke"
version = "0.1.0"

View File

@@ -11,3 +11,4 @@ name = "machoke"
path = "main.rs"
[dependencies]
anyhow = "1"

View File

@@ -1,3 +1,5 @@
pub fn greeting() -> &'static str {
"Hello from machoke"
use anyhow::Result;
pub fn greeting() -> Result<&'static str> {
Ok("Hello from machoke")
}

View File

@@ -1,3 +1,6 @@
fn main() {
println!("{}", machoke::greeting());
println!(
"{}",
machoke::greeting().expect("greeting should be available")
);
}