1[package] 2name = "ylong_http_client" 3version = "1.0.0" 4edition = "2021" 5description = "Ylong HTTP Client implementation" 6license = "Apache-2.0" 7repository = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_http" 8keywords = ["ylong", "http", "client"] 9 10# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 12[dependencies] 13ylong_http = { path = "../ylong_http", features = ["full"] } 14libc = { version = "0.2.134", optional = true } 15tokio = { version = "1.20.1", features = ["io-util", "net", "rt", "rt-multi-thread", "macros", "sync", "time"], optional = true } 16ylong_runtime = { git = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_runtime.git", features = ["net", "sync", "fs", "macros", "time"], optional = true } 17 18[dev-dependencies] 19hyper = { version = "0.14.23", features = ["http1", "tcp", "server"] } 20openssl = { version = "0.10.29" } 21tokio-openssl = { version = "0.6.3" } 22 23[features] 24default = [] 25full = [ 26 "tokio_base", 27 "sync", 28 "async", 29 "http1_1", 30 "tls_default", 31] 32 33sync = [] # Uses sync interfaces. 34async = [] # Uses async interfaces. 35http1_1 = ["ylong_http/http1_1"] # Uses HTTP/1.1. 36http2 = ["ylong_http/http2"] # Uses HTTP/2. 37http3 = [] # Uses HTTP/3. 38 39tokio_base = ["tokio", "ylong_http/tokio_base"] # Uses tokio runtime. 40ylong_base = ["ylong_runtime", "ylong_http/ylong_base"] # Uses ylong runtime. 41 42tls_default = ["c_openssl_3_0"] 43__tls = [] # Not open to user, only mark to use tls for developer. 44__c_openssl = ["__tls", "libc"] # Not open to user, only mark to use tls by C-openssl for developer. 45c_openssl_1_1 = ["__c_openssl"] # Uses TLS by FFI of C-openssl 1.1. 46c_openssl_3_0 = ["__c_openssl"] # Uses TLS by FFI of C-openssl 3.0. 47 48[[example]] 49name = "async_http" 50path = "examples/async_http.rs" 51required-features = ["async", "http1_1", "ylong_base"] 52 53[[example]] 54name = "async_http_multi" 55path = "examples/async_http_multi.rs" 56required-features = ["async", "http1_1", "ylong_base"] 57 58[[example]] 59name = "async_http2" 60path = "examples/async_http2.rs" 61required-features = ["async", "http2", "tokio_base"] 62 63[[example]] 64name = "async_http2_multi" 65path = "examples/async_http2_multi.rs" 66required-features = ["async", "http2", "tokio_base"] 67 68[[example]] 69name = "async_https_outside" 70path = "./examples/async_https_outside.rs" 71required-features = ["async", "http1_1", "__tls", "tokio_base"] 72 73[[example]] 74name = "sync_https_outside" 75path = "./examples/sync_https_outside.rs" 76required-features = ["sync", "http1_1", "__tls"] 77 78[[example]] 79name = "async_proxy_http" 80path = "examples/async_proxy_http.rs" 81required-features = ["async", "http1_1", "tokio_base"] 82 83[[example]] 84name = "async_redirect_http" 85path = "examples/async_redirect_http.rs" 86required-features = ["async", "http1_1", "tokio_base"] 87 88[[example]] 89name = "sync_http" 90path = "examples/sync_http.rs" 91required-features = ["sync", "http1_1"] 92 93[[example]] 94name = "sync_redirect_http" 95path = "examples/sync_redirect_http.rs" 96required-features = ["sync", "http1_1"] 97 98[[example]] 99name = "sync_proxy_http" 100path = "examples/sync_proxy_http.rs" 101required-features = ["sync", "http1_1"] 102