fastly
Fastly Compute API
0.13.0
6.9M downloads/mo
#3799 most downloaded on crates.io
What this package is like to depend on
Last release 2 months ago
16 Jun 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 58 of 58 stable releases
4 versions withdrawn
withdrawn after publishing
7 years old
69 releases · first in 2019
10 releases in the last 12 months
see the full history below
Release timeline
69 releases · Sep 2019 to Jun 2026Releases
latest 60 of 69-
0.13.016 Jun 2026Release notes
Open source →-
Make HTTP guest caching compatible with
send_async. -
Add
PendingRequest::send_to_clientmethod for handing off responsibility to the host for sending eventual responses to in-flight requests back to the client. -
Use
LazyLock/OnceLockinstead oflazy_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_errororCandidateResponse::set_stale_if_error. If you wish to disable this behavior, you can useRequest::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::sendorRequest::send_asyncwould otherwise return aSendErrorinstead of aResponse,Request::sendandRequest::send_asyncwill instead provide the cached response. For the request collapse leader,Response::masked_errorreturns 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_sendcache hook.
-
-
0.12.130 Apr 2026Release notes
Open source →- Adjust the documentation around the
for_grpcflag on backends to note current requirements and stability levels. - Add
allowed_malformed_query_paramsas an option for Image Optimizer requests.
- Adjust the documentation around the
-
0.12.031 Mar 2026Release notes
Open source →Surrogate-ControlandSurrogate-Keyheaders are preserved for shielded requests.- Interfaces for reusable sandboxes have been moved from the
fastly::experimental::reusable_sessionsmodule tofastly::http::serve. - Added new bot detection methods to
Request. - Removed the deprecated
write_bytesandwrite_strmethods for HTTP bodies, in favor ofstd::io::Writetrait methods. - Dynamic backends now have a 200
max_connectionslimit by default (previously unlimited), matching the default limit for static backends. - The following
Requestmethods now returnResult, rather than panicking on buffer size or UTF-8 decoding errors:get_original_header_namesget_tls_raw_client_certificateget_tls_cipher_openssl_nameget_tls_protocol
- Added the
fastly::http::body::StreamingBody::abandonmethod to explicitly abandon a stream. - Dropping an unfinished
StreamingBodyHandlewill now abandon the stream. - Added a new
SendErrorCause::Http2StreamErrorvariant, containing more details about unexpected HTTP/2 error responses. FastlyStatusis now marked as#[must_use].- Removed the deprecated
fastly::cache::core::Found::ttlmethod. - Clarified how calling
Request::set_passaffects other cache override options. - Documented that
Request::send_asyncandRequest::send_async_streamingwill fail if called after setting abefore_sendorafter_sendcallback. - Improved the documentation for Image Optimizer functionality.
-
0.11.1320 Jan 2026Release notes
Open source →- Add
fastly::compute_runtime::get_heap_mibfor reading memory usage - Add
fastly::experimental::reusable_sessions::Servefor using a callback handler when reusing sandboxes. - Explicitly register
max_connectionsas0even whenBackendBuilderis not provided a value for it.
- Add
-
0.11.1225 Nov 2025Release notes
Open source →- Add support to
BackendBuilderfor configuringprefer_ipv6and additional keepalive options - Include
wasm32-wasip2target fordocs.rsbuilds - Cleanup examples in documentation to not suggest using
unwrap
- Add support to
-
0.11.1119 Nov 2025Release notes
Open source →- Add support for sending 103 Early Hints to downstream clients
- Add
sandbox_id()function
-
0.11.1014 Nov 2025Release notes
Open source →- Document KV store
listlimits - Fix issue when using
Request::with_image_optimizerthat sometimes resulted in invalid argument errors. - Fix warnings when compiling with newer Rust releases
- Update documentation for
fastly::experimental::reusable_sessions - Fix links for
Shield::with_first_byte_timeout
- Document KV store
-
0.11.915 Oct 2025Release notes
Open source →-
Add
first_byte_timeoutto shield backendsEvery 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 theShieldwith the first-byte timeout configured. Backends created from the resultingShield(i.e.Shield::encrypted_backend,Shield::unencrypted_backend) will use the configured first-byte timeout.
-
-
0.11.807 Oct 2025 -
0.11.730 Sep 2025Release notes
Open source →- Request hooks: clarify that
before_sendandafter_sendare not invoked if the result is explicitly passed to origin (set_pass) - HTTP cache override: document that the cache override key must be exactly 32 bytes long
- Pass backend name at the start of HTTP cache transactions, to improve accuracy of POP-local / global cache hit ratio metrics.
- Add
Device::is_botmethod for indicating when aUser-Agentwas recognized as a bot - Add the rest of the
Devicefields getter functions to access each subfield - Add
InspectConfig::from_requestandInspectConfig::from_handlesfor creating new configurations for use withfastly::security::inspect. - Deprecate
InspectConfig::newin favor of choosing one of the newfrom_*constructors - Add
Request::get_tls_client_servernamefor getting SNI sent by client - Fix serialization for
thresholdvalue in Image Optimization - Optimize conversions for IP addresses and header values for hostcalls
- Request hooks: clarify that
-
0.11.615 Aug 2025Release notes
Open source →- Request metadata: use per-handle calls, rather than global calls, for most metadata.
SendErrorCause::DestinationNotFoundis now returned when a request is sent to an invalid backend, instead ofSendErrorCause::InternalError.- Clarified that
Request::get_content_typecan panic if theContent-Typeheader contains an invalid MIME type. - Added
Body::known_lengthto get the length of a body if it is known. - Clarified that manually-configured cipher suites only apply to TLS 1.0 - 1.2 connections.
Request::get_client_ip_addr/Request::get_server_ip_addrnow returnNonefor downstream requests without IPs- Experimental: added support for processing multiple requests sequentially in a session.
-
0.11.524 Jun 2025Release notes
Open source →-
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:
- The size of the cached item's body was not provided by the writer
- The reader requests a specific range of the cached item's body (
to_stream_from_range) - The writer and reader are concurrent, i.e. the body is streamed from one to the other the core cache API will ignore the requested range and provide the whole body. There is no explicit notification that the whole body is provided instead of a range.
In this SDK release, this remains the default behavior. However, lookup types (
LookupBuilder,TransactionLookupBuilder,ReplaceBuilder) now offer analways_use_requested_rangeoption. 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, sostart == endidentifies 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_ageare 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
ttlin several places to refer to the max-age value. In this version, we deprecate thesettlmethods (without changing their semantics), and addttl_remainingandmax_agemethods to provide clearer semantics. -
Image Optimizer: provide a clearer error when Image Optimizer is not enabled for a service
-
Core cache API: documentation improvements
-
-
0.11.408 May 2025Release notes
Open source →- Improve the documentation for
to_stream_from_range - Promote shielding support from the experimental tree into the main module.
- Improve the documentation for
-
0.11.322 Apr 2025Release notes
Open source →- Added experimental support for shielding primitives. See the documentation
in the
fastly::experimental::shieldingmodule for more information. - Fixed small issues in an ACL and a geolocation example, as well as a typo in the KV store documentation.
- Expanded and clarified our documentation regarding the validation of server certificates using dynamic backends.
- Clarified our documentaton on streaming bodies.
- Added
append_varyandpush_varymethods toCandidateResponse, and add further documentation. - Code cleanups in the
securitymodule, including the ability to set the buffer size for the inspection server's response (buffer size defaults to 16KB).
- Added experimental support for shielding primitives. See the documentation
in the
-
0.11.209 Dec 2024Release notes
Open source →- Updated
fastly::kv_storedocumentation - Updated
hashbrowncrate to 0.15.2 - Updated
urlcrate to 2.5.4
- Updated
-
0.11.103 Dec 2024Release notes
Open source →- Fixed bug with fetching generation information from the KV store
- Added support for using Fastly ACLs in the
aclmodule - Added a privileged option to caching APIs for Fastly-internal services running on Compute.
-
0.11.007 Oct 2024Release notes
Open source →- New HTTP caching APIs, including
set_cache_key,set_before_send, andset_after_sendonRequest. These allow for deep customization of caching behavior. Theset_after_sendmethod 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. - As part of that new caching API, caching hews a bit closer to the HTTP spec.
Where previously a response containing the string
privateorno-storeanywhere in the relevant cache control header would not be cached, the new API looks forprivateandno-storeas standalone entries in the header, which is the more typical behavior. The previous behavior can be emulated by using the newset_after_sendhook. - Refactored internals to reduce unnecessary copying. This required one minor
public API change, to
Request::get_url_mut, which now returns a smart pointer rather than a direct&mutreference. inspectand related types have been been moved from theexperimentalmodule tosecurity- KV store API overhaul, which includes new builder-style APIs with a much richer set of options
- Further improvements for lazily loading and cloning HTTP headers
- New HTTP caching APIs, including
-
0.10.516 Sep 2024Release notes
Open source →- Added support for configuring HTTP and TCP keepalive parameters on dynamic backends.
- Added APIs for replacing existing objects in the cache with new content
- Updated documentation for the
experimental::inspectand associated types
-
0.10.421 Aug 2024Release notes
Open source →- Added support for lazily loading and cloning HTTP headers
- Added
get_vcpu_mshostcall that returns the amount of vCPU milliseconds that the guest has been running.
-
0.10.301 Aug 2024 -
0.10.209 Jul 2024Release notes
Open source →- Added
Response::get_backend_addrto get the IP and port that received a direct pass request. - Added
InsertBuilder::deliver_node_max_edge,TransactionInsertBuilder::deliver_node_max_edge, andTransactionUpdateBuilder::deliver_node_max_edge, which allows configuring the maximum time the cached item may live on a deliver node in a POP.
- Added
-
0.10.128 May 2024Release notes
Open source →Added
- Added
PendingTransactionto allow code to run while waiting for request collapsing. - Added
TransactionLookupBuilder::execute_asyncto get access toPendingTransaction. - Added
Request::get_server_ip_addrto get the IP address on which this server received the HTTP request.
Deprecated
- Deprecated
uap_parse.
- Added
-
0.10.023 Apr 2024Release notes
Open source →Changed
- Updated
httpcrate to 1.1.0, which changes some of the types re-exported from this crate such asfastly::http::HeaderValue. If your application has an explicit dependency on thehttpcrate, you may need to update that dependency as well in order to interact with thefastlycrate. - Usage of the
handoff_websocketandhandoff_fanoutmethods onRequestandRequestHandleis no longer considered experimental. TheRequestUpgradeWebsocketandRequestHandleUpgradeWebsockettraits are no longer required to use these functions, and the trait methods have been marked as deprecated. - Conversion functions between low-level handles and
RequestandResponseno longer return errors following the removal of thelimitsmodule. Response::with_header()has been changed to have appending behavior rather than set behavior. As a result, chained invocations ofwith_header()will add multiple values for the same header to the response, just likeResponse::append_header(). Users that prefer the old behavior should useResponse::with_set_header(), instead.
Deprecated
- Deprecated
write_bytes()andwrite_str()methods onBodyandStreamingBodyin favor ofstd::io::Writemethods.
Removed
- Removed the previously-deprecated
limitsmodule. Fastly's network services resource limits do and will continue to apply. - Removed
Request::try_from_client(), which is no longer useful following the removal of thelimitsmodule. - Removed the previously-deprecated Object Store items that have been renamed to KV Store.
- Removed the previously-deprecated
TransactionUpdateBuilder::sensitive_data()method. - Removed several previously-deprecated variants of
SendErrorCausein favor of new, more-specific variants. - Removed the previously-deprecated
BackendExt::builder()trait method in favor of theBackend::builder()method. - Removed the previously-deprecated
write_bytes()andwrite_str()methods forBodyHandleandStreamingBodyHandlein favor ofstd::io::Writemethods.
- Updated
-
0.9.1211 Apr 2024Release notes
Open source →Added
- Added
Secret::try_plaintext()to allow explicit handling of Secret Store decryption failures.
Changed
- Improved the clarity of some docstrings.
Fixed
- Fixed
Request::get_tls_raw_client_certificate()so that it returnsNonewhen the client has not provided a client certificate. It previously returnedSome("")in this case. - Fixed
Request::get_tls_raw_client_certificate_bytes()so that it returnsNonewhen the client has not provided a client certificate. It previously returnedSome(&[])in this case. - Fixed a bug in
BackendBuilderthat causedBackendCreationError::HostError(FastlyStatus::INVAL)to be returned in rare circumstances when a valid client certificate was set. - Fixed behavior of some
_str()variants of header methods that could cause panics when header values contained valid UTF-8 but not valid ASCII bytes.
- Added
-
0.9.1121 Feb 2024Release notes
Open source →Added
- Added support for getting JA4 information from
Requestobjects - Added support for using Edge Rate Limiting (ERL) within Compute
- Added asynchronous versions of the KV store
deleteoperation
Deprecated
- Deprecated the
limitsmodule. Fastly's network services resource limits do and will continue to apply. - Deprecated the
TransactionUpdateBuilder::sensitive_datamethod
- Added support for getting JA4 information from
-
0.9.1003 Jan 2024Release notes
Open source →Added
- Added support for interacting with trailers; see the
BodyExttrait inexperimentalfor details.
Changed
- Fixed
Request::clone_with_bodyandResponse::clone_with_bodytrailer support.
- Added support for interacting with trailers; see the
-
0.9.910 Nov 2023Release notes
Open source →Added
- Added asynchronous versions of the KV store
lookupandinsertoperations. - Added
fastly::device_detection::lookup.
Changed
-
JA3 accessors for non-TLS connections now return
Nonerather than panicking. -
Updated hcd
is_healthyerror message when backend not found. -
Renamed Compute@Edge to Compute.
-
Added support for interacting with trailers; see the
BodyExttrait inexperimentalfor details. -
Fixed
Request::clone_with_bodyandResponse::clone_with_bodytrailer support.
- Added asynchronous versions of the KV store
-
0.9.815 Sep 2023Release notes
Open source →Added
- Added a flag to indicate that gRPC support is required for a dynamic backend.
- Added a number of new variants to
SendErrorCause, providing better visibility into the ways that sending an HTTP request and receiving an HTTP response can fail. - Added
_bytesvariants 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. - Added accessors for a fingerprint of the client request's original headers.
Changed
- Changed the
Debugoutput forFastlyStatus, making it more clear when those values are appearing in higher-level errors.
Deprecated
- Deprecated several variants of
SendErrorCausein favor of new, more-specific variants.
-
0.9.714 Aug 2023Release notes
Open source →Fixed
- Removed a prematurely-released interface change that caused link errors in 0.9.6.
-
0.9.607 Aug 2023 withdrawnRelease notes
Open source →Added
- Added support for mTLS / client certificates in dynamic backend definitions.
- Added [
Request::make_request_handle]. - Added config-store-specific raw functions in
fastly-sys.
Deprecated
- Deprecated the original
redirect_to_websocket_proxyandredirect_to_grip_proxyinfastly-sys, in favor of their v2 versions:redirect_to_websocket_proxy_v2andredirect_to_grip_proxy_v2.
-
0.9.512 Jul 2023Release notes
Open source →Added
- Added the Compute Simple Cache API in
fastly::cache::simple. fastly::errornow includes a reëxport ofanyhow::Contextin addition toanyhow::Error.- Added
fastly::secret_store::Secret::from_bytes()to create unencryptedSecrets from bytes at runtime for compatibility with APIs that require aSecret.
- Added the Compute Simple Cache API in
-
0.9.430 May 2023Release notes
Open source →Added
- Added the Compute Core Cache API in
fastly::cache::core.
Changed
- Usage of
Backend::builderis no longer considered experimental. TheBackendExttrait is no longer required to use that function, and the trait function has been marked as deprecated.
Deprecated
- Deprecated
BackendExt::builderin favor of a nativeBackend::builderfunction.
- Added the Compute Core Cache API in
-
0.9.315 May 2023Release notes
Open source →Added
Request::get_client_request_id()returns an identifier for the current client request.
Changed
- Renamed Object Store to KV Store, and deprecated the previous names.
- The
std::io::Writeimplementations forBodyHandleandStreamingBodyHandleno longer panic upon error.
Deprecated
- Deprecated the old Object Store items that have been renamed to KV Store.
- Deprecated
write_bytes()andwrite_str()methods forBodyHandleandStreamingBodyHandlein favor ofstd::io::Writemethods.
-
0.9.224 Mar 2023Release notes
Open source →Added
- Added various methods to
Backendto access various configuration settings.
Changed
- Adjusted documentation for
BackendBuilder::override_host. - Added examples to the module-level
limitsdocumentation. - Bumped
bytesdependency
Fixed
- Updated documentation for
Response::stream_to_client(),Request::send_async_streaming(), andRequestHandle::send_async_streaming()to show that streaming bodies must befinish()ed, not dropped. - Secret store:
BUFLEN errorwhen the plaintext secret's length is greater than 599 bytes
- Added various methods to
-
0.9.118 Jan 2023 -
0.9.018 Jan 2023Release notes
Open source →Added
- Added a new
fastly::secret_storemodule for use with the new Fastly Secret Store. - Added support for enabling or disabling reuse of connections for the experimental dynamic backend interface. The default is to reuse connections. Connection reuse is at the discretion of the server running the service.
Changed
- Streaming bodies must now be explicitly
finish()ed in order to be properly framed. The default behavior on drop forStreamingBodyorStreamingBodyHandlenow 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 incompletetransfer-encoding: chunkedbodies 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 ofwith_header()will add multiple versions of the same header to the request, just likeRequest::append_header(). Users that prefer the old behavior should useRequest::with_set_header(), instead.- Documentation on backend creation has been extended, to make it clear how to tell if a service supports dynamic backends.
- The arguments to
BackendBuilder::newandBackendBuilder::override_hosthave ben standardized toimpl ToString, to match the other functions in the file. LookupErrorandOpenErrorenums for config stores are now#[non_exhaustive].- Improved error messages when some resource limits are exceeded.
Removed
- Removed the migration guide Rustdoc for SDKs earlier than 0.6.0.
- Removed deprecated aliases from
Request,RequestHandle, andResponse. - Removed the deprecated
legacyitems fromfastly-sys. - Removed deprecated aliases from
fastly-shared.
- Added a new
-
0.9.0-pre114 Nov 2022 pre-releaseNothing published for this version
-
0.8.920 Oct 2022 -
0.8.819 Oct 2022Release notes
Open source →Added
- Added
Request::get_tls_raw_client_certificate, which returns the client's mutual TLS certificate. - Added
Request::get_tls_client_cert_verify_result, which returns an error code if applicable. - Added an experimental
Request::handoff_websocketinterface, which hands off a WebSocket request to a backend. - Added an experimental
Request::handoff_fanoutinterface, which passes a request to the Fanout GRIP proxy.
Changed
- Deprecated the experimental
RequestUpgradeWebsocket::upgrade_websockettrait method.
Fixed
- Fixed some documentation misspellings.
- Added an
http::purgemodule, 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.
- Added
-
0.8.719 Aug 2022Release notes
Open source →Added
- Added
Backend::is_healthy()toexperimentalmodule - Added
get_client_h2_fingerprinttoRequestandclient_h2_fingerprinttoRequestHandleto get the HTTP/2 fingerprint of a client request if available - Added an interface to the Compute Object Store.
- Added interfaces to issue surrogate key purges.
Changed
- Improved deprecation messages for renaming of
DictionarytoConfigStore - Fixed some misspellings.
- Added
-
0.8.622 Jun 2022Release notes
Open source →Added
- Added an experimental dynamic backend interface.
Changed
- Renamed Dictionaries to Config Stores, and deprecated the previous names.
-
0.8.504 May 2022Release notes
Open source →Added
- Added
get_headers()methods toRequestandResponsewhich return an iterator over all header values. - Added
Request::get_tls_ja3_md5()for getting the JA3 hash of the TLS ClientHello message. - Added experimental WebSocket upgrade interface.
- Added
-
0.8.409 Mar 2022Release notes
Open source →Added
- Added
set_framing_headers_modeandwith_framing_headers_modemethods toRequestandResponse, which allow you to manually control theContent-LengthandTransfer-Encodingheaders sent for a request or a response.
Changed
- Switched to Rust 2021 edition, so the minimum supported Rust version is now 1.56.0.
- Added
-
0.8.324 Feb 2022Release notes
Open source →Added
- Added
Body::try_get_prefix_mutto allow handling I/O errors when reading a body prefix.
- Added
-
0.8.221 Jan 2022Release notes
Open source →Added
- Added a set of
*_str_lossy()accessors for HTTP headers and bodies. Unlike the*_strmethods, they do not panic if the values contain invalid UTF-8, but may perform allocation to insert replacement characters for invalid sequences.
Fixed
- Fixed a crash when using
Request::clone_with_body().
- Added a set of
-
0.8.110 Dec 2021Release notes
Open source →Added
- Added a
OpenError::DictionaryDoesNotExisterror variant, which identifies when a dictionary couldn't be found. - Added
Dictionary::try_open(), which returns aResult<Dictionary, OpenError>, allowing programs to explicitly handle open failures. - Added automatic gzip decompression for backend responses; see
Request::set_auto_decompress_gzip(). - Added
Request::get_query_parameter()for easy access to individual query parameter strings. - Added
get_ttl()andget_stale_while_revalidate()accessors forCacheOverride.
Changed
- Renamed
with_body_bytes()andset_body_bytes()methods towith_body_octet_stream()andset_body_octet_stream()to emphasize that they modify theContent-Typeof the request or response. The original names are still present, but deprecated. - When reading from an HTTP body, an unexpected EOF (e.g., if a backend disconnects) results in an appropriately-tagged
std::io::Errorrather than the generic"fastly_http_body::read failed".
Fixed
- Panics caused when request limits are exceeded in
Request::from_client()or the#[fastly::main]macro now log a more informative error message; previously it was reported aspanicked at 'explicit panic'.
- Added a
-
0.8.001 Sep 2021Release notes
Open source →Added
- Added
Dictionary::try_get, which returns aResult<String, LookupError>, allowing programs to explicitly handle lookup failures. - Added an
Othervariant todictionary::LookupError. - Added
closetoRequestHandle, andResponseHandle. - Added the
non_exhaustiveenumsHandleErrorandHandleKindfor the low level handle interface. - Added
SatelliteandUltraBroadbandvariants forConnSpeedandConnTypein the geolocation interface. - Added
Othervariants forConnSpeed,ConnType,Continent,ProxyDescription, andProxyTypein the geolocation interface for cases where the geolocation database contains variants that are newer than the current SDK definitions.
Fixed
- Fixed geolocation calls returning no data when only partial data was available for a requested IP address.
Changed
- The Minimum Supported Rust Version (MSRV) for the
fastlycrate is now 1.54.0. BodyHandle::closenow works for non-streaming bodies in addition to the already-closeable streaming bodies.BodyHandle,RequestHandleandResponseHandlenow callcloseas part of theirDropimplementation when they go out of scope, saving a small amount of leaked memory for services that make multiple HTTP requests.- Exported unsafe low-level interfaces for creating
BodyHandles. - The functions
is_validandis_invalidare nowconstforBodyHandle,RequestHandle, andResponseHandle Geo::utc_offsetnow returnsOption<time::UtcOffset>instead ofOption<chrono::FixedOffset>.ConnSpeed,ConnType,ProxyDescription, andProxyTypeare nownon_exhaustive.- Exported the
fastly::dictionarymodule. Its exported typesDictionaryandLookupErrorremain accessible through other paths, but this module provides a way to import them together.
Removed
- Removed
CopyfromConnSpeed,ConnType,Continent,ProxyDescriptionandProxyTypeinside thegeomodule; their newOthervariants contain an arbitraryStringwhich is notCopyable. The strings theOthervariant might contain are small, so these enums (andGeoitself) can be efficiently cloned.
- Added
-
0.7.311 Jun 2021Release notes
Open source →Fixed
- Removed the use of an unstable documentation feature that caused the
docs.rsdocumentation build to fail.
- Removed the use of an unstable documentation feature that caused the
-
0.7.210 Jun 2021Release notes
Open source →Added
- 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 versions of the SDK.
- Added two new error causes to
SendErrorCause:HeadTooLargeandInvalidStatus. Previously these would be part of theInvalidvariant, 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 asHTTP/1.1 42 MadeUpStatusor if the response header was too large.
Fixed
- Fixed a typo in a panic message inside of
fastly::handle::dictionary::DictionaryHandle::open.
-
0.7.118 Mar 2021Release notes
Open source →Fixed
-
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. Seelog-fastlyfor the recommended high-level logging interface.
-
-
0.7.004 Mar 2021Release notes
Open source →Added
- Added
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. - Added
Response::see_other,Response::redirect, andResponse::temporary_redirectbuilders to support building a redirect response and itsLocationheader all at once. - Added
SendError::root_causeandSendErrorCauseto describe specific upstream request failure causes.
Deprecated
- Deprecated
with_body_str()andset_body_str()methods in favor ofwith_body_text_plain()andset_body_text_plain().
Changed
RequestHandle::send,RequestHandle::send_async, andRequestandle::send_async_streamingnow return a specificSendErrorCauseon errors, replacing ananyhow::Error.select_handlesnow returns a specificSendErrorCauseon errors, replacing ananyhow::Error.PendingRequestHandle::pollandPendingRequestHandle::waitnow return a specificSendErrorCauseon errors, replacing ananyhow::Error.
- Added
-
0.6.021 Jan 2021Release notes
Open source →Added
- Added
Dictionary::containsandDictionaryHandle::containsmethods, which allow programs to check if a key exists in a Fastly Edge Dictionary.
Changed
- Made a broad-ranging overhaul to the
RequestandResponseAPIs. See the documentation of thefastlycrate for details and a migration guide.
- Added
-
0.6.0-beta305 Jan 2021 pre-releaseNothing published for this version
-
0.6.0-beta207 Dec 2020 pre-releaseNothing published for this version
-
0.6.0-beta111 Nov 2020 pre-releaseNothing published for this version
-
0.5.121 Jan 2021Release notes
Open source →Changed
- Added an upper bound to the
fastly-sysdependency to avoid conflicts with newerfastly-sysversions. We expect to address this by fixingfastly-syssemantic versioning in the future.
- Added an upper bound to the
-
0.5.023 Oct 2020Release notes
Open source →Added
-
Added
fastly::dictionary::Dictionary, which allows programs to look up values in Fastly Edge Dictionaries. -
Added
set_pcimethod tofastly::request::RequestExtandpcitofastly::request::RequestBuilderExt, which both prevent cached content subject to compliance rules from being written to non-volatile storage. -
Added
set_surrogate_keytofastly::request::RequestExtandsurrogate_keytofastly::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.
Changed
fastly::request::RequestExtnow offerscache_overrideandcache_override_mutas accessors to aRequest'sCacheOverrideinstead of theget_andset_pair.
-
-
0.4.105 Oct 2020Release notes
Open source →Fixed
- Fixed a
FixedOffset::east()panic that could arise when handling geoip data when the geographic data for the IP address is invalid.
- Fixed a
-
0.4.023 Jun 2020Release notes
Open source →Added
-
Added
get_header_valuemethod tofastly::request::RequestHandle. -
Added specific error types for some API calls:
fastly::error::SendErroris returned by APIs that send backend requests. Note that the common case for a failed request remains anOkresult with a 5xx status code response.fastly::error::BufferSizeErroris returned by handle API calls that can fail due to an insufficient buffer size.
-
Added
RequestExt::send_async_streaming()andRequestHandle::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 theBackenda response came from. -
Added
ResponseExt::backend_request()andResponseExt::take_backend_request()to retrieve theRequestthat this response was returned from, minus the body which is consumed when the request is sent. Thetakevariant takes ownership of theRequestso that it can be subsequently reused for another backend request. -
Added
PendingRequest::sent_req()to retrieve theRequestthat was sent, minus the body which is consumed when the request is sent.
Changed
-
Removed
Resultreturn types from various functions and methods. Internal errors will now cause a panic. This primarily impacts theBody,BodyHandle,RequestHandle, andResponseHandletypes. This helps remove noise from?operators in cases where user programs cannot realistically recover from the error. -
get_header_valuemethods forRequestHandleandResponseHandlewill now returnOk(None)if the header does not exist, rather than an empty header. -
Response::send_downstream()andResponseHandle::send_downstream()now begin sending the responses immediately, rather than when the program exits. -
Renamed
Backend::new()toBackend::from_name(), and deprecated the old name.
Deprecated
- Deprecated
Backend::new()in favor ofBackend::from_name().
Removed
-
Removed
fastly::abisubmodule from the public interface. -
Removed
impl From<PendingRequestHandle> for PendingRequest, asPendingRequestsnow must be build with the backendRequestthey were sent with.
-
-
0.3.321 May 2020Release notes
Open source →Added
-
Added
Dropimplementations for streaming bodies to close streaming responses when the associatedStreamingBodyHandleorStreamingBodygoes out of scope. This allows client requests to finish while the Compute program is still running. -
Added
downstream_original_header_count, which gets the original number of headers of the downstream request. -
Added
ResponseHandle::remove_headerandRequestHandle::remove_header, which can remove headers directly from handles.
Changed
- Separated the low-level Compute bindings into a new, separately-versioned crate, in order to reduce the frequency of breaking changes for users of the
fastlycrate.
-