The NGINX project has released tools for module development in the Rust programming language

The developers of the NGINX project have introduced the ngx-rust toolkit, enabling the creation of modules for the HTTP server and multi-protocol proxy NGINX using the Rust programming language. The ngx-rust code is distributed under the Apache 2.0 license and is currently in beta.

Initially, the toolkit was developed as a project to accelerate the development of an Istio-compatible service mesh for the Kubernetes platform, operating on top of NGINX. The product did not progress beyond a prototype and remained stagnant for several years, but examples published during the prototyping process were utilized by the community in third-party projects to enhance NGINX capabilities with Rust.

After some time, F5 required the creation of a specialized module for NGINX to protect its services, in which the Rust language was desired to reduce memory error risks. The author of ngx-rust was engaged to develop a new and improved toolkit for creating NGINX modules in Rust.

The toolkit includes two crate packages:

  • nginx-sys — a binding generator based on the NGINX source code. The utility loads NGINX code and all related dependencies, then uses bindgen to create bindings to the original functions (FFI, foreign function interface).
  • ngx — a layer for invoking C functions from Rust code, providing an API and a system for re-exporting bindings created with nginx-sys.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster