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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ updates:
directories:
- /
- examples/envoy_filter_metadata
- examples/envoy_tcp_routing
- examples/grpc_auth_random
- examples/hello_world
- examples/http_auth_random
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,6 @@ jobs:
rustup toolchain install stable --component clippy --component rustfmt
rustup target add wasm32-wasip1

- name: Install protobuf compiler
if: matrix.example == 'envoy_tcp_routing'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Clean generated files
if: matrix.example == 'envoy_tcp_routing'
run: |
rm -rf src/generated

- name: Build (wasm32-wasip1)
run: cargo build --release --target=wasm32-wasip1

Expand Down Expand Up @@ -541,17 +530,6 @@ jobs:
rustup default nightly
rustup target add wasm32-wasip1

- name: Install protobuf compiler
if: matrix.example == 'envoy_tcp_routing'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Clean generated files
if: matrix.example == 'envoy_tcp_routing'
run: |
rm -rf src/generated

- name: Change crate type from library to binary
run: |
grep -v '^\[lib\]' Cargo.toml > Cargo.tmp
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/bazel-*
target
Cargo.lock
# Generated protobuf code
examples/envoy_tcp_routing/src/generated/
2 changes: 0 additions & 2 deletions examples/envoy_tcp_routing/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions examples/envoy_tcp_routing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ prost = "0.14"

[build-dependencies]
prost-build = "0.14"
proc-macro2 = "1.0"

protox = "0.9"
10 changes: 2 additions & 8 deletions examples/envoy_tcp_routing/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::fs;

fn main() {
println!("cargo:rerun-if-changed=src/set_envoy_filter_state.proto");
let out_dir = "src/generated";
fs::create_dir_all(out_dir).unwrap();
prost_build::Config::new()
.out_dir(out_dir)
.compile_protos(&["src/set_envoy_filter_state.proto"], &["src/"])
.unwrap();
let fds = protox::compile(["src/set_envoy_filter_state.proto"], ["src/"]).unwrap();
prost_build::compile_fds(fds).unwrap();
}
5 changes: 4 additions & 1 deletion examples/envoy_tcp_routing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ use set_envoy_filter_state::{LifeSpan, SetEnvoyFilterStateArguments};

// Include the generated protobuf code
pub mod set_envoy_filter_state {
include!("generated/envoy.source.extensions.common.wasm.rs");
include!(concat!(
env!("OUT_DIR"),
"/envoy.source.extensions.common.wasm.rs"
));
}

proxy_wasm::main! {{
Expand Down
Loading