Skip to content

Commit

Permalink
Use git submodule (boncheolgu#20)
Browse files Browse the repository at this point in the history
* Adding submodules so downloads aren't required, which will speed up build times and get builds working on docs.rs

* Committing downloads. Removing custom make files.

* Adding a note about how to update downloads in CONTRIBUTING.md

* Undo formatting changes to src

* Make bart dependencies optional. Rustfmt build.rs. Make debug_tflite feature more portable

* Downgraded tensorflow to correct commit. Now it compiles.

* Fixing flatbuffers.h for compilation

* Fix build failure with generate_model_apis

* Changing to submodule

* Changed to submodule for downloads

* Fixing update-downloads to respect downloads submodule
  • Loading branch information
tylerhawkes authored and boncheolgu committed Nov 13, 2019
1 parent ccdc351 commit 7f759f7
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 195 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "submodules/tensorflow"]
path = submodules/tensorflow
url = https://github.com/tensorflow/tensorflow.git
[submodule "submodules/downloads"]
path = submodules/downloads
url = https://github.com/tylerhawkes/tflite-rs-downloads
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tflite now includes the tensorflow git repository as a submodule
along with the results of calling `download_dependencies.sh`.
This reduces the number of build steps from ~260 to less than 100.
If the version of tensorflow is ever updated, `submodules/update-downloads.sh`
should also be updated if necessary and called. It removes most of the
files that are obviously not necessary since they all get committed.
26 changes: 9 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
name = "tflite"
version = "0.6.3"
authors = ["Boncheol Gu <boncheol.gu@gmail.com>"]

description = "Rust bindings for TensorFlow Lite"
keywords = ["tensorflow", "tflite", "bindings"]
license = "MIT/Apache-2.0"
repository = "https://github.com/boncheolgu/tflite-rs"
readme = "README.md"
edition = "2018"
documentation = "https://docs.rs/crate/tflite"

[dependencies]
cpp = "0.5"
Expand All @@ -17,27 +17,19 @@ libc = "0.2"
maybe-owned = "0.3"

[build-dependencies]
bart = "0.1"
bart_derive = "0.1"
bindgen = "0.50"
bart = { version = "0.1", optional = true }
bart_derive = { version = "0.1", optional = true }
bindgen = "0.51"
cpp_build = "0.5"
curl = "0.4"
failure = "0.1"
flate2 = "1.0"
heck = "0.3"
hex = "0.3"
num_cpus = "1.10"
reqwest = "0.9"
sha2 = "0.8"
tar = "0.4"
fs_extra = { version = "1.1", optional = true }

[features]
debug_tflite = [] # use "libtensorflow-lite.a" built in debug mode
build_doc = []
generate_model_apis = []
build = ["fs_extra"]
default = ["build"]
debug_tflite = ["build"] # use "libtensorflow-lite.a" built in debug mode
generate_model_apis = ["bart", "bart_derive"]

[package.metadata.docs.rs]
features = ["build_doc"]
all-features = false
no-default-features = true
default-target = "x86_64-unknown-linux-gnu"
Loading

0 comments on commit 7f759f7

Please sign in to comment.