Skip to content

Commit

Permalink
Remove unneeded libraries; add in WolfSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
0xg0nz0 committed Feb 23, 2024
1 parent 8501446 commit d16b1a7
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 59 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
endif()

# set up library dependencies
find_package(benchmark CONFIG REQUIRED)
find_package(cpptoml CONFIG REQUIRED)
find_package(libuv CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(unofficial-sodium CONFIG REQUIRED)

# these do not correctly support CMake
find_path(SODIUM_INCLUDE_DIR sodium.h REQUIRED)
find_path(USOCKETS_INCLUDE_DIR libusockets.h REQUIRED)
find_library(USOCKETS_LIB uSockets REQUIRED)

add_library(
iggy
Expand Down
17 changes: 0 additions & 17 deletions fuzz/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions fuzz/pub_client.cc

This file was deleted.

14 changes: 0 additions & 14 deletions sdk/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,9 @@
#include <string>
#include <vector>

/* Loop wakeup handler */
void on_wakeup(struct us_loop_t* loop) {}

/* Loop pre iteration handler */
void on_pre(struct us_loop_t* loop) {}

/* Loop post iteration handler */
void on_post(struct us_loop_t* loop) {}

iggy::client::Client::Client(Options& options) {
// to make more natural interface for setting options we use a struct, so need to validate it.
options.validate();

// does nothing for now, but will be used to set up the client connection with uSockets
struct us_loop_t* loop = us_create_loop(0, on_wakeup, on_pre, on_post, 0);
us_loop_run(loop);
us_loop_free(loop);
}

void iggy::client::Client::ping() {
Expand Down
1 change: 0 additions & 1 deletion sdk/client.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include <libusockets.h>
#include <sodium.h>
#include <stdexcept>
#include <string>
Expand Down
6 changes: 0 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ if(BUILD_TESTS)
libuv::uv_a
reproc++
unofficial-sodium::sodium
${USOCKETS_LIB}
OpenSSL::SSL
OpenSSL::Crypto
)

add_executable(
Expand All @@ -49,9 +46,6 @@ if(BUILD_TESTS)
libuv::uv_a
reproc++
unofficial-sodium::sodium
${USOCKETS_LIB}
OpenSSL::SSL
OpenSSL::Crypto
)

include(GoogleTest)
Expand Down
12 changes: 2 additions & 10 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
{
"dependencies": [
"benchmark",
"cpptoml",
"fmt",
"icu",
"libsodium",
"nlohmann-json",
"libuv",
"reproc",
"spdlog",
{
"name": "usockets",
"features": [
"ssl"
]
}
"wolfssl"
]
}

0 comments on commit d16b1a7

Please sign in to comment.