NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4132 most downloaded on crates.io
Fastly Compute API
Last release 1 months ago
25 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 59 of 59 stable releases
4 versions withdrawn
withdrawn after publishing
7 years old
70 releases · first in 2019
Add a Request::as_handles method.
Request::as_handles method.from_handle functions for ConfigStore, SecretStore, and Log.ToBackend implementation for Arc<Backend>.BotCategory::Headless to list of known bot categoriesoverride_cache_key before using it.Make HTTP guest caching compatible with send_async.
Make HTTP guest caching compatible with send_async.
Add PendingRequest::send_to_client method for handing off responsibility to
the host for sending eventual responses to in-flight requests back to the client.
Use LazyLock/OnceLock instead of lazy_static
Support stale-if-error in the HTTP cache when using guest caching (default). See Fastly's documentation on stale-if-error for more details.
The HTTP cache will now store and serve stale-if-error responses. The
duration is configurable via Request::set_stale_if_error or
CandidateResponse::set_stale_if_error. If you wish to disable this behavior,
you can use Request::set_stale_if_error(Duration::ZERO) to avoid storing any
cache entries with a stale-if-error period.
If the HTTP cache has a response in its stale-if-error period and if
Request::send or Request::send_async would otherwise return a SendError
instead of a Response, Request::send and Request::send_async will instead
provide the cached response. For the request collapse leader,
Response::masked_error returns the error that would otherwise have been
returned.
Note that 5xx responses from a server are not, by default, replaced with a
stale-if-error response. You can override this behavior by returning an error
from the after_send cache hook.
One column per quarter.
Adjust the documentation around the for_grpc flag on backends to note current requirements and stability levels.
for_grpc flag on backends to note
current requirements and stability levels.allowed_malformed_query_params as an option for Image Optimizer
requests.Removed the deprecated write_bytes and write_str methods for HTTP bodies, in favor of std::Write trait methods.
Surrogate-Control and Surrogate-Key headers are preserved for
shielded requests.fastly::experimental::reusable_sessions module to
fastly::http::serve.Request.write_bytes and write_str methods for HTTP bodies, in favor of
std::io::Write trait methods.max_connections limit by default (previously unlimited),
matching the default limit for static backends.Request methods now return Result, rather than panicking on buffer size or
UTF-8 decoding errors:
get_original_header_namesget_tls_raw_client_certificateget_tls_cipher_openssl_nameget_tls_protocolfastly::http::body::StreamingBody::abandon method to explicitly abandon a stream.StreamingBodyHandle will now abandon the stream.SendErrorCause::Http2StreamError variant, containing more details about unexpected
HTTP/2 error responses.FastlyStatus is now marked as #[must_use].fastly::cache::core::Found::ttl method.Request::set_pass affects other cache override options.Request::send_async and Request::send_async_streaming will fail if called
after setting a before_send or after_send callback.Add fastly::compute_runtime::get_heap_mib for reading memory usage
fastly::compute_runtime::get_heap_mib for reading memory usagefastly::experimental::reusable_sessions::Serve for using a callback
handler when reusing sandboxes.max_connections as 0 even when BackendBuilder is
not provided a value for it.Add support to BackendBuilder for configuring prefer_ipv6 and additional keepalive options
BackendBuilder for configuring prefer_ipv6 and additional
keepalive optionswasm32-wasip2 target for docs.rs buildsunwrapAdd support for sending 103 Early Hints to downstream clients
sandbox_id() functionFix issue when using Request::with_image_optimizer that sometimes resulted in invalid argument errors.
list limitsRequest::with_image_optimizer that sometimes resulted
in invalid argument errors.fastly::experimental::reusable_sessionsShield::with_first_byte_timeoutAdd first_byte_timeout to shield backends
Add first_byte_timeout to shield backends
Every backend has a "first-byte timeout".
This timeout applies to the HTTP response line and response headers.
If the client (Compute instance) does not receive all the HTTP headers within the first-byte timeout,
the Compute platform considers the request failed and returns a SendError
(with e.g. SendErrorCause::HttpResponseTimeout) to the instance.
By default, all backends have a first-byte timeout of 15 seconds.
This timeout is configurable for static and dynamic backends; however, it was previously not
configurable for shield backends. If a shield POP took more than 15 seconds to complete
writing its response headers, the Compute instance at the edge POP would receive a SendError.
This release adds Shield::with_first_byte_timeout, which creates a copy of the Shield
with the first-byte timeout configured. Backends created from the resulting Shield
(i.e. Shield::encrypted_backend, Shield::unencrypted_backend) will use the configured first-byte
timeout.
- Add new InspectError variants
InspectError variantsDeprecate InspectConfig::new in favor of choosing one of the new from_* constructors
before_send and after_send are not invoked if the result is explicitly passed to origin (set_pass)Device::is_bot method for indicating when a User-Agent was recognized as a botDevice fields getter functions to access each subfieldInspectConfig::from_request and InspectConfig::from_handles for creating new configurations
for use with fastly::security::inspect.InspectConfig::new in favor of choosing one of the new from_* constructorsRequest::get_tls_client_servername for getting SNI sent by clientthreshold value in Image OptimizationRequest metadata: use per-handle calls, rather than global calls, for most metadata.
SendErrorCause::DestinationNotFound is now returned when a request is sent to an invalid backend, instead of SendErrorCause::InternalError.Request::get_content_type can panic if the Content-Type header contains an invalid MIME type.Body::known_length to get the length of a body if it is known.Request::get_client_ip_addr/Request::get_server_ip_addr now return None for downstream requests without IPsThe core cache API used the term ttl in several places to refer to the max-age value. In this version, we deprecate these ttl methods (without changin…
Core cache API: Opt-in to use ranges when streaming
The core cache API allows for cache items to be concurrently streamed to / from the cache. If:
to_stream_from_range)In this SDK release, this remains the default behavior.
However, lookup types (LookupBuilder, TransactionLookupBuilder, ReplaceBuilder)
now offer an always_use_requested_range option.
If set, body reads conducted as part of this lookup/transaction/replacement
will always use the requested range, even when streaming.
In a future (major) SDK release, the default behavior will change to always_use_requested_range.
Core cache API: Explicit check of inherently invalid ranges
The core cache API (to_stream_from_range) will now explicitly reject ranges where
the start is strictly after the end.
(Note that start and end are inclusive, so start == end identifies a valid 1-byte range.)
Config store: Allow config store values larger than 8k
Config store values can potentially be larger than 8k characters. The default limit is still 8k, but customers can now be individually assigned a larger limit (up to 32k).
This change updates the Rust SDK so that it resizes config store buffer on BUFLEN error, instead of returning an error. The default initial buffer length is 256.
Core cache API: Clarify TTL vs. max_age
TTL and max_age are two distinct concepts.
Max age gives the age of an item when it becomes stale;
TTL is not long from the current point in time until that age is reached.
The core cache API used the term ttl in several places to refer to the max-age value.
In this version, we deprecate these ttl methods (without changing their semantics),
and add ttl_remaining and max_age methods to provide clearer semantics.
Image Optimizer: provide a clearer error when Image Optimizer is not enabled for a service
Core cache API: documentation improvements
Improve the documentation for to_stream_from_range
to_stream_from_rangeAdded experimental support for shielding primitives. See the documentation in the fastly::shielding module for more information.
fastly::experimental::shielding module for more information.append_vary and push_vary methods to CandidateResponse, and
add further documentation.security module, including the ability to set the
buffer size for the inspection server's response (buffer size defaults
to 16KB).Updated fastly::kv_store documentation
fastly::kv_store documentationhashbrown crate to 0.15.2url crate to 2.5.4Fixed bug with fetching generation information from the KV store
acl moduleNew HTTP caching APIs, including set_cache_key, set_before_send, and set_after_send on Request. These allow for deep customization of caching behavior
set_cache_key, set_before_send, and
set_after_send on Request. These allow for deep customization of caching
behavior. The set_after_send method in particular sets up a callback to be
invoked after receiving a backend response, but before caching it -- allowing
cache configuration to be driven by the response data, and for the response to
be modified prior to caching.private or no-store
anywhere in the relevant cache control header would not be cached, the new
API looks for private and no-store as standalone entries in the header,
which is the more typical behavior. The previous behavior can be emulated by
using the new set_after_send hook.Request::get_url_mut, which now returns a smart
pointer rather than a direct &mut reference.inspect and related types have been been moved from the experimental
module to securityAdded support for configuring HTTP and TCP keepalive parameters on dynamic backends.
experimental::inspect and associated typesAdded support for lazily loading and cloning HTTP headers
get_vcpu_ms hostcall that returns the amount of vCPU milliseconds
that the guest has been running.- Added support for Rust 1.80.0
Added Response::get_backend_addr to get the IP and port that received a direct pass request.
Response::get_backend_addr to get the IP and port that received a
direct pass request.InsertBuilder::deliver_node_max_edge,
TransactionInsertBuilder::deliver_node_max_edge, and
TransactionUpdateBuilder::deliver_node_max_edge, which allows configuring
the maximum time the cached item may live on a deliver node in a POP.Added PendingTransaction to allow code to run while waiting for request collapsing.
PendingTransaction to allow code to run while waiting for request collapsing.TransactionLookupBuilder::execute_async to get access to PendingTransaction.Request::get_server_ip_addr to get the IP address on which this server received the HTTP request.uap_parse.…and the trait methods have been marked as deprecated.
http crate to 1.1.0, which changes some of the types re-exported from this crate such as fastly::http::HeaderValue. If your application has an explicit dependency on the http crate, you may need to update that dependency as well in order to interact with the fastly crate.handoff_websocket and handoff_fanout methods on Request and RequestHandle is no longer considered experimental. The RequestUpgradeWebsocket and RequestHandleUpgradeWebsocket traits are no longer required to use these functions, and the trait methods have been marked as deprecated.Request and Response no longer return errors following the removal of the limits module.Response::with_header() has been changed to have appending behavior rather than set behavior. As a result, chained invocations of with_header() will add multiple values for the same header to the response, just like Response::append_header(). Users that prefer the old behavior should use Response::with_set_header(), instead.write_bytes() and write_str() methods on Body and StreamingBody in favor of std::io::Write methods.limits module. Fastly's network services resource limits do and will continue to apply.Request::try_from_client(), which is no longer useful following the removal of the limits module.TransactionUpdateBuilder::sensitive_data() method.SendErrorCause in favor of new, more-specific variants.BackendExt::builder() trait method in favor of the Backend::builder() method.write_bytes() and write_str() methods for BodyHandle and StreamingBodyHandle in favor of std::io::Write methods.Added Secret::try_plaintext() to allow explicit handling of Secret Store decryption failures.
Secret::try_plaintext() to allow explicit handling of Secret Store decryption failures.Request::get_tls_raw_client_certificate() so that it returns None when the client has not provided a client certificate. It previously returned Some("") in this case.Request::get_tls_raw_client_certificate_bytes() so that it returns None when the client has not provided a client certificate. It previously returned Some(&[]) in this case.BackendBuilder that caused BackendCreationError::HostError(FastlyStatus::INVAL) to be returned in rare circumstances when a valid client certificate was set._str() variants of header methods that could cause panics when header values contained valid UTF-8 but not valid ASCII bytes.Deprecated the limits module. Fastly's network services resource limits do and will continue to apply.
Request objectsdelete operationlimits module. Fastly's network services resource limits do and will continue to apply.TransactionUpdateBuilder::sensitive_data methodAdded support for interacting with trailers; see the BodyExt trait in experimental for details.
BodyExt trait in experimental for details.Request::clone_with_body and Response::clone_with_body trailer support.Added asynchronous versions of the KV store lookup and insert operations.
lookup and insert operations.fastly::device_detection::lookup.JA3 accessors for non-TLS connections now return None rather than panicking.
Updated hcd is_healthy error message when backend not found.
Renamed Compute@Edge to Compute.
Added support for interacting with trailers; see the BodyExt trait in experimental for details.
Fixed Request::clone_with_body and Response::clone_with_body trailer support.
Deprecated several variants of SendErrorCause in favor of new, more-specific variants.
SendErrorCause, providing better visibility into the ways that sending an HTTP request and receiving an HTTP response can fail._bytes variants of methods to get client request TLS metadata, e.g. Request::get_tls_raw_client_certificate_bytes, so that non-UTF-8 metadata can be procssed without panics.Debug output for FastlyStatus, making it more clear when those values are appearing in higher-level errors.SendErrorCause in favor of new, more-specific variants.Removed a prematurely-released interface change that caused link errors in 0.9.6.
Deprecated the original redirect_to_websocket_proxy and redirect_to_grip_proxy in fastly-sys, in favor of their v2 versions: redirect_to_websocket_pro…
Request::make_request_handle].fastly-sys.redirect_to_websocket_proxy and redirect_to_grip_proxy in fastly-sys, in favor of their v2 versions: redirect_to_websocket_proxy_v2 and redirect_to_grip_proxy_v2.Added the Compute Simple Cache API in fastly::simple.
fastly::cache::simple.fastly::error now includes a reëxport of anyhow::Context in addition to anyhow::Error.fastly::secret_store::Secret::from_bytes() to create unencrypted Secrets from bytes at runtime for compatibility with APIs that require a Secret.The BackendExt trait is no longer required to use that function, and the trait function has been marked as deprecated.
fastly::cache::core.Backend::builder is no longer considered experimental. The BackendExt trait is no longer required to use that function, and the trait function has been marked as deprecated.BackendExt::builder in favor of a native Backend::builder function.Renamed Object Store to KV Store, and deprecated the previous names.
Request::get_client_request_id() returns an identifier for the current client request.std::io::Write implementations for BodyHandle and StreamingBodyHandle no longer panic upon error.write_bytes() and write_str() methods for BodyHandle and StreamingBodyHandle in favor of std::io::Write methods.Added various methods to Backend to access various configuration settings.
Backend to access various configuration settings.BackendBuilder::override_host.limits documentation.bytes dependencyResponse::stream_to_client(), Request::send_async_streaming(), and RequestHandle::send_async_streaming() to show that streaming bodies must be finish()ed, not dropped.BUFLEN error when the plaintext secret's length is greater than 599 bytesFixed warnings for unused internal items.
…or the backend receiving a request). This is a breaking change for all current uses of these types, and prevents situations where errors or premature…
fastly::secret_store module for use with the new Fastly Secret Store.finish()ed in order to be properly framed. The default behavior on drop for StreamingBody or StreamingBodyHandle now can yield an error to the recipient of the message (the client requesting the response, or the backend receiving a request). This is a breaking change for all current uses of these types, and prevents situations where errors or premature exits from Compute programs could cause incomplete transfer-encoding: chunked bodies to appear complete despite being truncated.Request::with_header() has been changed to have appending behavior rather than set behavior. As a result, chained invocations of with_header() will add multiple versions of the same header to the request, just like Request::append_header(). Users that prefer the old behavior should use Request::with_set_header(), instead.BackendBuilder::new and BackendBuilder::override_host have ben standardized to impl ToString, to match the other functions in the file.LookupError and OpenError enums for config stores are now #[non_exhaustive].Request, RequestHandle, and Response.legacy items from fastly-sys.fastly-shared.Nothing published for this version
Fixed a warning about an unused function.
Deprecated the experimental RequestUpgradeWebsocket::upgrade_websocket trait method.
Request::get_tls_raw_client_certificate, which returns the client's mutual TLS certificate.Request::get_tls_client_cert_verify_result, which returns an error code if applicable.Request::handoff_websocket interface, which hands off a WebSocket request to a backend.Request::handoff_fanout interface, which passes a request to the Fanout GRIP proxy.RequestUpgradeWebsocket::upgrade_websocket trait method.http::purge module, containing interfaces to purge surrogate keys. This was previously listed in the changelog of 0.8.7, but was not actually included in the release.Improved deprecation messages for renaming of Dictionary to ConfigStore
Backend::is_healthy() to experimental moduleget_client_h2_fingerprint to Request and client_h2_fingerprint to RequestHandle to get the HTTP/2 fingerprint of a client request if availableDictionary to ConfigStoreRenamed Dictionaries to Config Stores, and deprecated the previous names.
Added get_headers() methods to Request and Response which return an iterator over all header values.
get_headers() methods to Request and Response which return an iterator over all header values.Request::get_tls_ja3_md5() for getting the JA3 hash of the TLS ClientHello message.Added set_framing_headers_mode and with_framing_headers_mode methods to Request and Response, which allow you to manually control the Content-Length a
set_framing_headers_mode and with_framing_headers_mode methods to Request and Response, which allow you to manually control the Content-Length and Transfer-Encoding headers sent for a request or a response.Added Body::try_get_prefix_mut to allow handling I/O errors when reading a body prefix.
Body::try_get_prefix_mut to allow handling I/O errors when reading a body prefix.Added a set of *_str_lossy() accessors for HTTP headers and bodies. Unlike the *_str methods, they do not panic if the values contain invalid UTF-8, b
*_str_lossy() accessors for HTTP headers and bodies. Unlike the *_str methods, they do not panic if the values contain invalid UTF-8, but may perform allocation to insert replacement characters for invalid sequences.Request::clone_with_body().The original names are still present, but deprecated.
OpenError::DictionaryDoesNotExist error variant, which identifies when a dictionary couldn't be found.Dictionary::try_open(), which returns a Result<Dictionary, OpenError>, allowing programs to explicitly handle open failures.Request::set_auto_decompress_gzip().Request::get_query_parameter() for easy access to individual query parameter strings.get_ttl() and get_stale_while_revalidate() accessors for CacheOverride.with_body_bytes() and set_body_bytes() methods to with_body_octet_stream() and set_body_octet_stream() to emphasize that they modify the Content-Type of the request or response. The original names are still present, but deprecated.std::io::Error rather than the generic "fastly_http_body::read failed".Request::from_client() or the #[fastly::main] macro now log a more informative error message; previously it was reported as panicked at 'explicit panic'.Added Dictionary::try_get, which returns a Result , allowing programs to explicitly handle lookup failures.
Dictionary::try_get, which returns a Result<String, LookupError>, allowing programs to explicitly handle lookup failures.Other variant to dictionary::LookupError.close to RequestHandle, and ResponseHandle.non_exhaustive enums HandleError and HandleKind for the low level handle interface.Satellite and UltraBroadband variants for ConnSpeed and ConnType in the geolocation interface.Other variants for ConnSpeed, ConnType, Continent, ProxyDescription, and ProxyType in the geolocation interface for cases where the geolocation database contains variants that are newer than the current SDK definitions.fastly crate is now 1.54.0.BodyHandle::close now works for non-streaming bodies in addition to the already-closeable streaming bodies.BodyHandle, RequestHandle and ResponseHandle now call close as part of their Drop implementation when they go out of scope, saving a small amount of leaked memory for services that make multiple HTTP requests.BodyHandles.is_valid and is_invalid are now const for BodyHandle, RequestHandle, and ResponseHandleGeo::utc_offset now returns Option<time::UtcOffset> instead of Option<chrono::FixedOffset>.ConnSpeed, ConnType, ProxyDescription, and ProxyType are now non_exhaustive.fastly::dictionary module. Its exported types Dictionary and LookupError remain accessible through other paths, but this module provides a way to import them together.Copy from ConnSpeed, ConnType, Continent, ProxyDescription and ProxyType inside the geo module; their new Other variants contain an arbitrary String which is not Copyable. The strings the Other variant might contain are small, so these enums (and Geo itself) can be efficiently cloned.Removed the use of an unstable documentation feature that caused the docs.rs documentation build to fail.
docs.rs documentation build to fail.Added an experimental API for controlling the cache keys used for requests. Note that experimental APIs are subject to change or removal even in minor
SendErrorCause: HeadTooLarge and InvalidStatus. Previously these would be part of the Invalid variant, but now have their own to provide more insight as to what went wrong. In particular you will now know when a response fails due to an invalid status, such as HTTP/1.1 42 MadeUpStatus or if the response header was too large.fastly::handle::dictionary::DictionaryHandle::open.Fixed the buffer sizes reported in BufferSizeErrors incorrectly reporting the initial buffer size rather than the maximum size the buffer can grow to.
Fixed the buffer sizes reported in BufferSizeErrors incorrectly reporting the initial buffer size rather than the maximum size the buffer can grow to. The maximum buffer size was still being used, but the error field was misleading.
Dropped the unused dependency on log. See log-fastly for the recommended high-level logging interface.
Deprecated with_body_str() and set_body_str() methods in favor of with_body_text_plain() and set_body_text_plain().
with_body_text_plain(), set_body_text_plain(), with_body_text_html(),
set_body_text_html() convenience methods which set the body contents along with their respective
content types.Response::see_other, Response::redirect, and
Response::temporary_redirect builders to support building a redirect
response and its Location header all at once.SendError::root_cause and SendErrorCause to describe specific upstream request failure causes.with_body_str() and set_body_str() methods in favor of with_body_text_plain() and
set_body_text_plain().RequestHandle::send, RequestHandle::send_async, and Requestandle::send_async_streaming now return a specific SendErrorCause on errors, replacing an anyhow::Error.select_handles now returns a specific SendErrorCause on errors, replacing an anyhow::Error.PendingRequestHandle::poll and PendingRequestHandle::wait now return a specific SendErrorCause on errors, replacing an anyhow::Error.Added Dictionary::contains and DictionaryHandle::contains methods, which allow programs to check if a key exists in a Fastly Edge Dictionary.
Dictionary::contains and DictionaryHandle::contains methods, which allow programs to check if a key exists in a Fastly Edge Dictionary.Request and Response APIs. See the documentation of the fastly crate for details and a migration guide.Nothing published for this version
Nothing published for this version
Nothing published for this version
Added an upper bound to the fastly-sys dependency to avoid conflicts with newer fastly-sys versions. We expect to address this by fixing fastly-sys se
fastly-sys dependency to avoid conflicts with newer fastly-sys versions. We expect to address this by fixing fastly-sys semantic versioning in the future.Added fastly::Dictionary, which allows programs to look up values in Fastly Edge Dictionaries.
Added fastly::dictionary::Dictionary, which allows programs to look up values in Fastly Edge Dictionaries.
Added set_pci method to fastly::request::RequestExt and pci to fastly::request::RequestBuilderExt, which both prevent cached content subject to compliance rules from being written to non-volatile storage.
Added set_surrogate_key to fastly::request::RequestExt and surrogate_key to fastly::request::RequestBuilderExt. These allow surrogate keys to be added to cached content so that content may be purged in groups.
Added fastly::geo::Continent::as_code() for easy access to two-letter continent codes.
fastly::request::RequestExt now offers cache_override and cache_override_mut as accessors to a Request's CacheOverride instead of the get_ and set_ pair.Fixed a FixedOffset::east() panic that could arise when handling geoip data when the geographic data for the IP address is invalid.
FixedOffset::east() panic that could arise when handling geoip data when the geographic data for the IP address is invalid.Renamed Backend::new() to Backend::from_name(), and deprecated the old name.
Added get_header_value method to fastly::request::RequestHandle.
Added specific error types for some API calls:
fastly::error::SendError is returned by APIs that send backend requests. Note that the common case for a failed request remains an Ok result with a 5xx status code response.fastly::error::BufferSizeError is returned by handle API calls that can fail due to an insufficient buffer size.Added RequestExt::send_async_streaming() and RequestHandle::send_async_streaming(), which allow programs to continue writing bytes to upstream request bodies after the headers have been sent.
Added Backend::name() to get the string representation of a backend.
Added ResponseExt::backend() to retrieve the Backend a response came from.
Added ResponseExt::backend_request() and ResponseExt::take_backend_request() to retrieve the Request that this response was returned from, minus the body which is consumed when the request is sent. The take variant takes ownership of the Request so that it can be subsequently reused for another backend request.
Added PendingRequest::sent_req() to retrieve the Request that was sent, minus the body which is consumed when the request is sent.
Removed Result return types from various functions and methods. Internal errors will now cause a panic. This primarily impacts the Body, BodyHandle, RequestHandle, and ResponseHandle types. This helps remove noise from ? operators in cases where user programs cannot realistically recover from the error.
get_header_value methods for RequestHandle and ResponseHandle will now return Ok(None) if the header does not exist, rather than an empty header.
Response::send_downstream() and ResponseHandle::send_downstream() now begin sending the responses immediately, rather than when the program exits.
Renamed Backend::new() to Backend::from_name(), and deprecated the old name.
Backend::new() in favor of Backend::from_name().Removed fastly::abi submodule from the public interface.
Removed impl From<PendingRequestHandle> for PendingRequest, as PendingRequests now must be build with the backend Request they were sent with.
Your coding agent can read these notes before it upgrades. Set up the MCP server →