Skip to content
Draft
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
14 changes: 14 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ rust_library(
],
)

rust_library(
name = "proxy_wasm_no_panic",
srcs = glob(["src/*.rs"]),
crate_features = ["no-panic"],
crate_name = "proxy_wasm",
edition = "2018",
visibility = ["//visibility:public"],
deps = [
":proxy_wasm_build_script",
"//bazel/cargo/remote:hashbrown",
"//bazel/cargo/remote:log",
],
)

rust_binary(
name = "http_auth_random",
srcs = ["examples/http_auth_random/src/lib.rs"],
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ build = "build.rs"
hashbrown = "0.15"
log = "0.4"

[features]
default = []
no-panic = []
Copy link
Member Author

@PiotrSikora PiotrSikora Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This will depend on the strict-header-value (#287) once that PR is merged in order to eliminate UTF-8 panics in HTTP field values (as of now, that PR doesn't change the type of field names, but all valid HTTP field name characters are also valid UTF-8 characters).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexsnaps does this sound reasonable to you?


[profile.release]
lto = true
opt-level = 3
Expand Down
2 changes: 1 addition & 1 deletion examples/http_auth_random/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]

[dependencies]
log = "0.4"
proxy-wasm = { path = "../../" }
proxy-wasm = { path = "../../", features = ["no-panic"] }

[profile.release]
lto = true
Expand Down
Loading
Loading