Update Rust crate esp-idf-svc to 0.51.0 #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.25.0
->0.51.0
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
esp-rs/esp-idf-svc (esp-idf-svc)
v0.51.0
Compare Source
Breaking
embassy-time-driver
implementation compatible withembassy-time-driver
V0.2 (#548)Added
wifi_dhcp_with_hostname
to demonstrate setting a custom hostname when establishing a DHCP connectionv0.50.1
Compare Source
Fixed
v0.50.0
Compare Source
Deprecated
EspFirmwareInfoLoader
useEspFirmwareInfoLoad
insteadBreaking
Added
esp_idf_log_timestamp_rtos
for ms since boot andesp_idf_log_timestamp_source_system
for system time in rust logging (#494)EspFirmwareInfoLoad
that has a reduced memory consumption (#531)std::io::stdin
Fixed
eth_esp32_emac_default_config
- 5.3 compatibilityv0.49.1
Compare Source
Fixed
v0.49.0
Compare Source
Deprecated
ESP-IDF v4.4 Please start upgrading to ESP-IDF v5.
Breaking
handler
,fn_handler
andhandler_chain
all now only accept'static
callbacks,which is the only safe option in the presence of
core::mem::forget
on the HTTP server. All of those have theprevious behavior preserved in the form of
unsafe
*_nonstatic
variants which were added. (#437)core::net
which is re-exported byembedded-svc
and is stable since Rust 1.77)Added
Fixed
v0.48.1
Compare Source
esp_idf_svc::io::vfs
module if the ESP IDF VFS component is not enabled eitherUnblocker
utility was missingdrop
and therefore did not delete its task properly, resulting in a crash when the async MQTT client is droppedAsyncWifi
was notSend
anymore (regression).Send
restored.EspEventPostData
from&[u32]
to&[u8]
Send
forAsyncWifi
v0.48.0
Compare Source
eventloop
:esp-idf-svc
event loop types, as theembedded_svc::utils::asyncify
module is now goneEspTypedEventLoop
andEspPostbox
are now retired. UseEspEventLoop
directly, as it has the same functionalityEspEventFetchData
renamed toEspEvent
; bothEspEvent
andEspEventPostData
now lifetimed instead of using raw pointersEspTypedEventSource
is renamed toEspEventSource
and marked as unsafe (i.e., implementors should dounsafe impl EspTypedEventSource for ...
); check the documentation of the trait for justificationEspTypedEventDeserializer
andEspTypedEventSerializer
renamed to justEspEventSerializer
andEspEventDeserializer
; more importantly, their payload is now modeled using a lifetimed GAT member calledData<'a>
; this allows deserializers to implement zerocopy deserialization by referencing the event payload which is owned by the event loop; allesp-idf-svc
deserializers (notably -WifiEvent
andIpEvent
) are now implemented with zerocopy, thus reducing the pressure on the system event loop task stack sizeEspEvent
type is now also a dummy (no op)EspEventDeserializer
; theEspEventPostData
type is now also a dummy (no op)EspEventSerializer
subscribe*
andpost*
are now slightly less convenient to use in that they need the (de)serializer specified using turbofish syntax, i.e.event_loop.subscribe::<WifiEvent, _>(...)
; this is so because these methods no longer require (and cannot require - due to the lifetimed GAT from above)where P: EspEvent(De)serializer<P>
, i.e. the event type itself to implement the (de)sderializer, even if all event types provided byesp-idf-svc
do thatpost*
andspin
methods now take a timeout of typeTickType_t
as everywhere rather than the complexOption<Duration>
http::server
:embedded_svc::http::server
, whereasHandlerError
andHandlerResult
were removed, these types are no longer used in theembedded_svc::http::server
module either. Check the Changelog ofembedded_svc
for more detailstimer
: all async timer functionality now implemented directly on theesp-idf-svc
timer types, as theembedded_svc::utils::asyncify
module is now gonemqtt::client
:esp-idf-svc
MQTT types, as theembedded_svc::utils::asyncify
module is now goneembedded_svc::mqtt::client
API contract:EspMqttClient
andEspMqttConnection
, as well as the number of offered constructorsEspMqttEvent
which implements theembedded_svc::mqtt::client::Event
trait - valid for both callback-based event processing as well as for connection-based blocking and asynchronous event processingAsyncEspTls
renamed toEspAsyncTls
heapless
to 0.8embassy-time
and replace it with a dependency onembassy-time-driver
; get rid of the custom embassy time queue as it was anyway re-implementing something like a generic timer queue, which is available in theembassy-time
crate (with its featuregeneric-queue
enabled)http::server::Configuration::max_resp_handlers
renamed tohttp::server::Configuration::max_resp_headers
EspPing
to 64EspWifi
to swap STA and AP netifs separately from each otherv0.47.3
Compare Source
services
EspNow
, driverEthDriver
,EventLoop
,Wait
,EspHttpServer
,EspMqttClient
,EspSntp
,EspTimerService
,driver
WifiDriver
andEspWebSocketClient
no longer accept non-static callbacks, as these lead to UB / crash when the service/driver/subscriptionis forgotten with e.g.
core::mem::forget
. Since local borrows are a very useful feature however, these are still allowed via the newly-introducedand
unsafe
methods/constructors that follow the naming pattern of the safe methods/constructors, but with a_nonstatic
suffix attached.v0.47.2
Compare Source
AtomicU64
which is no longer supported by the upstream*-espidf
targetsv0.47.1
embedded-svc
0.26.1v0.47.0
experimental
module -bt
- providing Bluetooth support based on the ESP-IDF Bluedroid implementationtls
module viaEspTls
and (for async mode)AsyncEspTls
mqtt
esp-idf-sys
andesp-idf-hal
are now re-exported asesp_idf_svc::sys
andesp_idf_svc::hal
embedded-svc
0.26EspOta::finish
that allows to postpone/avoid setting the updated partition as a boot oneEspOtaUpdate
now parametric over the lifetime of a mutable reference toEspOta
and returned by valueEspOtaUpdate::abort
andEspOtaUpdate::complete
now takeself
instead of&mut self
EspHttpServer
instance. Therefore,EspHttpServer
is now lifetimed:EspHttpServer<'a>
EspHttpRequest
renamed toEspHttpRawConnection
EspWebSocketClient
instance. Therefore,EspWebSocketClient
is now lifetimed:EspWebSocketClient<'a>
EspTimer
instance. Therefore,EspTimer
is now lifetimed:EspTimer<'a>
EspSubscription
instance. Therefore,EspSubscription
is now lifetimed:EspSubscription<'a, ...>
EspMqttClient
instance. Therefore,EspMqttClient
is now lifetimed:EspMqttClient<'a, ...>
EspNow
instance. Therefore,EspNow
is now lifetimed:EspNow<'a>
EspSntp
instance. Therefore,EspSntp
is now lifetimed:EspSntp<'a>
EspPing::ping_details
now takes aFnMut
callback, however the callback needs to beSend
httpd
and the dependency onanyhow
notify
removed as it was rarely - if ever - used, and there is a simplerhal::task::notification
module nowv0.46.2
Compare Source
v0.46.1
Compare Source
wifi_scan_config_t
)v0.46.0
Compare Source
experimental
status from all formerly experimental featuresnightly
feature flag guard from allasyncify
modules as Rust GATs are stable nowWifi
,Eth
andEspNetif
that abstract away the ESP IDF system event loop (for easier initial configuration) - API breakage innetif
Eth
SPI driver rebased on top ofesp-idf-hal
'sSpiDeviceDriver
; it can now either borrow or own the SPI device driver (API breakage)Eth
driver now supports SPI bus sharing with other SPI devices (API breakage)NVS
- additional APIs that support the serde format of the ESP IDF NVS C codeSNTP
- new, callback APIlog
- support for setting target level per moduleOTA
- small API extensionsnetif
- compilation errors when PPP & SLIP support is enabled are addressedEspError::from_infallible
v0.45.0
Compare Source
HTTP server:
embedded-svc
V0.24fn_handler
that addresses HRTB lifetime issues when converting a Fn closure to aHandler
instanceEspHttpFnTraversableChain
; it is not necessary, now that thefn_handler
function from above does existv0.44.0
Compare Source
Rebase on top of
esp-idf-sys
0.32:esp-idf-sys::c_types
in favor ofcore::ffi
cstr_core
dependency asCstr
andCString
are now part of Rust coreusize
tou32
and back now thatesp-idf-sys
is compiled with--size_t-is-usize
enabledv0.43.5
Compare Source
Patch releases:
v0.43.4
Compare Source
Patch releases:
v0.43.3
Compare Source
Patch releases:
v0.43.2
Compare Source
Patch releases to fix compilation errors under no_std.
v0.43.1
Compare Source
Patch releases to fix compilation errors under no_std.
v0.43.0
Compare Source
Release 0.43 is a backwards-incompatible release where almost all services were touched in one way or another.
Major Changes
The main themes of the 0.43 release are:
embedded-svc
nvs_storage
module intonvs
embassy-time
crate by providing alarm implementationembassy-time
crate by providing timer queue implementationMajor changes elaboration
Public API
In addition to implementing the
embedded-svc
traits where possible, all services now have public API. While the public API loosely follows the APIs fromembedded-svc
, it deviates where appropriate so that the native underlying ESP IDF service is better utilized.These public APIs mean that the user is no longer required to depend on the
embedded-svc
crate so as to consume theesp-idf-svc
services.Consuming the services via the
embedded-svc
traits is now only necessary when the user is targetting cross-platform portability of their application code.Expose access to the wrapped ESP IDF services / drivers
All services now implement the
Handle
trait which does provide a reference to the native underlying ESP IDF service or driver. This is useful when the Rust wrapper for the service does not expose a particular functionality, as in that case, users can still call the functionality by using the rawesp-idf-svc
bindings for the service.Wifi & Eth: separate layer 2 (Ethernet) from layer 3 (IP)
The Wifi and Ethernet drivers are now split into two separate structures:
WifiDriver
/EthDriver
- these are layer 2 (Ethernet) drivers which follow all the conventions of the other drivers in theesp-idf-hal
crate, including the need to own or mutably borrow the actual petihperal (the Wifi modem peripheral or the RMII / SPI peripheral fromesp-idf-hal
). They are however part ofesp-idf-svc
as this is better aligned with their native ESP IDF counterparts, which actually do use/rely on certain ESP IDF services, like the event loop and NVS storage, which - being services - are also exposed as part ofesp-idf-svc
, and not as part ofesp-idf-hal
. These drivers implement theWifi
andEth
traits respectively, which were redesigned to not have any IP-related semantics. Users are allowed to use the Layer 2 drivers directly by providing their own custom RX callbacks, thus completely bypassing the ESP IDF LwIP IP & Netif layer (i.e. withsmoltcp
or other 3rd party IP stack)EspWifi
/EspEth
- these are layer 3 (IP) + layer 2 (Ethernet) services, which - on construction - are expected to own aWifiDriver
/EthDriver
- either by constructing it themselves, or by the user passing the driver. These services "glue" the ESP IDF IP & Netif layer (EspNetif
) with the ethernet layer provided by the drivers. These services also implement theWifi
/Eth
traits, as they are wrapping Layer 2 functionality anyway. The Layer 3 functionality (configuring the network interface as well as fetching IP-related information from the network interfaces) however uses custom methods on the services' themselves and is not (yet) abstracted usingembedded-svc
traits.Additionally, the
Wifi
andEth
trait implementations now provide finer grained control over the behavior of their drivers / services in that users should explicitly callstart
/stop
to start/stop the driver, as well asconnect
/disconnect
(for the Wifi driver in STA mode) to connect to an access point. While this makes the driver configuration a bit more involved, these changes provide the necessary flexibility for some corner use cases:EspNow
ESP NOW service, there is no need to actuallyconnect
the driver at all, which is now possibleHttp client & server: implement the new traits from
embedded-svc
Subject says it all, so to say.
Merge the
nvs_storage
module intonvs
RawStorage
trait, which provides facilities for reading / writing blobs. It is up to the user to layer aStorage
implementation on top of theRawStorage
implementation, but the benefit of that is that user is in control of how their structures are serialized/deserialized into binary. To ease the layering, users may take advantage of theStorageImpl
structure fromembedded-svc
and only provide aSerde
trait implementation which abstracts away the concrete Rust SerDe implementation (i.e.serde-json
,postcard
, etc.)Support for the
embassy-time
crate by providing alarm implementationesp-idf-svc
provides an implementation ofembassy-time
's alarm interface (theDriver
trait), which is implemented in terms of the ESP IDF Timer service (also exposed in thetimer
module ofesp-idf-svc
).To use this feature, users need to enable the
embassy-time-driver
Cargo feature.Support for the
embassy-time
crate by providing timer queue implementationesp-idf-svc
does provide a customembassy-time
Timer Queue implementation (also implemented in terms of the ESP IDF Timer service), even though in the meantimeembassy-time
features a generic timer queue which works everywhere and can also be used. This custom timer queue does not rely on the alarms interface provided by theembassy-time
crate (see the previous section).The one major difference between
embassy-time
's generic timer queue, and the one provided byesp-idf-svc
is that the latter has a slightly lower latency in that it does support theCONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD=y
ESP IDF configuration parameter. When this parameter is enabled, theesp-idf-svc
timer queue does not use the ESP IDF Timer Service dispatch task/thread and notifies the executor about due timers directly from the ISR routine. When this parameter is not enabled, theesp-idf-svc
timer queue has no benefits compared to the generic timer queue inembassy-time
.NOTE:
esp-idf-svc
timer queue should only be used with async executors that are ISR safe, in that they can be awoken from an ISR.edge-executor
is such an executor.embassy-executor
is currently NOT ISR safe, because it relies - for its synchronization - on thecritical-section
crate, yet the critical section implementation that thecritical-section
crate uses on top ofesp-idf-hal
is based on a FreeRTOS mutex, and NOT on a disable-all-interupts ISR-safe implementation (that is, unless the user has configured a more elaborate setup with their own critical section implementation). On the other hand,embassy-executor
has its own highly optimized timer queue which should probably be used anyway and is enabled by defaultembassy-time
crateTo use this feature, users need to enable the
embassy-time-isr-queue
Cargo feature.v0.42.5
Compare Source
v0.42.4
Compare Source
v0.42.3
Compare Source
v0.42.2
Compare Source
v0.42.1
Compare Source
v0.42.0
Compare Source
v0.41.4
Compare Source
v0.41.3
Compare Source
v0.41.2
Compare Source
v0.41.1
Compare Source
v0.41.0
Compare Source
v0.40.1
Compare Source
v0.40.0
Compare Source
v0.39.2
Compare Source
v0.39.1
Compare Source
v0.39.0
Compare Source
v0.38.2
Compare Source
v0.38.1
Compare Source
v0.38.0
Compare Source
v0.37.3
Compare Source
v0.37.2
Compare Source
v0.37.0
Compare Source
v0.36.10
Compare Source
v0.36.9
Compare Source
v0.36.8
Compare Source
v0.36.7
Compare Source
v0.36.6
Compare Source
v0.36.5
Compare Source
v0.36.4
Compare Source
v0.36.3
Compare Source
v0.36.2
Compare Source
v0.36.1
Compare Source
v0.36.0
Compare Source
v0.35.2
Compare Source
v0.35.1
Compare Source
v0.35.0
Compare Source
v0.34.3
Compare Source
v0.34.2
Compare Source
v0.34.1
Compare Source
v0.34.0
Compare Source
v0.33.0
Compare Source
v0.32.3
Compare Source
v0.32.2
Compare Source
v0.32.1
Compare Source
v0.32.0
Compare Source
v0.31.1
Compare Source
v0.31.0
Compare Source
v0.30.0
Compare Source
v0.29.2
Compare Source
v0.29.1
Compare Source
v0.29.0
Compare Source
v0.28.1
Compare Source
v0.28.0
Compare Source
v0.27.2
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.