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

Allow RootContext to create child contexts for streams. #34

Merged
merged 9 commits into from
Dec 4, 2020

Conversation

dgn
Copy link
Contributor

@dgn dgn commented Aug 21, 2020

To fix #6

Without this, it's impossible (or just incredibly hard, I tried for hours) to read filter config from within an HttpContext or StreamContext. It requires users to always supply a RootContext, which adds a bit of boilerplate, but IMO is a reasonable way to connect RootContext with its children in Rust, as there's no easy way to manage global state.

I'm still very new to Rust so this might be the wrong way to do it. Let's discuss.

@dgn dgn requested a review from PiotrSikora as a code owner August 21, 2020 12:12
@dgn dgn force-pushed the master branch 4 times, most recently from 3b1b730 to fa8512a Compare August 21, 2020 13:47
src/dispatcher.rs Outdated Show resolved Hide resolved
src/dispatcher.rs Outdated Show resolved Hide resolved
src/dispatcher.rs Outdated Show resolved Hide resolved
src/traits.rs Outdated Show resolved Hide resolved
src/traits.rs Outdated
Comment on lines 125 to 135
fn create_http_context(&self, _context_id: u32, _root_context_id: u32) -> Box<dyn HttpContext> {
Box::new(EmptyHttpContext)
}

fn create_stream_context(
&self,
_context_id: u32,
_root_context_id: u32,
) -> Box<dyn StreamContext> {
Box::new(EmptyStreamContext)
}

fn get_type(&self) -> ContextType {
ContextType::RootContext
}
Copy link
Member

Choose a reason for hiding this comment

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

Since we know the context type, could this be turned into a single new_context function that returns various context types?

Alternatively, we could allow plugins to implement multiple traits/interfaces, in which case get_type would be an unnecessary limitation, although I don't think this could work with the current ABI...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I had to choose I'd prefer the former (ie have a single new_context fn that creates whatever type), but at this point I think I like the more explicit approach more- because in the end we would have to be type-casting in the SDK again to call trait-specific fn's. but I'm open to suggestions

}
}

impl Context for HttpBodyRoot {}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: move impl Context before impl RootContext to match order for HttpBody.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

src/traits.rs Show resolved Hide resolved
@@ -20,10 +20,23 @@ use std::time::Duration;
#[no_mangle]
pub fn _start() {
proxy_wasm::set_log_level(LogLevel::Trace);
proxy_wasm::set_http_context(|_, _| -> Box<dyn HttpContext> { Box::new(HttpAuthRandom) });
proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> { Box::new(HttpAuthRandomRoot) });
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this example, I wonder if we couldn't do something type-specific here, e.g.

proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> { Box::new(HttpHeadersRoot) });
proxy_wasm::set_http_context(|root_context, context_id| -> Box<dyn HttpContext> {
    root_context.new_http_context(context_id)
});

with dispatcher taking care of resolving root_context_id to root_context before calling this callback?

Copy link
Member

Choose a reason for hiding this comment

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

On the second thought, that might be useless, since we cannot expose multiple interfaces right now anyway.

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

Also, could you merge/rebase on top of current master branch? Thanks!

dgn added 2 commits November 17, 2020 09:45
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
@dgn dgn closed this Nov 17, 2020
@dgn dgn reopened this Nov 17, 2020
- Remove root_context_id from RootContext's create_http_stream
  and create_http_context calls
- Move EmptyHttpContext after HttpContext declaration
- Reorder trait impl's in examples to be consistent

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

Thanks! Could you also add an example showing developers how to use this feature? Maybe add a new header which value is passed via configuration to examples/http_headers.rs?

Note to self: merge this after tagging v0.1.3 (pending fix for #40).

src/traits.rs Show resolved Hide resolved
examples/http_auth_random.rs Outdated Show resolved Hide resolved
@@ -18,10 +18,23 @@ use proxy_wasm::types::*;
#[no_mangle]
pub fn _start() {
proxy_wasm::set_log_level(LogLevel::Trace);
proxy_wasm::set_http_context(|_, _| -> Box<dyn HttpContext> { Box::new(HttpBody) });
proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> { Box::new(HttpBodyRoot) });
}

