envoyproxy/envoy

Rust support in Envoy

Open

#12,155 opened on 2020年7月17日

GitHub で見る
 (11 comments) (69 reactions) (0 assignees)C++ (27,997 stars) (5,373 forks)batch import
area/builddesign proposalhelp wanted

説明

I'm opening this as a top-level tracking issue for some initial possible projects for incrementally introducing Rust to Envoy. The idea is to benefit from the memory safety and ecosystem growth in Rust while retaining high performance, without boiling the ocean. Given Rust's use in places such as Mozilla, Tor, Linkerd and Linux kernel, it seems to make sense to scope out what we can achieve here.

Any use of Rust in Envoy will need to navigate build system (i.e. Bazel) and FFI integration. Some initial projects that could be possible:

  1. HelloWorld filter (e.g. simple header replacement) in Rust. This would force a fair bit of complexity in dealing with C++-Rust FFI, but open up the possibility of arbitrary Rust filters. A non-trivial candidate for porting to Rust would be the Lua filter, which already needs to interoperate with C.
  2. Rust use in strategic locations in Envoy core, e.g. parsers, where we can largely isolate the Rust and C++ world and communicate via a simple string or a very limited set of types between the two. The proto header parser is a good starting place.

More advanced uses in the future could include:

  • The access/header formatter if attention is paid to finding the right cut point.
  • Codecs
  • Incremental replacement of existing extensions; this will be a forcing function to sort out https://github.com/envoyproxy/envoy/issues/3390.
  • Load balancers
  • HeaderMap
  • ... suggestions welcome in this issue ...

コントリビューターガイド