Skip to content

Commit 4cf8495

Browse files
committed
Merge remote-tracking branch 'origin/master' into Swaagie/examples
Signed-off-by: Piotr Sikora <[email protected]>
2 parents 9029904 + 463eed0 commit 4cf8495

16 files changed

+110
-163
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,24 @@ jobs:
9999
100100
- name: Build (wasm32-unknown-unknown)
101101
env:
102-
RUSTFLAGS: -D warnings -C link-args=-S
102+
RUSTFLAGS: -D warnings
103103
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
104104

105105
- name: Clippy (wasm32-unknown-unknown)
106106
env:
107-
RUSTFLAGS: -D warnings -C link-args=-S
107+
RUSTFLAGS: -D warnings
108108
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
109109

110110
- name: Build (wasm32-wasi)
111111
env:
112-
RUSTFLAGS: -D warnings -C link-args=-S
112+
RUSTFLAGS: -D warnings
113113
run: cargo build --release --all-targets --target=wasm32-wasi
114114

115-
- name: Build (wasm32-wasi with wee-alloc)
116-
env:
117-
RUSTFLAGS: -D warnings -C link-args=-S
118-
run: cargo build --release --all-targets --target=wasm32-wasi --features=wee-alloc
119-
120115
- name: Clippy (wasm32-wasi)
121116
env:
122-
RUSTFLAGS: -D warnings -C link-args=-S
117+
RUSTFLAGS: -D warnings
123118
run: cargo clippy --release --all-targets --target=wasm32-wasi
124119

125-
- name: Clippy (wasm32-wasi with wee-alloc)
126-
env:
127-
RUSTFLAGS: -D warnings -C link-args=-S
128-
run: cargo clippy --release --all-targets --target=wasm32-wasi --features=wee-alloc
129-
130120
- name: Format (rustfmt)
131121
run: cargo fmt -- --check
132122

@@ -154,34 +144,24 @@ jobs:
154144
155145
- name: Build (wasm32-unknown-unknown)
156146
env:
157-
RUSTFLAGS: -D warnings -C link-args=-S
147+
RUSTFLAGS: -D warnings
158148
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
159149

160150
- name: Clippy (wasm32-unknown-unknown)
161151
env:
162-
RUSTFLAGS: -D warnings -C link-args=-S
152+
RUSTFLAGS: -D warnings
163153
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
164154

165155
- name: Build (wasm32-wasi)
166156
env:
167-
RUSTFLAGS: -D warnings -C link-args=-S
157+
RUSTFLAGS: -D warnings
168158
run: cargo build --release --all-targets --target=wasm32-wasi
169159

170-
- name: Build (wasm32-wasi with wee-alloc)
171-
env:
172-
RUSTFLAGS: -D warnings -C link-args=-S
173-
run: cargo build --release --all-targets --target=wasm32-wasi --features=wee-alloc
174-
175160
- name: Clippy (wasm32-wasi)
176161
env:
177-
RUSTFLAGS: -D warnings -C link-args=-S
162+
RUSTFLAGS: -D warnings
178163
run: cargo clippy --release --all-targets --target=wasm32-wasi
179164

180-
- name: Clippy (wasm32-wasi with wee-alloc)
181-
env:
182-
RUSTFLAGS: -D warnings -C link-args=-S
183-
run: cargo clippy --release --all-targets --target=wasm32-wasi --features=wee-alloc
184-
185165
- name: Format (rustfmt)
186166
run: cargo fmt -- --check
187167

@@ -213,24 +193,14 @@ jobs:
213193
214194
- name: Build (wasm32-wasi)
215195
env:
216-
RUSTFLAGS: -D warnings -C link-args=-S -Z wasi-exec-model=reactor
196+
RUSTFLAGS: -D warnings -Z wasi-exec-model=reactor
217197
run: cargo build --release --all-targets --target=wasm32-wasi
218198

219-
- name: Build (wasm32-wasi with wee-alloc)
220-
env:
221-
RUSTFLAGS: -D warnings -C link-args=-S -Z wasi-exec-model=reactor
222-
run: cargo build --release --all-targets --target=wasm32-wasi --features=wee-alloc
223-
224199
- name: Clippy (wasm32-wasi)
225200
env:
226-
RUSTFLAGS: -D warnings -C link-args=-S -Z wasi-exec-model=reactor
201+
RUSTFLAGS: -D warnings -Z wasi-exec-model=reactor
227202
run: cargo clippy --release --all-targets --target=wasm32-wasi
228203

