Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"crates/spk-config",
"crates/spk-exec",
"crates/spk-launcher",
"crates/spk-proto",
"crates/spk-schema",
"crates/spk-schema/crates/*",
"crates/spk-solve",
Expand Down Expand Up @@ -63,6 +64,7 @@ dyn-clone = "1.0"
enum_dispatch = "0.3.13"
featurecomb = "0.1.3"
flatbuffers = "25.2"
flatc-rust = "0.2"
format_serde_error = { version = "0.3", default-features = false }
fuser = "0.16.0"
futures = "0.3.28"
Expand Down Expand Up @@ -136,6 +138,7 @@ spk-cmd-repo = { path = "crates/spk-cli/cmd-repo" }
spk-cmd-test = { path = "crates/spk-cli/cmd-test" }
spk-config = { path = "crates/spk-config" }
spk-exec = { path = "crates/spk-exec" }
spk-proto = { path = "crates/spk-proto" }
spk-schema = { path = "crates/spk-schema" }
spk-schema-foundation = { path = "crates/spk-schema/crates/foundation" }
spk-schema-tera = { path = "crates/spk-schema/crates/tera" }
Expand Down
2 changes: 1 addition & 1 deletion crates/spfs-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde = { workspace = true, optional = true }
thiserror = { workspace = true }

[build-dependencies]
flatc-rust = "0.2"
flatc-rust = { workspace = true }

[dev-dependencies]
ring = { workspace = true }
Expand Down
31 changes: 31 additions & 0 deletions crates/spk-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
authors = { workspace = true }
edition = { workspace = true }
name = "spk-proto"
version = { workspace = true }
license-file = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
readme = { workspace = true }
description = { workspace = true }

[lints]
workspace = true

[features]
serde = ["dep:serde"]

[dependencies]
data-encoding = { workspace = true }
flatbuffers = { workspace = true }
futures = { workspace = true }
miette = { workspace = true }
serde = { workspace = true, optional = true }
thiserror = { workspace = true }

[build-dependencies]
flatc-rust = { workspace = true }

[dev-dependencies]
ring = { workspace = true }
rstest = { workspace = true }
31 changes: 31 additions & 0 deletions crates/spk-proto/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Contributors to the SPK project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/spkenv/spk

use std::env;
use std::path::{Path, PathBuf};

fn main() {
println!("cargo:rerun-if-changed=schema/spk.fbs");

let cmd = match std::env::var_os("FLATC") {
Some(exe) => flatc_rust::Flatc::from_path(exe),
None => flatc_rust::Flatc::from_env_path(),
};

let out_dir = env::var("OUT_DIR").unwrap();

cmd.run(flatc_rust::Args {
lang: "rust",
inputs: &[Path::new("schema/spk.fbs")],
out_dir: &PathBuf::from(&out_dir),
..Default::default()
})
.expect("schema compiler command");

let generated_file = PathBuf::from(out_dir).join("spk_generated.rs");
println!(
"cargo:rerun-if-changed=schema/spk.fbs generated file: {}",
generated_file.display()
);
}
Loading
Loading