Skip to content

Commit

Permalink
option to use already-existing generated files for flatbuffers and ca…
Browse files Browse the repository at this point in the history
…pnp (#63)
  • Loading branch information
mumbleskates authored Mar 16, 2024
1 parent 59eb2b2 commit 714b5f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ savefile = ["dep:savefile", "savefile-derive"]

scale = ["parity-scale-codec", "parity-scale-codec-derive"]

# Enable these to use the already-committed generated files for capnp and
# flatbuffers rather than regenerating them.
use-committed-capnp = []
use-committed-flatbuffers = []

[dev-dependencies]
rand_pcg = "0.3.1"

Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ fn main() {
const DATASETS: &[&str] = &["log", "mesh", "minecraft_savedata", "mk48"];
for &name in DATASETS.iter() {
// bebop_compile_dataset(name);
#[cfg(all(feature = "capnp", not(feature = "use-committed-capnp")))]
capnpc_compile_dataset(name).unwrap();
#[cfg(all(feature = "flatbuffers", not(feature = "use-committed-flatbuffers")))]
flatc_compile_dataset(name).unwrap();
#[cfg(feature = "prost-build")]
prost_compile_dataset(name).unwrap();
Expand Down

0 comments on commit 714b5f8

Please sign in to comment.