Rust SDK 0.3.0

rust-sdkfixedremovedchangedadded

Added

  • Added the #[fastly::main] attribute to optionally reduce boilerplate in program entrypoints:
#[fastly::main]
fn main(ds_req: Request<Body>) -> Result<impl ResponseExt, Error> {
ds_req.send("example_backend")
}
  • Added downstream_tls_client_hello() to get the raw bytes of the TLS ClientHello message.

  • Added downstream_original_header_names_with_len() to get the request's header names as originally received, and in the original order they were received.

  • Added fastly::log::set_panic_endpoint(), which lets you redirect Rust panic output to the logging endpoint of your choice.

Changed

  • Generalized the Backend::send() method to take any argument that implements the fastly::RequestExt trait.

Removed

  • Removed the dependency on the regex crate.

Fixed

  • Fixed validation for backend names, so that all valid backend names are now accepted. This was previously too conservative about what constitutes a valid backend name.

Prior change: Rust SDK 0.2.0-alpha4

Following change: April 2020 VCL release

User contributed notes

BETA

Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact support@fastly.com)