struct HttpBody;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: move struct HttpBody; after definition of HttpBodyRoot.

src/types.rs Outdated
@@ -85,3 +85,9 @@ pub enum MetricType {
}

pub type Bytes = Vec<u8>;

pub enum ContextType {
Copy link
Member

Choose a reason for hiding this comment

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

Please add:

#[repr(u32)]
#[derive(Debug)]

(it's not used in the ABI right now, but it's going to be soon, so we might as well define it properly now)

Also, could you move it below Status?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

self.create_stream_context(context_id, root_context_id)
}
ContextType::RootContext => panic!("missing ContextType on root_context"),
}
Copy link
Member

Choose a reason for hiding this comment

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

One more thing. I think it would be useful if we could retain backwards compatibility, and merge this without breaking all existing plugins, even if there aren't too many in the wild right now.

One way to do this is to fallback to the standalone constructors in case root_context.get_type() returns ContextType::RootContext or None, and perhaps revert changes to examples/http_auth_random.rs to make sure that the old code path still works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 to remain backwards-compatible, but I think we should then deprecate the old way to create contexts and remove it in 0.2.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that would also allow us to remove NoopRoot in 0.2.0

Copy link
Member

Choose a reason for hiding this comment

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

The "old way" is fine for plugins that don't have configuration (e.g. where everything is already in the code), and the "new way" can double the code size with unnecessary boilerplate.

But it's something to consider for sure.