229-
- name: Clippy (wasm32-wasi with wee-alloc)
230-
env:
231-
RUSTFLAGS: -D warnings -C link-args=-S -Z wasi-exec-model=reactor
232-
run: cargo clippy --release --all-targets --target=wasm32-wasi --features=wee-alloc
233-
234204
outdated:
235205
runs-on: ubuntu-latest
236206

BUILD

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
216
load("@rules_rust//rust:defs.bzl", "rust_library")
317

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ 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+
## [Unreleased]
8+
9+
### Removed
10+
11+
- Removed `wee-alloc` feature, because that crate is no longer maintained
12+
and it leaks memory.
13+
714
## [0.2.0] - 2022-04-08
815

916
### Fixed
@@ -70,6 +77,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7077
- Initial release.
7178

7279

80+
[Unreleased]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.2.0...HEAD
7381
[0.2.0]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.1.4...v0.2.0
7482
[0.1.4]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.1.3...v0.1.4
7583
[0.1.3]: https://github.com/proxy-wasm/proxy-wasm-rust-sdk/compare/v0.1.2...v0.1.3

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@
22
name = "proxy-wasm"
33
version = "0.2.0"
44
authors = ["Piotr Sikora <[email protected]>"]
5+
rust-version = "1.61"
56
description = "WebAssembly for Proxies"
67
readme = "README.md"
78
license = "Apache-2.0"
89
repository = "https://github.com/proxy-wasm/proxy-wasm-rust-sdk"
910
edition = "2018"
1011
build = "build.rs"
1112

12-
[features]
13-
wee-alloc = ["wee_alloc"]
14-
1513
[dependencies]
16-
hashbrown = "0.12"
14+
hashbrown = "0.13"
1715
log = "0.4"
18-
wee_alloc = { version = "0.4", optional = true }
1916

2017
[profile.release]
2118
lto = true
2219
opt-level = 3
20+
codegen-units = 1
2321
panic = "abort"
22+
strip = "debuginfo"
2423

2524
[package.metadata.raze]
2625
package_aliases_dir = "bazel/cargo"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Each example can be run with `docker compose` and has a matching Envoy configura
4040
## Articles & blog posts from the community
4141

