Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(volo-http): separate client & server, split features #362

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

yukiiiteru
Copy link
Member

This PR separates volo-http to two parts client and server by features, and some extractors are also split into features.

Now the volo-http has the following features:

[features]
default = []

default_client = ["client", "json"]
default_server = ["server", "query", "form", "json"]

full = ["client", "server", "cookie", "query", "form", "json"]

client = ["hyper/client"] # client core
server = ["hyper/server", "dep:matchit", "dep:url"] # server core

cookie = ["dep:cookie"]

__serde = ["dep:serde"] # a private feature for enabling `serde` by `serde_xxx`(s)
query = ["__serde", "dep:serde_urlencoded"]
form = ["__serde", "dep:serde_html_form"]
json = ["sonic_json"] # use `sonic_json` by default

__json = [] # an empty and private feature for avoiding too many `cfg(any)`
sonic_json = ["__serde", "dep:sonic-rs", "__json"]
serde_json = ["__serde", "dep:serde_json", "__json"]

Note that cookie, form, query can only be used for server, client support for these features will be added in the future.

@yukiiiteru yukiiiteru requested review from a team as code owners February 18, 2024 13:26
Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
@yukiiiteru yukiiiteru merged commit 5a02355 into cloudwego:main Feb 19, 2024
13 checks passed
@yukiiiteru yukiiiteru deleted the chore/feat-and-mod branch February 19, 2024 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants