Skip to content

Conversation

@brian14708
Copy link
Contributor

This PR adds a default-send-request feature flag to the wasmtime-wasi-http crate that allows disabling the default HTTP request handler implementation and its associated TLS dependencies.

@brian14708 brian14708 requested a review from a team as a code owner July 25, 2025 13:30
@brian14708 brian14708 force-pushed the feature/wasi-http-default-send-request branch 2 times, most recently from ff2c14e to 5e23189 Compare July 25, 2025 13:34
Copy link
Contributor

@dicej dicej left a comment

Choose a reason for hiding this comment

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

Looks great, thanks; just one suggestion inline.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

(if you don't mind me doing some review too)

Thanks for this! In addition to the comments below can you add a check on CI that the crate builds without default features? For example somewhere around here

Comment on lines 70 to 79
#[cfg(feature = "default-send-request")]
{
Ok(types::default_send_request(request, config))
}
#[cfg(not(feature = "default-send-request"))]
{
Err(ErrorCode::InternalError(Some(
"default-send-request feature disabled".to_string(),
))
.into())
}
Copy link
Member

Choose a reason for hiding this comment

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

FWIW we generally do not test all possible combinations of features, so I think it's reasonable to leave this out and have it be a compile error if the feature is disabled and tested. My thinking is along the lines of my above comment where I'd prefer to avoid reachable always-return-error functions if possible

@brian14708 brian14708 force-pushed the feature/wasi-http-default-send-request branch from 5e23189 to b617075 Compare July 26, 2025 00:11
@brian14708 brian14708 requested a review from a team as a code owner July 26, 2025 00:11
@brian14708 brian14708 requested review from alexcrichton and removed request for a team July 26, 2025 00:11
@brian14708 brian14708 force-pushed the feature/wasi-http-default-send-request branch from b617075 to ff403ef Compare July 26, 2025 00:16
@brian14708 brian14708 force-pushed the feature/wasi-http-default-send-request branch from ff403ef to e2bbde2 Compare July 26, 2025 00:30
@alexcrichton alexcrichton added this pull request to the merge queue Jul 26, 2025
Merged via the queue into bytecodealliance:main with commit d2f5118 Jul 26, 2025
43 checks passed
@brian14708 brian14708 deleted the feature/wasi-http-default-send-request branch August 21, 2025 01:48
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants