Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libcoap to 4.3.5, bump dependencies, improve linking (incl. ESP32) #15

Merged
merged 12 commits into from
Jul 2, 2024

Conversation

pulsastrix
Copy link
Member

@pulsastrix pulsastrix commented Jun 11, 2024

Updates libcoap to 4.3.5-rc2 as well as some dependencies to the latest released version (some of them had cargo audit warnings).
Also improves some of the linking behavior and adds additional features for DTLS library vendoring

NOTE: libcoap 4.3.5 is not released yet, so we should not release a new version of libcoap to crates.io yet. However, libcoap 4.3.5 fixed some mbedtls linking issues, so i'd like to wait for that instead of switching to 4.3.4a.

@pulsastrix pulsastrix self-assigned this Jun 11, 2024
Copy link

github-actions bot commented Jun 11, 2024

Code Coverage Report

Generated for commit d1ab040 on Tue Jul 2 13:31:37 UTC 2024.
Code Coverage

Package Line Rate Health
libcoap-sys 80%
libcoap/src 44%
libcoap/src/message 39%
libcoap/tests/common 90%
libcoap/tests 92%
libcoap-sys/src 80%
libcoap/src/session 53%
Summary 47% (903 / 1924)

@pulsastrix pulsastrix force-pushed the add_vendored_features_for_dtls branch 2 times, most recently from 3a4b561 to b6d57b4 Compare June 14, 2024 15:36
@pulsastrix pulsastrix changed the title Update libcoap to 4.3.4a, tinydtls to 0.2.0 and bindgen to 0.69.4 Update libcoap to 4.3.4a, bump dependencies, improve linking (incl. ESP32) Jun 27, 2024
@pulsastrix pulsastrix changed the title Update libcoap to 4.3.4a, bump dependencies, improve linking (incl. ESP32) Update libcoap to 4.3.5, bump dependencies, improve linking (incl. ESP32) Jun 27, 2024
@pulsastrix pulsastrix requested a review from JKRhb July 1, 2024 15:32
@pulsastrix pulsastrix marked this pull request as ready for review July 1, 2024 15:32
@pulsastrix
Copy link
Member Author

This PR should now be ready for a review. Implementing the newly added features (OSCORE, WebSockets, fixing DTLS on the threadsafe version of libcoap...) is probably better done in a separate PR, in order to not make this one too big.

Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found a couple of nits below, otherwise: Looks good to me :)

.github/workflows/ci.yml Show resolved Hide resolved
libcoap-sys/build.rs Outdated Show resolved Hide resolved
libcoap-sys/build.rs Outdated Show resolved Hide resolved
libcoap-sys/build.rs Outdated Show resolved Hide resolved
libcoap-sys/build.rs Outdated Show resolved Hide resolved
libcoap/src/message/response.rs Outdated Show resolved Hide resolved
libcoap/src/message/response.rs Outdated Show resolved Hide resolved
libcoap/src/event.rs Outdated Show resolved Hide resolved
libcoap/src/event.rs Outdated Show resolved Hide resolved
libcoap-sys/src/wrapper.h Outdated Show resolved Hide resolved
.idea/libcoap-rs.iml Outdated Show resolved Hide resolved
pulsastrix added a commit that referenced this pull request Jul 2, 2024
@pulsastrix pulsastrix requested a review from JKRhb July 2, 2024 13:03
Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See three last nits below, otherwise: LGTM! ;)

libcoap-sys/build.rs Show resolved Hide resolved
libcoap/src/message/mod.rs Outdated Show resolved Hide resolved
libcoap/src/message/mod.rs Outdated Show resolved Hide resolved
pulsastrix and others added 12 commits July 2, 2024 15:24
…DTLS

- using mbedtls or tinydtls will no longer force usage of the vendored
  library version of mbedtls-sys-auto/tinydtls-sys by default
- remove dependency on gnutls-sys crate as it is unmaintained, we now
  handle linking to gnutls ourselves
- mbedtls-sys-auto is only used if mbedtls should be vendored, as the
  crate doesn't allow for disabling vendoring independently and doesn't
  support mbedtls >= 3.0.0
  (see fortanix/rust-mbedtls#320)
- in order to use the vendored versions of DTLS crate, you now have to
  enable the `dtls_backend_[BACKEND]_vendored` feature of libcoap-sys
  (or the `dtls_[BACKEND]_vendored` feature of libcoap-rs)
Before libcoap 4.3.5, coap_send_rst was inlined, which is why we had to
reimplement it, as bindgen didn't generate bindings for it.
@pulsastrix pulsastrix force-pushed the add_vendored_features_for_dtls branch from 81f588b to 5b47b8f Compare July 2, 2024 13:29
@pulsastrix pulsastrix merged commit 03f50f2 into main Jul 2, 2024
13 checks passed
@pulsastrix pulsastrix deleted the add_vendored_features_for_dtls branch July 2, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants