Skip to content

Commit 9d02be2

Browse files
Merge branch 'main' into in-code-documentation
2 parents c11460b + 3f4274e commit 9d02be2

39 files changed

+1278
-223
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.2
1+
7.2.1

.github/workflows/rust.yml

Lines changed: 81 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ on:
1818

1919
pull_request:
2020
branches:
21-
- master
21+
- main
2222

2323
push:
2424
branches:
25-
- master
25+
- main
2626

2727
schedule:
2828
- cron: '0 0 * * *'
@@ -88,6 +88,55 @@ jobs:
8888
bazelisk --noworkspace_rc run --noenable_bzlmod //bazel/cargo:crates_vendor
8989
git diff --exit-code
9090
91+
msrv:
92+
runs-on: ubuntu-latest
93+
94+
env:
95+
RUSTFLAGS: -D warnings
96+
97+
steps:
98+
- uses: actions/checkout@v2
99+
100+
- name: Install dependencies
101+
if: ${{ env.ACT }}
102+
run: |
103+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
104+
chmod +x ./rustup-init.sh
105+
./rustup-init.sh -y --default-toolchain 1.64.0
106+
rm rustup-init.sh
107+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
108+
109+
- name: Update Rust
110+
run: |
111+
rustup toolchain install 1.64.0 --component clippy --component rustfmt
112+
rustup default 1.64.0
113+
rustup target add wasm32-unknown-unknown
114+
rustup target add wasm32-wasi
115+
116+
- name: Build (wasm32-unknown-unknown)
117+
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
118+
119+
- name: Clippy (wasm32-unknown-unknown)
120+
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
121+
122+
- name: Build (wasm32-wasi)
123+
run: cargo build --release --all-targets --target=wasm32-wasi
124+
125+
- name: Clippy (wasm32-wasi)
126+
run: cargo clippy --release --all-targets --target=wasm32-wasi
127+
128+
- name: Format (rustfmt)
129+
run: cargo fmt -- --check
130+
131+
- name: Format (manifest)
132+
run: cargo verify-project
133+
134+
- name: Package (docs)
135+
run: cargo doc --no-deps --target=wasm32-unknown-unknown
136+
137+
- name: Package (publish)
138+
run: cargo publish --dry-run --target=wasm32-unknown-unknown
139+
91140
stable:
92141
runs-on: ubuntu-latest
93142

@@ -100,10 +149,10 @@ jobs:
100149
- name: Install dependencies
101150
if: ${{ env.ACT }}
102151
run: |
103-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
104-
chmod +x ./rustup-init
105-
./rustup-init -y
106-
rm rustup-init
152+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
153+
chmod +x ./rustup-init.sh
154+
./rustup-init.sh -y --default-toolchain stable
155+
rm rustup-init.sh
107156
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
108157
109158
- name: Update Rust
@@ -148,18 +197,18 @@ jobs:
148197
- name: Install dependencies
149198
if: ${{ env.ACT }}
150199
run: |
151-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
152-
chmod +x ./rustup-init
153-
./rustup-init -y
154-
rm rustup-init
200+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
201+
chmod +x ./rustup-init.sh
202+
./rustup-init.sh -y --default-toolchain nightly
203+
rm rustup-init.sh
155204
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
156205
157206
- name: Update Rust
158207
run: |
159208
rustup toolchain install nightly --component clippy --component rustfmt
160-
rustup +nightly target add wasm32-unknown-unknown
161-
rustup +nightly target add wasm32-wasi
162209
rustup default nightly
210+
rustup target add wasm32-unknown-unknown
211+
rustup target add wasm32-wasi
163212
164213
- name: Build (wasm32-unknown-unknown)
165214
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
@@ -194,10 +243,10 @@ jobs:
194243
- name: Install dependencies
195244
if: ${{ env.ACT }}
196245
run: |
197-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
198-
chmod +x ./rustup-init
199-
./rustup-init -y
200-
rm rustup-init
246+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
247+
chmod +x ./rustup-init.sh
248+
./rustup-init.sh -y
249+
rm rustup-init.sh
201250
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
202251
export PATH=$PATH:$HOME/.cargo/bin
203252
cargo install cargo-outdated
@@ -214,10 +263,10 @@ jobs:
214263
- name: Install dependencies
215264
if: ${{ env.ACT }}
216265
run: |
217-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
218-
chmod +x ./rustup-init
219-
./rustup-init -y
220-
rm rustup-init
266+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
267+
chmod +x ./rustup-init.sh
268+
./rustup-init.sh -y
269+
rm rustup-init.sh
221270
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
222271
export PATH=$PATH:$HOME/.cargo/bin
223272
cargo install cargo-audit
@@ -238,6 +287,7 @@ jobs:
238287
- 'http_body'
239288
- 'http_config'
240289
- 'http_headers'
290+
- 'grpc_auth_random'
241291

