envoyproxy/envoy

Rust support in Envoy

Open

#12,155 建立於 2020年7月17日

在 GitHub 查看
 (11 留言) (69 反應) (0 負責人)C++ (5,373 fork)batch import
area/builddesign proposalhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 7天 21小時) (30 天內合併 260 個 PR)

描述

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 ...

貢獻者指南