Skip to content

snp quic #20

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

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1b02d30
snp quic
turuslan Feb 11, 2025
f67cf4e
ci
turuslan Feb 11, 2025
ed8eb71
ci
turuslan Feb 11, 2025
f7cf132
snp quic + rebase
turuslan Feb 12, 2025
8444b77
merge rebase
turuslan Feb 12, 2025
bffc90b
forward
turuslan Feb 17, 2025
e499d39
make_shared
turuslan Feb 17, 2025
95699a2
move
turuslan Feb 17, 2025
89f987b
weak
turuslan Feb 17, 2025
0c9f159
set coro thread
turuslan Feb 17, 2025
f742c39
coro yield
turuslan Feb 17, 2025
e814063
enum type
turuslan Feb 17, 2025
bbddad4
cppcodec macro
turuslan Feb 17, 2025
b12bdcd
numeric limits
turuslan Feb 17, 2025
856d7f4
if return
turuslan Feb 17, 2025
5bb57a4
likely
turuslan Feb 17, 2025
b853b9a
self from void
turuslan Feb 17, 2025
22699ad
example
turuslan Feb 17, 2025
ef17c47
sizeof
turuslan Feb 17, 2025
9814d46
rename
turuslan Feb 17, 2025
387193e
rename self
turuslan Feb 17, 2025
0bfb4fd
error text
turuslan Feb 17, 2025
b9d83cc
comment
turuslan Feb 17, 2025
90b06ab
comment
turuslan Feb 17, 2025
a34d339
comment
turuslan Feb 17, 2025
25c3e6d
variant get
turuslan Feb 17, 2025
6aa4b49
hash constraint
turuslan Feb 18, 2025
ad703ed
forward
turuslan Feb 18, 2025
749ee00
comment
turuslan Feb 18, 2025
34c487a
executor constraint
turuslan Feb 18, 2025
8e9d06e
optional
turuslan Feb 18, 2025
4c9e48b
revert optional
turuslan Feb 25, 2025
f5b2466
update qtils
turuslan Feb 26, 2025
927632c
soralog
turuslan Feb 26, 2025
e97ecc8
if
turuslan Feb 26, 2025
4572529
make shared
turuslan Feb 27, 2025
bb881b5
revert "make shared"
turuslan Feb 27, 2025
812e33f
port type
turuslan Mar 3, 2025
2eaf302
shutdown
turuslan Mar 3, 2025
5632697
remove
turuslan Mar 3, 2025
790ce87
log socket read/write error
turuslan Mar 3, 2025
7526bb9
Merge remote-tracking branch 'origin/master' into snp/quic
turuslan Mar 21, 2025
b932469
soralog constructor
turuslan Mar 31, 2025
7169543
build md
turuslan Mar 31, 2025
b4173f0
make shared private
turuslan Mar 31, 2025
5b679c7
rename
turuslan Mar 31, 2025
e8b2c10
rename
turuslan Apr 11, 2025
a22e48b
deprecated
turuslan Apr 23, 2025
4443997
singleton connection id counter
turuslan Apr 23, 2025
f40fcb4
CREATE_SHARED_METHOD
turuslan Apr 23, 2025
d6e0106
test
turuslan Apr 23, 2025
943204b
move file
turuslan Apr 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LINUX_PACKAGES="make \
curl \
git \
libtool \
nasm \
ninja-build \
pkg-config \
python3.12 \
Expand All @@ -22,7 +23,9 @@ MACOS_PACKAGES="make \
rust \
curl \
git \
go \
libtool \
nasm \
ninja \
pkg-config \
[email protected] \
Expand Down
7 changes: 7 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

```bash
brew install nasm # vcpkg liblsquic
```

`pip` can't install packages on MacOS.
Specify venv directory with `-D Python3_ROOT_DIR=$PWD/.venv` cmake flag.
28 changes: 19 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if (TESTING)
list(APPEND VCPKG_MANIFEST_FEATURES test)
endif ()