242292
defaults:
243293
run:
@@ -252,10 +302,10 @@ jobs:
252302
- name: Install dependencies
253303
if: ${{ env.ACT }}
254304
run: |
255-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
256-
chmod +x ./rustup-init
257-
./rustup-init -y
258-
rm rustup-init
305+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
306+
chmod +x ./rustup-init.sh
307+
./rustup-init.sh -y
308+
rm rustup-init.sh
259309
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
260310
261311
- name: Update Rust
@@ -286,7 +336,7 @@ jobs:
286336
docker run --rm \
287337
-v $(pwd)/envoy.yaml:/envoy.yaml \
288338
-v $(pwd)/target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins \
289-
envoyproxy/envoy:v1.24-latest \
339+
envoyproxy/envoy:v1.31-latest \
290340
--mode validate \
291341
-c envoy.yaml
292342
@@ -301,6 +351,7 @@ jobs:
301351
- 'http_body'
302352
- 'http_config'
303353
- 'http_headers'
354+
- 'grpc_auth_random'
304355

305356
defaults:
306357
run:
@@ -315,10 +366,10 @@ jobs:
315366
- name: Install dependencies
316367
if: ${{ env.ACT }}
317368
run: |
318-
curl -OL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
319-
chmod +x ./rustup-init
320-
./rustup-init -y
321-
rm rustup-init
369+
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
370+
chmod +x ./rustup-init.sh
371+
./rustup-init.sh -y
372+
rm rustup-init.sh
322373
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
323374
324375
- name: Update Rust
@@ -363,6 +414,6 @@ jobs:
363414
docker run --rm \
364415
-v $(pwd)/envoy.yaml:/envoy.yaml \
365416
-v $(pwd)/target/wasm32-wasi/release:/etc/envoy/proxy-wasm-plugins \
366-
envoyproxy/envoy:v1.24-latest \
417+
envoyproxy/envoy:v1.31-latest \
367418
--mode validate \
368419
-c envoy.yaml

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [0.2.2] - 2024-07-21
8+
9+
### Fixed
10+
11+
- Fixed support for nested gRPC callouts.
12+
Thanks [@andytesti](https://github.com/andytesti)!
13+
14+
- Fixed panic on unknown `token_id` in `on_grpc_receive_initial_metadata`
15+
and `on_grpc_receive_trailing_metadata`.
16+
Thanks [@erikness-doordash](https://github.com/erikness-doordash)!
17+
18+
- Fixed panic on unexpected failures in `get_property`.
19+
Thanks [@alexsnaps](https://github.com/alexsnaps)!
20+
21+
- Fixed panic on unexpected failures in `call_foreign_function`.
22+
Reported by [@geNAZt](https://github.com/geNAZt).
23+
24+
### Added
25+
26+
- Added support for sending error responses with gRPC status codes.
27+
Thanks [@juanmolle](https://github.com/juanmolle)!
28+
729
## [0.2.1] - 2022-11-22
830

931
### Fixed
@@ -86,6 +108,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
86108
- Initial release.
87109

88110

111+
[0.2.2]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.2.1...v0.2.2
89112
[0.2.1]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.2.0...v0.2.1
90113
[0.2.0]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.1.4...v0.2.0
91114
[0.1.4]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.1.3...v0.1.4

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "proxy-wasm"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["Piotr Sikora <[email protected]>"]
5-
rust-version = "1.61"
5+
rust-version = "1.64"
66
description = "WebAssembly for Proxies"
77
readme = "README.md"
88
license = "Apache-2.0"

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
[![Documentation][docs-badge]][docs-link]
66
[![Apache 2.0 License][license-badge]][license-link]
77

8-
[build-badge]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/workflows/Rust/badge.svg?branch=master
9-
[build-link]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/actions?query=workflow%3ARust+branch%3Amaster
8+
[build-badge]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/workflows/Rust/badge.svg?branch=main
9+
[build-link]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/actions?query=workflow%3ARust+branch%3Amain
1010
[crate-badge]: https://img.shields.io/crates/v/proxy-wasm.svg
1111
[crate-link]: https://crates.io/crates/proxy-wasm
1212
[docs-badge]: https://docs.rs/proxy-wasm/badge.svg
1313
[docs-link]: https://docs.rs/proxy-wasm
1414
[license-badge]: https://img.shields.io/github/license/proxy-wasm/proxy-wasm-rust-sdk
15-
[license-link]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/master/LICENSE
15+
[license-link]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/blob/main/LICENSE
1616

1717
## Examples
1818

@@ -21,6 +21,7 @@
2121
- [HTTP Headers](./examples/http_headers/)
2222
- [HTTP Response body](./examples/http_body/)
2323
- [HTTP Configuration](./examples/http_config/)
24+
- [gRPC Auth (random)](./examples/grpc_auth_random/)
2425

2526
## Articles & blog posts from the community
2627

@@ -32,5 +33,5 @@
3233
When updating dependencies, you need to regenerate Bazel `BUILD` files to match updated `Cargo.toml`:
3334

3435
```sh
35-
bazel run //bazel/cargo:crates_vendor -- --repin
36+
bazel run //bazel/cargo:crates_vendor -- --repin all
3637
```

0 commit comments

Comments
 (0)