Git Product home page Git Product logo

envoy-wasm-rust-sdk's Introduction

envoy-wasm-rust-sdk

This is the historical source of the "envoy-sdk" crate (Rust library).

Note: This crate is no longer maintained.

Try using proxy-wasm.

envoy-wasm-rust-sdk's People

Contributors

codefromthecrypt avatar nullpo-head avatar yskopets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

envoy-wasm-rust-sdk's Issues

Use the official rust-sdk as dependency

  • the ABI in the fork is not compatible any of Istio versions and the current Envoy's HEAD (therefore not compatible with the next tagged Envoy release)
  • some of the bugs are fixed in the official versions and I don't think it makes sense to continue maintaining the fork

provide support for manually creating backtrace of an error

Context

  • Rust doesn't support backtraces on wasm32 (neither is backtrace package)

Expected

  • find a way for user to manually attach location to an error
    • use file!() and line!() macros to get the location where an error is created
    • probably, use an error handling package like anyhow that allows to associate a free-form context with an error

add support for `gRPC Client API`

Context

  • host calls
    • proxy_dispatch_grpc_call
    • proxy_open_grpc_stream
    • proxy_send_grpc_call_message
    • proxy_cancel_grpc_call
    • proxy_close_grpc_call
  • extension callbacks
    • proxy_on_grpc_call_response_header_metadata
    • proxy_on_grpc_call_response_message
    • proxy_on_grpc_call_response_trailer_metadata
    • proxy_on_grpc_call_close

Question - Wasm VM failed Wasm missing malloc

Hi,

first thing first, great talk ๐Ÿ˜ƒ last week in envoyCon, it pushes me to try this week,

I was implementing a "pet" wasm filter in Rust with envoy-sdk and getenvoy, following the talk spirit, but I got the following error where I don't know what I am doing wrong? Is there anybody that can point me to a direction about Wasm missing malloc error message and how to troubleshoot this kind of error:

[2020-10-21 14:01:49.273][596220][debug][wasm] [bazel-out/k8-opt/bin/external/envoy/source/extensions/common/wasm/_virtual_includes/wasm_hdr/extensions/common/wasm/wasm_vm.h:45] WasmVm created envoy.wasm.runtime.v8 now active
[2020-10-21 14:01:49.273][596220][debug][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:106] Base Wasm created 1 now active
[2020-10-21 14:01:49.376][596220][error][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:123] Wasm VM failed Wasm missing malloc
[2020-10-21 14:01:49.376][596220][error][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:123] Wasm VM failed Failed to initialize Wasm code
[2020-10-21 14:01:49.376][596220][debug][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:164] ~Wasm 0 remaining active
[2020-10-21 14:01:49.376][596220][debug][wasm] [bazel-out/k8-opt/bin/external/envoy/source/extensions/common/wasm/_virtual_includes/wasm_hdr/extensions/common/wasm/wasm_vm.h:49] ~WasmVm envoy.wasm.runtime.v8 0 remaining active
[2020-10-21 14:01:49.377][596220][critical][main] [external/envoy/source/server/server.cc:101] error initializing configuration '/tmp/getenvoy_extension_run910790954/envoy.tmpl.yaml': Unable to create Wasm HTTP filter me.filters.http.envoy_digest_header_filter
[2020-10-21 14:01:49.377][596220][info][main] [external/envoy/source/server/server.cc:704] exiting

The code of the http filter can be found at https://github.com/jeremybaumont/envoy-digest-header-filter

Filter blocked after a request

Hi,
I followed the getting started https://www.getenvoy.io/tutorials/getting-started-http-filter-rust/

then I changed the filter, just to try the response, but after the first request the filter gets blocked

 if let Err(err) = &filter_ops.send_response(403,
                                                   &[("form", "envoy filter")],
                                                   Some(b"Access forbidden.\n")) {

            info!("error {}", &err);

        }
        info!("******* request sent");

        Ok(http::FilterHeadersStatus::StopIteration)

The first request works:

< HTTP/1.1 403 Forbidden                                                                                                                                                                                                             
< content-length: 18                                                                                                                                                                                                                 
< content-type: text/plain                                                                                                                                                                                                           
< form: envoy filter                                                                                                                                                                                                                 
< date: Sun, 10 Jan 2021 18:06:30 GMT                                                                                                                                                                                                
< server: envoy  

Then it doesn't work anymore.

Thank you for the sdk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.