Skip to content

Commit d797999

Browse files
committed
Add Promise support for http callout
fix licenses and bazel (maybe) Signed-off-by: jizhuozhi.george <[email protected]>
1 parent dc6e39f commit d797999

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cargo_build_script(
2929

3030
rust_library(
3131
name = "proxy_wasm",
32-
srcs = glob(["src/*.rs"]),
32+
srcs = glob(["src/*.rs", "src/callout/*.rs"]),
3333
edition = "2018",
3434
visibility = ["//visibility:public"],
3535
deps = [

src/callout/http.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
use crate::callout::promise::Promise;
216
use crate::hostcalls;
317
use std::collections::HashMap;

src/callout/mod.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
pub mod http;
216
pub mod promise;

src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
mod allocator;
1615
pub mod callout;
17-
mod dispatcher;
1816
pub mod hostcalls;
19-
mod logger;
2017
pub mod traits;
2118
pub mod types;
2219

20+
mod allocator;
21+
mod dispatcher;
22+
mod logger;
23+
2324
// For crate-type="cdylib".
2425
#[cfg(not(wasi_exec_model_reactor))]
2526
#[macro_export]

0 commit comments

Comments
 (0)