Skip to content

Commit eac15dc

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

19 files changed

+109
-475
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: 8 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,125 +2,55 @@
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"
2317
source = "registry+https://github.com/rust-lang/crates.io-index"
2418
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
2519

26-
[[package]]
27-
name = "getrandom"
28-
version = "0.2.6"
29-
source = "registry+https://github.com/rust-lang/crates.io-index"
30-
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
31-
dependencies = [
32-
"cfg-if 1.0.0",
33-
"libc",
34-
"wasi",
35-
]
36-
3720
[[package]]
3821
name = "hashbrown"
39-
version = "0.12.0"
22+
version = "0.13.1"
4023
source = "registry+https://github.com/rust-lang/crates.io-index"
41-
checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758"
24+
checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
4225
dependencies = [
4326
"ahash",
4427
]
4528

46-
[[package]]
47-
name = "libc"
48-
version = "0.2.122"
49-
source = "registry+https://github.com/rust-lang/crates.io-index"
50-
checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259"
51-
5229
[[package]]
5330
name = "log"
5431
version = "0.4.16"
5532
source = "registry+https://github.com/rust-lang/crates.io-index"
5633
checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
5734
dependencies = [
58-
"cfg-if 1.0.0",
35+
"cfg-if",
5936
]
6037

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-
6738
[[package]]
6839
name = "once_cell"
69-
version = "1.10.0"
40+
version = "1.16.0"
7041
source = "registry+https://github.com/rust-lang/crates.io-index"
71-
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
42+
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
7243

7344
[[package]]
7445
name = "proxy-wasm"
7546
version = "0.2.0"
7647
dependencies = [
7748
"hashbrown",
7849
"log",
79-
"wee_alloc",
8050
]
8151

8252
[[package]]
8353
name = "version_check"
8454
version = "0.9.4"
8555
source = "registry+https://github.com/rust-lang/crates.io-index"
8656
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
87-
88-
[[package]]
89-
name = "wasi"
90-
version = "0.10.2+wasi-snapshot-preview1"
91-
source = "registry+https://github.com/rust-lang/crates.io-index"
92-
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
93-
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-
106-
[[package]]
107-
name = "winapi"
108-
version = "0.3.9"
109-
source = "registry+https://github.com/rust-lang/crates.io-index"
110-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
111-
dependencies = [
112-
"winapi-i686-pc-windows-gnu",
113-
"winapi-x86_64-pc-windows-gnu",
114-
]
115-
116-
[[package]]
117-
name = "winapi-i686-pc-windows-gnu"
118-
version = "0.4.0"
119-
source = "registry+https://github.com/rust-lang/crates.io-index"
120-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
121-
122-
[[package]]
123-
name = "winapi-x86_64-pc-windows-gnu"
124-
version = "0.4.0"
125-
source = "registry+https://github.com/rust-lang/crates.io-index"
126-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

0 commit comments

Comments
 (0)