4242
- [Extending Envoy with WASM and Rust](https://antweiss.com/blog/extending-envoy-with-wasm-and-rust/)
43-
- [Extending Istio with Rust and WebAssembly](https://blog.red-badger.com/extending-istio-with-rust-and-webassembly)
43+
- [Writing Envoy filters in Rust with WebAssembly](https://content.red-badger.com/resources/extending-istio-with-rust-and-webassembly)
4444

4545
## Updating dependencies
4646

bazel/BUILD

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

bazel/cargo/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ licenses([
1414
# Aliased targets
1515
alias(
1616
name = "hashbrown",
17-
actual = "@raze__hashbrown__0_12_0//:hashbrown",
17+
actual = "@raze__hashbrown__0_13_1//:hashbrown",
1818
tags = [
1919
"cargo-raze",
2020
"manual",

bazel/cargo/Cargo.raze.lock

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@
22
# It is not intended for manual editing.
33
[[package]]
44
name = "ahash"
5-
version = "0.7.6"
5+
version = "0.8.2"
66
source = "registry+https://github.com/rust-lang/crates.io-index"
7-
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
7+
checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107"
88
dependencies = [
9-
"getrandom",
9+
"cfg-if",
1010
"once_cell",
1111
"version_check",
1212
]
1313

14-
[[package]]
15-
name = "cfg-if"
16-
version = "0.1.10"
17-
source = "registry+https://github.com/rust-lang/crates.io-index"
18-
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
19-
2014
[[package]]
2115
name = "cfg-if"
2216
version = "1.0.0"
@@ -29,16 +23,16 @@ version = "0.2.6"
2923
source = "registry+https://github.com/rust-lang/crates.io-index"
3024
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
3125
dependencies = [
32-
"cfg-if 1.0.0",
26+
"cfg-if",
3327
"libc",
3428
"wasi",
3529
]
3630

3731
[[package]]
3832
name = "hashbrown"
39-
version = "0.12.0"
33+
version = "0.13.1"
4034
source = "registry+https://github.com/rust-lang/crates.io-index"
41-
checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758"
35+
checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
4236
dependencies = [
4337
"ahash",
4438
]
@@ -55,28 +49,21 @@ version = "0.4.16"
5549
source = "registry+https://github.com/rust-lang/crates.io-index"
5650
checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
5751
dependencies = [
58-
"cfg-if 1.0.0",
52+
"cfg-if",
5953
]
6054

61-
[[package]]
62-
name = "memory_units"
63-
version = "0.4.0"
64-
source = "registry+https://github.com/rust-lang/crates.io-index"
65-
checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
66-
6755
[[package]]
6856
name = "once_cell"
69-
version = "1.10.0"
57+
version = "1.16.0"
7058
source = "registry+https://github.com/rust-lang/crates.io-index"
71-
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
59+
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
7260

7361
[[package]]
7462
name = "proxy-wasm"
7563
version = "0.2.0"
7664
dependencies = [
7765
"hashbrown",
7866
"log",
79-
"wee_alloc",
8067
]
8168

8269
[[package]]
@@ -91,18 +78,6 @@ version = "0.10.2+wasi-snapshot-preview1"
9178
source = "registry+https://github.com/rust-lang/crates.io-index"
9279
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
9380

94-
[[package]]
95-
name = "wee_alloc"
96-
version = "0.4.5"
97-
source = "registry+https://github.com/rust-lang/crates.io-index"
98-
checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e"
99-
dependencies = [
100-
"cfg-if 0.1.10",
101-
"libc",
102-
"memory_units",
103-
"winapi",
104-
]
105-
10681
[[package]]
10782
name = "winapi"
10883
version = "0.3.9"

bazel/cargo/crates.bzl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ def raze_fetch_remote_crates():
1313
"""This function defines a collection of repos and should be called in a WORKSPACE file"""
1414
maybe(
1515
http_archive,
16-
name = "raze__ahash__0_7_6",
17-
url = "https://crates.io/api/v1/crates/ahash/0.7.6/download",
16+
name = "raze__ahash__0_8_2",
17+
url = "https://crates.io/api/v1/crates/ahash/0.8.2/download",
1818
type = "tar.gz",
19-
sha256 = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47",
20-
strip_prefix = "ahash-0.7.6",
21-
build_file = Label("//bazel/cargo/remote:BUILD.ahash-0.7.6.bazel"),
19+
sha256 = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107",
20+
strip_prefix = "ahash-0.8.2",
21+
build_file = Label("//bazel/cargo/remote:BUILD.ahash-0.8.2.bazel"),
2222
)
2323

2424
maybe(
@@ -43,12 +43,12 @@ def raze_fetch_remote_crates():
4343

4444
maybe(
4545
http_archive,
46-
name = "raze__hashbrown__0_12_0",
47-
url = "https://crates.io/api/v1/crates/hashbrown/0.12.0/download",
46+
name = "raze__hashbrown__0_13_1",
47+
url = "https://crates.io/api/v1/crates/hashbrown/0.13.1/download",
4848
type = "tar.gz",
49-
sha256 = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758",
50-
strip_prefix = "hashbrown-0.12.0",
51-
build_file = Label("//bazel/cargo/remote:BUILD.hashbrown-0.12.0.bazel"),
49+
sha256 = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038",
50+
strip_prefix = "hashbrown-0.13.1",
51+
build_file = Label("//bazel/cargo/remote:BUILD.hashbrown-0.13.1.bazel"),
5252
)
5353

5454
maybe(
@@ -73,12 +73,12 @@ def raze_fetch_remote_crates():
7373

7474
maybe(
7575
http_archive,
76-
name = "raze__once_cell__1_10_0",
77-
url = "https://crates.io/api/v1/crates/once_cell/1.10.0/download",
76+
name = "raze__once_cell__1_16_0",
77+
url = "https://crates.io/api/v1/crates/once_cell/1.16.0/download",
7878
type = "tar.gz",
79-
sha256 = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9",
80-
strip_prefix = "once_cell-1.10.0",
81-
build_file = Label("//bazel/cargo/remote:BUILD.once_cell-1.10.0.bazel"),
79+
sha256 = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860",
80+
strip_prefix = "once_cell-1.16.0",
81+
build_file = Label("//bazel/cargo/remote:BUILD.once_cell-1.16.0.bazel"),
8282
)
8383

8484
maybe(

0 commit comments

Comments
 (0)