]> git.puffer.fish Git - matthieu/nova.git/commitdiff
fix stuff
authorMatthieu <matthieu@developershouse.xyz>
Sat, 4 Sep 2021 20:14:20 +0000 (00:14 +0400)
committerMatthieu <matthieu@developershouse.xyz>
Sat, 4 Sep 2021 20:14:20 +0000 (00:14 +0400)
.bazelrc [new file with mode: 0644]
.gitignore
WORKSPACE
ratelimiter/BUILD
ratelimiter/build.rs
third_party/libsodium

diff --git a/.bazelrc b/.bazelrc
new file mode 100644 (file)
index 0000000..2065358
--- /dev/null
+++ b/.bazelrc
@@ -0,0 +1,2 @@
+startup --windows_enable_symlinks
+build --enable_runfiles
\ No newline at end of file
index 72bc1f7a5b48f0e5491b4795f960b75a799aaa9a..74f74d69392f25a346b1568d76127d02723aa526 100644 (file)
@@ -1,5 +1,4 @@
 bazel-*
-.bazelrc
 .vscode
 ratelimiter/target
 target/
\ No newline at end of file
index 23bf727048c5346fcdde394979f4d8ef9990f1b2..53b217fac8f8256e3496972a103f1b00ef69c224 100644 (file)
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -30,6 +30,7 @@ http_archive(
     ],
 )
 
+
 # Used to generate the protobuf files for go
 http_archive(
     name = "com_google_protobuf",
@@ -91,9 +92,8 @@ crate_universe(
         ),
         "libsodium-sys": crate.override(
             extra_build_script_env_vars = {
-                "PATH": "/usr/sbin:/usr/bin:/sbin:/bin",
-                "NUM_JOBS": "2",
-            },
+                "NUM_JOBS": "2"
+            }
         ),
     },
     resolver_download_url_template = DEFAULT_URL_TEMPLATE,
index a168c7935f8c5590fdbee5060a02d9e03ea0407e..85cfc968ccfa8b25000eedc75399d77f6a3d914f 100644 (file)
@@ -10,6 +10,7 @@ cargo_build_script(
     srcs = ["build.rs"],
     build_script_env = {
         "PROTOC": "$(location @com_google_protobuf//:protoc)",
+        "PROTO": "$(location //ratelimiter/proto:nova.ratelimit.v1.proto)"
     },
     data = [
         "//ratelimiter/proto:nova.ratelimit.v1.proto",
index a1cee90320a7a266495813c481492eff46365d6f..9e8acaea5955d50132bd2fc5ba9f78fc2af14c28 100644 (file)
@@ -1,4 +1,12 @@
+use std::{env, fs};
+
 fn main() -> Result<(), Box<dyn std::error::Error>> {
-    tonic_build::compile_protos("proto/nova.ratelimit.v1.proto").unwrap();
+    let paths = fs::read_dir("./").unwrap();
+    let path = env::var("PROTO").unwrap();
+
+    for path in paths {
+        println!("Name: {}", path.unwrap().path().display())
+    }
+    tonic_build::compile_protos(path).unwrap();
     Ok(())
 }
\ No newline at end of file
index fe1d6d11aabcbd191abd3b8df99abf18a726c036..a016aea61214668827e18c6278ac25b0bbc98ca5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit fe1d6d11aabcbd191abd3b8df99abf18a726c036
+Subproject commit a016aea61214668827e18c6278ac25b0bbc98ca5