Skip to content

Commit

Permalink
Add a demo HTTP Transport option to the hello_world example
Browse files Browse the repository at this point in the history
This is a small step towards a web-based Oak containers demo. To make it
easier to interact with an Oak server from a web browser, we add an
HTTP-based transport to the hello world example.

This transport is not meant for general use yet, it's just a quick
implementation for demo purposes.

Fixed: b/355220506

Change-Id: Id68c9ff66f7892233f95e391f87bfc4e56b5c953
  • Loading branch information
jblebrun committed Jul 27, 2024
1 parent 7ae67c7 commit fff9f48
Show file tree
Hide file tree
Showing 13 changed files with 1,184 additions and 103 deletions.
148 changes: 125 additions & 23 deletions Cargo.bazel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ dependencies = [
"syn 2.0.58",
]

[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"

[[package]]
name = "atomic_refcell"
version = "0.1.13"
Expand All @@ -263,9 +269,9 @@ dependencies = [
"bitflags 1.3.2",
"bytes",
"futures-util",
"http",
"http-body",
"hyper",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.28",
"itoa",
"matchit",
"memchr",
Expand All @@ -289,8 +295,8 @@ dependencies = [
"async-trait",
"bytes",
"futures-util",
"http",
"http-body",
"http 0.2.12",
"http-body 0.4.6",
"mime",
"rustversion",
"tower-layer",
Expand Down Expand Up @@ -1090,8 +1096,10 @@ dependencies = [
"hex",
"hkdf",
"hpke",
"http",
"hyper",
"http 0.2.12",
"http-body-util",
"hyper 1.4.1",
"hyper-util",
"ignore",
"itertools 0.12.1",
"lazy_static",
Expand Down Expand Up @@ -1587,7 +1595,26 @@ dependencies = [
"futures-core",
"futures-sink",
"futures-util",
"http",
"http 0.2.12",
"indexmap 2.2.6",
"slab",
"tokio",
"tokio-util",
"tracing",
]

[[package]]
name = "h2"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
dependencies = [
"atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
"http 1.1.0",
"indexmap 2.2.6",
"slab",
"tokio",
Expand Down Expand Up @@ -1723,14 +1750,48 @@ dependencies = [
"itoa",
]

[[package]]
name = "http"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
"bytes",
"fnv",
"itoa",
]

[[package]]
name = "http-body"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
"http",
"http 0.2.12",
"pin-project-lite",
]

[[package]]
name = "http-body"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
"http 1.1.0",
]

[[package]]
name = "http-body-util"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
dependencies = [
"bytes",
"futures-util",
"http 1.1.0",
"http-body 1.0.1",
"pin-project-lite",
]

Expand Down Expand Up @@ -1768,9 +1829,9 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
"httpdate",
"itoa",
Expand All @@ -1782,18 +1843,59 @@ dependencies = [
"want",
]

[[package]]
name = "hyper"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05"
dependencies = [
"bytes",
"futures-channel",
"futures-util",
"h2 0.4.5",
"http 1.1.0",
"http-body 1.0.1",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
"smallvec",
"tokio",
"want",
]

[[package]]
name = "hyper-timeout"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
dependencies = [
"hyper",
"hyper 0.14.28",
"pin-project-lite",
"tokio",
"tokio-io-timeout",
]

[[package]]
name = "hyper-util"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956"
dependencies = [
"bytes",
"futures-channel",
"futures-util",
"http 1.1.0",
"http-body 1.0.1",
"hyper 1.4.1",
"pin-project-lite",
"socket2",
"tokio",
"tower",
"tower-service",
"tracing",
]

[[package]]
name = "iana-time-zone"
version = "0.1.60"
Expand Down Expand Up @@ -2384,7 +2486,7 @@ checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb"
dependencies = [
"async-trait",
"futures-core",
"http",
"http 0.2.12",
"opentelemetry 0.22.0",
"opentelemetry-proto 0.5.0",
"opentelemetry-semantic-conventions",
Expand Down Expand Up @@ -3916,10 +4018,10 @@ dependencies = [
"base64 0.21.7",
"bytes",
"flate2",
"h2",
"http",
"http-body",
"hyper",
"h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.28",
"hyper-timeout",
"percent-encoding",
"pin-project",
Expand Down Expand Up @@ -3953,9 +4055,9 @@ checksum = "dc3b0e1cedbf19fdfb78ef3d672cb9928e0a91a9cb4629cc0c916e8cff8aaaa1"
dependencies = [
"base64 0.21.7",
"bytes",
"http",
"http-body",
"hyper",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.28",
"pin-project",
"tokio-stream",
"tonic",
Expand Down Expand Up @@ -3995,8 +4097,8 @@ dependencies = [
"bytes",
"futures-core",
"futures-util",
"http",
"http-body",
"http 0.2.12",
"http-body 0.4.6",
"http-range-header",
"pin-project-lite",
"tower-layer",
Expand Down
Loading

0 comments on commit fff9f48

Please sign in to comment.