option(BUILD_EXAMPLES "Build examples" ON)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand All @@ -30,20 +32,24 @@ find_package(PkgConfig REQUIRED)
pkg_check_modules(libb2 REQUIRED IMPORTED_TARGET GLOBAL libb2)

find_package(Boost CONFIG REQUIRED COMPONENTS algorithm outcome program_options)
find_package(Boost.DI CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(yaml-cpp CONFIG REQUIRED)
find_package(jam_crust CONFIG REQUIRED)
find_package(lsquic CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)
find_package(qtils CONFIG REQUIRED)
find_package(scale CONFIG REQUIRED)
find_package(soralog CONFIG REQUIRED)
find_package(schnorrkel_crust CONFIG REQUIRED)
find_package(Boost.DI CONFIG REQUIRED)
find_package(qtils CONFIG REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)
find_package(soralog CONFIG REQUIRED)
find_package(yaml-cpp CONFIG REQUIRED)
find_package(ZLIB REQUIRED)

add_library(headers INTERFACE)
target_include_directories(headers INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src_>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
include(vcpkg-overlay/cppcodec.cmake)

include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}
)

add_subdirectory(src)
Expand All @@ -57,3 +63,7 @@ if (TESTING)
add_subdirectory(test-vectors)
add_subdirectory(tests)
endif ()

if (BUILD_EXAMPLES)
add_subdirectory(example)
endif ()
69 changes: 69 additions & 0 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
These features were rejected, don't suggest them again.

```c++
#define FORWARD(x) std::forward<decltype(x)>(x)
auto foo(auto &&x) {
bar(FORWARD(x));
}
```

```c++
#define MAKE_SHARED_(x_, ...) std::make_shared<decltype(x_)::element_type>(...)
struct Foo {
Foo() : MAKE_SHARED_(bar_, ...) {}
std::shared_ptr<Bar> bar_;
};
```

```c++
#define MAKE_SHARED_T(x) std::forward<decltype(x)>(x)
using Foo = std::shared_ptr<...>;
MAKE_SHARED_T(Foo, ...);
```

```c++
#define MOVE(x) x{std::move(x)}
auto lambda = [MOVE(x)]() {};
```

```c++
#define MOVE_(x) x##_{std::move(x)}
struct Foo {
Foo(Bar bar) : MOVE_(bar) {}
Bar bar_;
};
```

```c++
#define WEAK_SELF weak_self{weak_from_this()}
auto lambda = [WEAK_SELF]() {};
```

```c++
#define WEAK_LOCK(x) auto x = weak_##x.lock(); if (not x) return
auto lambda = [weak_self]() {
WEAK_LOCK(self);
...
};
```

```c++
class MakeSharedPrivate {
private:
MakeSharedPrivate() = default;
public:
static auto make() {
return MakeSharedPrivate{};
}
};
class Foo : public std::enable_shared_from_this<> {
public:
Foo(MakeSharedPrivate, ...);
static std::shared_ptr<Foo> factory(...) {
// `Foo` can call `MakeSharedPrivate` constructor
return std::make_shared<Foo>(MakeSharedPrivate::make(), ...);
}
};
// error, MakeSharedPrivate has private constructor
injector.create<std::shared_ptr<Foo>>();
```
7 changes: 7 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright Quadrivium LLC
# All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#

add_subdirectory(snp_chat)
7 changes: 4 additions & 3 deletions example/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ logging:
children:
- name: jam
children:
- name: injector
- name: application
- name: rpc
- name: injector
- name: metrics
- name: threads
- name: rpc
- name: snp
- name: threads
14 changes: 14 additions & 0 deletions example/snp_chat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright Quadrivium LLC
# All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#

add_executable(example_snp_chat
main.cpp
)
target_link_libraries(example_snp_chat
logger
snp
)

Loading
Loading