src/traits.rs Outdated
@@ -121,6 +121,18 @@ pub trait RootContext: Context {
fn on_queue_ready(&mut self, _queue_id: u32) {}

fn on_log(&mut self) {}

fn create_http_context(&self, _context_id: u32) -> Box<dyn HttpContext> {
Box::new(EmptyHttpContext)
Copy link
Member

Choose a reason for hiding this comment

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

Box<dyn HttpContext> -> Option<Box<dyn HttpContext>> and return None.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

src/traits.rs Outdated
}

fn create_stream_context(&self, _context_id: u32) -> Box<dyn StreamContext> {
Box::new(EmptyStreamContext)
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

src/traits.rs Outdated
}

fn get_type(&self) -> ContextType {
ContextType::RootContext
Copy link
Member

Choose a reason for hiding this comment

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

Option<ContextType> and return None.

src/traits.rs Outdated
Comment on lines 174 to 177
struct EmptyStreamContext;

impl StreamContext for EmptyStreamContext {}
impl Context for EmptyStreamContext {}
Copy link
Member

Choose a reason for hiding this comment

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

This won't be needed with Option<T>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

src/traits.rs Outdated
Comment on lines 324 to 327
struct EmptyHttpContext;

impl HttpContext for EmptyHttpContext {}
impl Context for EmptyHttpContext {}
Copy link
Member

Choose a reason for hiding this comment

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

This won't be needed with Option<T>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@dgn dgn force-pushed the master branch 2 times, most recently from 4fc15fc to 05d21f3 Compare November 20, 2020 09:23
dgn added 4 commits November 20, 2020 10:40
- consistent ordering of struct defs in examples
- attributes for ContextType enum

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
examples/http_config.rs Outdated Show resolved Hide resolved
proxy_wasm::set_log_level(LogLevel::Trace);
proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> {
Box::new(HttpConfigHeaderRootContext {
header_content: "".to_string(),
Copy link
Member

Choose a reason for hiding this comment

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

header_content: String::new(),

but you could also use:

header_context: None,

if you change header_content into Option<String>.

examples/http_config.rs Outdated Show resolved Hide resolved
}
}

struct HttpConfigHeaderRootContext {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: name this HttpConfigHeaderRoot and move it before HttpConfigHeader to match style used in other examples.

examples/http_auth_random.rs Outdated Show resolved Hide resolved

fn create_http_context(&self, _context_id: u32) -> Option<Box<dyn HttpContext>> {
Some(Box::new(HttpConfigHeader {
header_content: self.header_content.clone(),
Copy link
Member

Choose a reason for hiding this comment

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

This seems expensive, since presumably each context will own a copy of the header value.

It's fine in this example, since the value is small, but in general, wouldn't it be better to store a reference to the parent context and access configuration from there?

self.create_stream_context(context_id, root_context_id)
}
ContextType::RootContext => panic!("missing ContextType on root_context"),
}
Copy link
Member

Choose a reason for hiding this comment

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

The "old way" is fine for plugins that don't have configuration (e.g. where everything is already in the code), and the "new way" can double the code size with unnecessary boilerplate.

But it's something to consider for sure.

#[repr(u32)]
#[derive(Debug)]
pub enum ContextType {
HttpContext = 0,
Copy link
Member

Choose a reason for hiding this comment

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

Could you re-add RootContext as 0 here? Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why? How would that be different from returning None?

Copy link
Member

Choose a reason for hiding this comment

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

I meant only adding enum value here, not using it in this PR, since the ContextType is part of the updated ABI and I wanted to avoid renumbering later... But since it's not transmitted over the ABI boundary, it probably doesn't matter too much.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
#[repr(u32)]
#[derive(Debug)]
pub enum ContextType {
HttpContext = 0,
Copy link
Member

Choose a reason for hiding this comment

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

I meant only adding enum value here, not using it in this PR, since the ContextType is part of the updated ABI and I wanted to avoid renumbering later... But since it's not transmitted over the ABI boundary, it probably doesn't matter too much.

@PiotrSikora PiotrSikora changed the title Move context creation to fn of RootContext instead of callback Allow RootContext to create child contexts. Dec 4, 2020
@PiotrSikora PiotrSikora changed the title Allow RootContext to create child contexts. Allow RootContext to create child contexts for streams. Dec 4, 2020
@PiotrSikora PiotrSikora merged commit 7de2acd into proxy-wasm:master Dec 4, 2020
nullpo-head pushed a commit to nullpo-head/proxy-wasm-rust-sdk that referenced this pull request Mar 2, 2021
Fixes yskopets#6.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
yskopets added a commit to yskopets/proxy-wasm-rust-sdk that referenced this pull request Mar 2, 2021
* Use Rust toolchains with working components. (#16)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Split licenses check into a separate test target. (#17)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Help other developers get started using this SDK. (#15)

Signed-off-by: DazWilkin <daz.wilkin@gmail.com>

* Add Bazel support. (#18)

Signed-off-by: Shikugawa <Shikugawa@gmail.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting HTTP bodies. (#2)

Signed-off-by: Gregory Brail <gregbrail@google.com>

* Release v0.1.1. (#20)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update MapType values to match updated Proxy-Wasm ABI v0.1.0. (#7)

Signed-off-by: Yaroslav Skopets <yaroslav@tetrate.io>

* Release v0.1.2. (#21)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown to v0.8.2. (#22)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add cargo audit and cargo outdated checks. (#23)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update chrono to v0.4.15. (proxy-wasm#33)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move optional checks to the end. (proxy-wasm#28)

While there, align style with the test framework.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move Bazel to //bazel. (proxy-wasm#29)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Fix HTTP body example. (proxy-wasm#32)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting network buffers. (proxy-wasm#31)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add metrics. (proxy-wasm#30)

Fixes #4.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown and transitive dependencies. (proxy-wasm#45)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target. (proxy-wasm#42)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Make wee-alloc an optional feature. (proxy-wasm#38)

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* Update rules_rust to latest. (proxy-wasm#46)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update cargo-raze to latest and regenerate artifacts. (proxy-wasm#47)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target using Bazel. (proxy-wasm#50)

While there, update Bazel to 3.7.0.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Show getrandom and chrono/time usage in examples. (proxy-wasm#51)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Use cargo-raze's gen_buildrs for trusted crates. (proxy-wasm#53)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for nested HTTP callouts. (proxy-wasm#56)

Signed-off-by: Svetlin Zarev <svetlin.zarev@sap.com>

* Allow RootContext to create child contexts for streams. (proxy-wasm#34)

Fixes #6.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix warnings from Clippy v1.50.0 (nightly). (proxy-wasm#58)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Release v0.1.3. (proxy-wasm#59)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup instructions for updating dependencies. (proxy-wasm#60)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup WORKSPACE. (proxy-wasm#61)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup examples. (proxy-wasm#62)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update libc (transitive dependency) to v0.2.81. (proxy-wasm#63)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update the declared ABI version to 0.2.0

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update the examples so that they use the latest API

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Remove ChildContext for now, which is not used anymore

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Bump the version to 0.0.8

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix bazel build for the fork's crate

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix clippy erros in bytestring.rs

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update dependencies

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix Cargo.toml

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* outdated should check only root deps

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix inconsistent derived traits

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

Co-authored-by: Piotr Sikora <piotrsikora@google.com>
Co-authored-by: Daz Wilkin <DazWilkin@users.noreply.github.com>
Co-authored-by: Greg Brail <gbrail@users.noreply.github.com>
Co-authored-by: Yaroslav Skopets <y.skopets@gmail.com>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: SvetlinZarev-SAP <43135961+SvetlinZarev-SAP@users.noreply.github.com>
Co-authored-by: Daniel Grimm <dgrimm@redhat.com>
github-actions bot pushed a commit to yskopets/proxy-wasm-rust-sdk that referenced this pull request Mar 2, 2021
* Use Rust toolchains with working components. (#16)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Split licenses check into a separate test target. (#17)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Help other developers get started using this SDK. (#15)

Signed-off-by: DazWilkin <daz.wilkin@gmail.com>

* Add Bazel support. (#18)

Signed-off-by: Shikugawa <Shikugawa@gmail.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting HTTP bodies. (#2)

Signed-off-by: Gregory Brail <gregbrail@google.com>

* Release v0.1.1. (#20)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update MapType values to match updated Proxy-Wasm ABI v0.1.0. (#7)

Signed-off-by: Yaroslav Skopets <yaroslav@tetrate.io>

* Release v0.1.2. (#21)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown to v0.8.2. (#22)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add cargo audit and cargo outdated checks. (#23)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update chrono to v0.4.15. (proxy-wasm#33)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move optional checks to the end. (proxy-wasm#28)

While there, align style with the test framework.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move Bazel to //bazel. (proxy-wasm#29)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Fix HTTP body example. (proxy-wasm#32)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting network buffers. (proxy-wasm#31)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add metrics. (proxy-wasm#30)

Fixes #4.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown and transitive dependencies. (proxy-wasm#45)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target. (proxy-wasm#42)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Make wee-alloc an optional feature. (proxy-wasm#38)

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* Update rules_rust to latest. (proxy-wasm#46)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update cargo-raze to latest and regenerate artifacts. (proxy-wasm#47)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target using Bazel. (proxy-wasm#50)

While there, update Bazel to 3.7.0.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Show getrandom and chrono/time usage in examples. (proxy-wasm#51)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Use cargo-raze's gen_buildrs for trusted crates. (proxy-wasm#53)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for nested HTTP callouts. (proxy-wasm#56)

Signed-off-by: Svetlin Zarev <svetlin.zarev@sap.com>

* Allow RootContext to create child contexts for streams. (proxy-wasm#34)

Fixes #6.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix warnings from Clippy v1.50.0 (nightly). (proxy-wasm#58)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Release v0.1.3. (proxy-wasm#59)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup instructions for updating dependencies. (proxy-wasm#60)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup WORKSPACE. (proxy-wasm#61)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup examples. (proxy-wasm#62)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update libc (transitive dependency) to v0.2.81. (proxy-wasm#63)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update the declared ABI version to 0.2.0

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update the examples so that they use the latest API

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Remove ChildContext for now, which is not used anymore

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Bump the version to 0.0.8

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix bazel build for the fork's crate

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix clippy erros in bytestring.rs

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update dependencies

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix Cargo.toml

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* outdated should check only root deps

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix inconsistent derived traits

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

Co-authored-by: Piotr Sikora <piotrsikora@google.com>
Co-authored-by: Daz Wilkin <DazWilkin@users.noreply.github.com>
Co-authored-by: Greg Brail <gbrail@users.noreply.github.com>
Co-authored-by: Yaroslav Skopets <y.skopets@gmail.com>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: SvetlinZarev-SAP <43135961+SvetlinZarev-SAP@users.noreply.github.com>
Co-authored-by: Daniel Grimm <dgrimm@redhat.com>
mathetake added a commit to tetratelabs/proxy-wasm-go-sdk that referenced this pull request Mar 9, 2021
This is kind of an improvement from #93 in favor of proxy-wasm/proxy-wasm-rust-sdk#34 and proxy-wasm/proxy-wasm-rust-sdk#67

Note that this is a breaking change, though the fix is trivial.

Signed-off-by: Takeshi Yoneda takeshi@tetrate.io
github-actions bot pushed a commit to nullpo-head/proxy-wasm-rust-sdk that referenced this pull request Apr 20, 2021
…opets#19)

* Use Rust toolchains with working components. (yskopets#16)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Split licenses check into a separate test target. (yskopets#17)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Help other developers get started using this SDK. (yskopets#15)

Signed-off-by: DazWilkin <daz.wilkin@gmail.com>

* Add Bazel support. (yskopets#18)

Signed-off-by: Shikugawa <Shikugawa@gmail.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting HTTP bodies. (yskopets#2)

Signed-off-by: Gregory Brail <gregbrail@google.com>

* Release v0.1.1. (yskopets#20)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update MapType values to match updated Proxy-Wasm ABI v0.1.0. (yskopets#7)

Signed-off-by: Yaroslav Skopets <yaroslav@tetrate.io>

* Release v0.1.2. (yskopets#21)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown to v0.8.2. (yskopets#22)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add cargo audit and cargo outdated checks. (yskopets#23)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update chrono to v0.4.15. (proxy-wasm#33)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move optional checks to the end. (proxy-wasm#28)

While there, align style with the test framework.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Move Bazel to //bazel. (proxy-wasm#29)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Fix HTTP body example. (proxy-wasm#32)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for setting network buffers. (proxy-wasm#31)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add metrics. (proxy-wasm#30)

Fixes yskopets#4.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update hashbrown and transitive dependencies. (proxy-wasm#45)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target. (proxy-wasm#42)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Make wee-alloc an optional feature. (proxy-wasm#38)

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* Update rules_rust to latest. (proxy-wasm#46)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update cargo-raze to latest and regenerate artifacts. (proxy-wasm#47)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Allow building for wasm32-wasi target using Bazel. (proxy-wasm#50)

While there, update Bazel to 3.7.0.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Show getrandom and chrono/time usage in examples. (proxy-wasm#51)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Use cargo-raze's gen_buildrs for trusted crates. (proxy-wasm#53)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Add support for nested HTTP callouts. (proxy-wasm#56)

Signed-off-by: Svetlin Zarev <svetlin.zarev@sap.com>

* Allow RootContext to create child contexts for streams. (proxy-wasm#34)

Fixes yskopets#6.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix warnings from Clippy v1.50.0 (nightly). (proxy-wasm#58)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Release v0.1.3. (proxy-wasm#59)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup instructions for updating dependencies. (proxy-wasm#60)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup WORKSPACE. (proxy-wasm#61)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Cleanup examples. (proxy-wasm#62)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update libc (transitive dependency) to v0.2.81. (proxy-wasm#63)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* Update the declared ABI version to 0.2.0

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update the examples so that they use the latest API

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Remove ChildContext for now, which is not used anymore

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Bump the version to 0.0.8

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix bazel build for the fork's crate

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix clippy erros in bytestring.rs

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Update dependencies

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix Cargo.toml

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* outdated should check only root deps

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

* Fix inconsistent derived traits

Signed-off-by: Takaya Saeki <takaya@tetrate.io>

Co-authored-by: Piotr Sikora <piotrsikora@google.com>
Co-authored-by: Daz Wilkin <DazWilkin@users.noreply.github.com>
Co-authored-by: Greg Brail <gbrail@users.noreply.github.com>
Co-authored-by: Yaroslav Skopets <y.skopets@gmail.com>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: SvetlinZarev-SAP <43135961+SvetlinZarev-SAP@users.noreply.github.com>
Co-authored-by: Daniel Grimm <dgrimm@redhat.com>
PiotrSikora pushed a commit to PiotrSikora/proxy-wasm-rust-sdk that referenced this pull request Jul 4, 2023
Signed-off-by: Kit Chan <kichan@apache.org>
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.

Unlike in other SDKs, there is no link between RootContext and HttpContext / StreamContext
2 participants