Skip to content

Commit cfbac40

Browse files
committed
refactor!: update libdave submodule, include licenses
The upstream libdave repo received a bunch of refactors almost exclusively for the C API, which we as non-C-API consumers must now unfortunately deal with. Notable upstream changes include: - `src/dave/*` was moved to `src/*`, and the includes were set to private, which means we now manually include this path and adjust the include names. it's not pretty, but what can you do. - The openssl/mlspp links were changed to `PRIVATE`, but we need access to mlspp, so they were changed back to public. This doesn't affect the end result whatsoever, but makes it a tiny bit easier to just reuse that logic.
1 parent 4d85c28 commit cfbac40

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ nanobind_add_stub(
8383

8484

8585
# Link libdave
86+
set(INSTALL_VCPKG_LICENSES ON)
8687
add_subdirectory(${LIBDAVE_SRC_PATH})
88+
89+
target_include_directories(_dave_impl PRIVATE "${LIBDAVE_SRC_PATH}/src")
8790
target_link_libraries(_dave_impl PRIVATE libdave)
8891

8992
# Install library and stub file in wheel

libdave

Submodule libdave updated 76 files

src/dave.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <dave/common.h>
1+
#include <dave/version.h>
22

33
#include "binding_core.hpp"
44
#include "logging.hpp"
@@ -22,9 +22,6 @@ NB_MODULE(_dave_impl, m) {
2222

2323
m.doc() = "Python bindings to the C++ impl of Discord's DAVE protocol";
2424

25-
m.attr("INIT_TRANSITION_ID") = dave::kInitTransitionId;
26-
m.attr("DISABLED_VERSION") = dave::kDisabledVersion;
27-
2825
nb::enum_<dave::MediaType>(m, "MediaType", nb::is_arithmetic(), "")
2926
.value("audio", dave::MediaType::Audio, "")
3027
.value("video", dave::MediaType::Video, "");

src/decryptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include <dave/decryptor.h>
21
#include <dave/logger.h>
2+
#include <decryptor.h>
33

44
#include "binding_core.hpp"
55

src/encryptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include <dave/encryptor.h>
21
#include <dave/logger.h>
2+
#include <encryptor.h>
33

44
#include "binding_core.hpp"
55

src/session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <dave/mls/session.h>
1+
#include <mls/session.h>
22

33
#include "binding_core.hpp"
44
#include "utils.hpp"

src/signature_key_pair.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <dave/mls/parameters.h>
1+
#include <mls/parameters.h>
22

33
#include "binding_core.hpp"
44

0 commit comments

Comments
 (0)