Skip to content

Release 1.2.0 #25

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 665 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
665 commits
Select commit Hold shift + click to select a range
b368c47
Drop 'not found' nodes immediately, additional PR feedback tweaks
mpretty-cyro Aug 8, 2024
5a2bb15
Merge pull request #97 from Bilb/fix-allow-child-class-wrappers
jagerman Aug 11, 2024
cae3fb6
fix: make FULL_URL_MAX_LENGTH a constexpr and not such static const
Bilb Aug 11, 2024
995e22d
Merge pull request #98 from Bilb/fix/constexpr-full-url
jagerman Aug 11, 2024
2966cc3
Split the resume_queues function and fixed broken tests
mpretty-cyro Aug 13, 2024
bdfa6fd
Updated libquic submodule
mpretty-cyro Aug 13, 2024
fd218a9
Fixed a bug and the broken tests
mpretty-cyro Aug 14, 2024
3650fdc
Fixed a couple of bugs
mpretty-cyro Aug 15, 2024
1967646
Fixed a build error
mpretty-cyro Aug 15, 2024
ecba02b
Fixed a few bugs found when testing
mpretty-cyro Aug 15, 2024
cc539e3
Updated decrypt_ons_response to support decrypting legacy ONS values
mpretty-cyro Aug 19, 2024
116256a
Merge remote-tracking branch 'origin/fix/add-legacy-ons-decryption' i…
mpretty-cyro Aug 19, 2024
3e584f8
Updated logic to keep dropped paths around until their requests finish
mpretty-cyro Aug 20, 2024
0ce9762
Fixed a bug with the C API ONS lookup function
mpretty-cyro Aug 21, 2024
de6f226
Merge remote-tracking branch 'origin/fix/add-legacy-ons-decryption' i…
mpretty-cyro Aug 21, 2024
8c3bd7e
Ran formatter, fixed array size issue
mpretty-cyro Aug 21, 2024
3798669
Merge remote-tracking branch 'origin/fix/add-legacy-ons-decryption' i…
mpretty-cyro Aug 21, 2024
faec15a
Fixed issue breaking tests when testnet is busted, fixed some CI warn…
mpretty-cyro Aug 21, 2024
ba7919d
Exposes functions to clear the oxen::log sinks
mpretty-cyro Aug 21, 2024
af0ab99
Updated the docs for legacy group decrypt function to reduce misuse
mpretty-cyro Aug 23, 2024
2bf8c81
Reverted 64-byte legacy group secret key decryption (only need 32 bytes)
mpretty-cyro Aug 27, 2024
de7d8a6
Fixed an incorrect size for the curve25519 secret key
mpretty-cyro Aug 29, 2024
12df14a
Updated libQuic and cleaned up 'wrap_exceptions' usage
mpretty-cyro Sep 4, 2024
e1a76eb
Added a function to compute a message hash
mpretty-cyro Sep 5, 2024
ac34aa2
Added code to calculate swarms locally instead of fetching
mpretty-cyro Sep 6, 2024
c3aa3b9
Added a timeout mechanism which takes the path build time into account
mpretty-cyro Sep 6, 2024
1d20f5e
Improvements to attachment upload/download behaviours
mpretty-cyro Sep 6, 2024
789f9f6
Expose response headers in network request functions
mpretty-cyro Sep 9, 2024
1188aaf
Tweaks to try to fix CI errors
mpretty-cyro Sep 9, 2024
2f81c69
Another tweak for CI errors
mpretty-cyro Sep 9, 2024
6bc86ad
Further tweaks to make CI happy
mpretty-cyro Sep 9, 2024
6a1ab51
More CI platform specific tweaks
mpretty-cyro Sep 9, 2024
12ed513
Another tweak for CI test build issues
mpretty-cyro Sep 9, 2024
f3f273c
Fixed a cache refresh bug, logging tweaks, CI build tweaks
mpretty-cyro Sep 10, 2024
c057cd9
Fixed a bug with onion_path pending requests func and logging tweaks
mpretty-cyro Sep 12, 2024
f19df11
Reverted change causing test crashes on CI, tweak for 32-bit CI error
mpretty-cyro Sep 12, 2024
776bac0
Fixed up the iOS build script
mpretty-cyro Sep 20, 2024
7102408
Fixed a C API bug with the INVITE_NOT_SENT member status
mpretty-cyro Oct 2, 2024
e0316db
Merge branch 'fix/group-member-status-bug' into libquic
mpretty-cyro Oct 2, 2024
e2d35df
Merge pull request #101 from mpretty-cyro/fix/group-member-status-bug
jagerman Oct 3, 2024
10f15ae
Added a function to retrieve the current snode cache size
mpretty-cyro Oct 7, 2024
5ce7e4d
Add blind version signing for a generic request
Aerilym Oct 24, 2024
3a4eb57
Change body hash to body
Aerilym Oct 24, 2024
7f5faca
Create headers for blind version signing
Aerilym Oct 28, 2024
e73c72a
blind_version_sign_request C API and CPP test
tewinget Oct 28, 2024
01b97f7
more correct string reserve, also lint
tewinget Oct 29, 2024
5685948
use string_view instead of ustring_view where reasonable
tewinget Oct 31, 2024
a5ea057
size_t -> uint64_t in C API in a couple places (timestamp)
tewinget Oct 31, 2024
2593214
feat: add is_destroyed flag to UserGroupsConfig
Bilb Nov 6, 2024
82526fc
fix: merge kicked & destroyed group status into removed_status
Bilb Nov 7, 2024
278183d
Merge pull request #1 from Bilb/feat/destroy-flag-on-usergroup
Bilb Nov 12, 2024
c422ccb
chore: fix comment for blind_version_key_pair returning a seed
Bilb Nov 15, 2024
48f769e
Make windows-x86 static "allow fail"
jagerman Nov 15, 2024
0f86849
Merge pull request #4 from Aerilym/blind_version_sign_request
jagerman Nov 15, 2024
43c2d44
chore: replace oxen-io urls with session-foundation
Bilb Nov 13, 2024
c29c934
Merge pull request #2 from Bilb/move-to-session-foundation
Bilb Nov 17, 2024
06fe06e
Consolidated the group member status read funcs into an enum
mpretty-cyro Nov 22, 2024
cd5bc85
Fixed a couple of typos
mpretty-cyro Nov 22, 2024
bc0a2a6
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Nov 22, 2024
010c4c5
Fixed some inconsistently naming, added C API group_member_status
mpretty-cyro Nov 25, 2024
a651590
Fixed another silly typo
mpretty-cyro Nov 25, 2024
c679fbf
Merge pull request #5 from mpretty-cyro/feature/consolidated_group_me…
mpretty-cyro Nov 25, 2024
4f5a4a8
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Nov 25, 2024
1cac850
fix: member::status() can be marked as const
Bilb Nov 25, 2024
1ed9170
Merge pull request #7 from Bilb/fix-status-is-const
jagerman Nov 25, 2024
c1c915e
Added a missing C func
mpretty-cyro Nov 26, 2024
f87d88b
Added a couple missing function definitions to a C header
mpretty-cyro Nov 26, 2024
fcbe015
Merge pull request #8 from mpretty-cyro/fix/add-missing-c-func
Bilb Nov 26, 2024
5058514
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Nov 26, 2024
0e9f301
Split set_invited func, renamed some constants, renamed some functions
mpretty-cyro Nov 28, 2024
a37b19d
Update include/session/config/groups/members.hpp
mpretty-cyro Nov 28, 2024
43b1c6c
Merge pull request #10 from mpretty-cyro/group-function-standardisation
mpretty-cyro Nov 28, 2024
106c12d
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Dec 10, 2024
c79507d
Initial version of the `local_pending_send` flag
mpretty-cyro Dec 11, 2024
0047e1b
extra_data: use dict producer/consumer
jagerman Dec 11, 2024
d7abf75
Addressed code feedback
mpretty-cyro Dec 11, 2024
aa0f75b
Fixed a couple of build issues
mpretty-cyro Dec 11, 2024
a252c7e
Further tweaks for CI errors
mpretty-cyro Dec 11, 2024
3298310
Added the C header changes I had missed
mpretty-cyro Dec 11, 2024
e34519d
Yet another change I missed bringing across
mpretty-cyro Dec 11, 2024
fef8e3d
Function change for CI error
mpretty-cyro Dec 11, 2024
894ca52
Fixed some broken tests, fixed a bug with erasing a member
mpretty-cyro Dec 12, 2024
f11f1ba
Add two-step ConfigBase init via default-ctor+init()
jagerman Dec 16, 2024
b7427ae
use single letter for keys dump()
Bilb Dec 17, 2024
a4ac5db
add pending_state get/set and fix unit tests
Bilb Dec 17, 2024
f10026f
set_pending_send marks config as needing dump on change
Bilb Dec 17, 2024
f12b91b
Merge pull request #3 from Bilb/feature/local_members_sending_state
mpretty-cyro Dec 17, 2024
774985d
Merge remote-tracking branch 'origin/feature/local_members_sending_st…
mpretty-cyro Dec 17, 2024
5049cb0
chore: fixed some typo
Bilb Dec 19, 2024
8ab2cc3
chore: run ./utils/format.sh
Bilb Dec 19, 2024
5806b91
Merge pull request #12 from mpretty-cyro/feature/local_members_sendin…
stfsession Dec 19, 2024
7dfe790
feat: allow to mark a member invite state as not sent
Bilb Dec 19, 2024
3959cd3
Merge pull request #16 from Bilb/allow-mark-not-sent
stfsession Dec 19, 2024
3ee3db8
Added C API for new `set_invite_not_sent` function
mpretty-cyro Jan 5, 2025
b1bd153
Merge pull request #18 from mpretty-cyro/fix/add-missing-c-api
stfsession Jan 6, 2025
ce94486
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Jan 6, 2025
b84af1d
Fix compatibility with newer oxenc; add oxen-logging
jagerman Dec 3, 2024
0979cde
Add support for large, multi-part config messages
jagerman Dec 10, 2024
b375498
fix: build on sid with clang-17
Bilb Jan 7, 2025
bf7c010
Fixed an incorrect variable
mpretty-cyro Jan 9, 2025
8762e9d
Merge pull request #20 from Bilb/fix-build-sid-clang
jagerman Jan 16, 2025
b57c8a5
Added a bugfix to prevent removing the current hash incorrectly and r…
mpretty-cyro Jan 19, 2025
9746807
Applied some old PR feedback changes
mpretty-cyro Feb 6, 2025
20c8240
Added a missing default value to the new Builder constructor
mpretty-cyro Feb 6, 2025
9935bbe
Fixed a couple of issues with the `random_base32` function
mpretty-cyro Feb 10, 2025
287f117
CI build error fixes #1
mpretty-cyro Feb 10, 2025
511d412
Updated the Ci instructions to use the local mirror on all pipelines
mpretty-cyro Feb 13, 2025
13d9628
Merge pull request #22 from mpretty-cyro/feature/use-local-mirror-eve…
mpretty-cyro Feb 13, 2025
a194216
Added the local mirror to the specific platform scripts
mpretty-cyro Feb 13, 2025
06e67ec
Merge pull request #23 from mpretty-cyro/fix/local-missor-missing-fro…
jagerman Feb 13, 2025
486a2b9
Add implicit group pubkey to group signature
jagerman Feb 12, 2025
730c5b9
Merge pull request #21 from jagerman/group-implicit-pubkey
mpretty-cyro Feb 13, 2025
53394ee
Fixed the logging tests on macOS ARM64
mpretty-cyro Feb 13, 2025
4651fe1
Merge remote-tracking branch 'upstream/dev' into libquic
mpretty-cyro Feb 13, 2025
7289475
Removed an unneeded _old_hashes.erase
mpretty-cyro Feb 14, 2025
e22f8bb
Updated the clang format version
mpretty-cyro Feb 14, 2025
6e9aa20
Changed the byte limit for the groups description to 600
mpretty-cyro Feb 18, 2025
1ce161d
Updated the 'drone-format-verify.sh' to also use clang-format-17
mpretty-cyro Feb 18, 2025
6b0cbbc
feat: forgive timestamps provided as ms/μs
Bilb Dec 12, 2024
e2c64d3
chore: rename to_seconds to to_epoch_seconds
Bilb Feb 21, 2025
1e92a9e
Reduced the GroupKeys padding from 75 members to 45 to fit in a PN
mpretty-cyro Feb 21, 2025
82be3ae
Seems like the logging differences might be specific to the clang ver…
mpretty-cyro Feb 21, 2025
743600a
Merge pull request #6 from mpretty-cyro/libquic
mpretty-cyro Feb 24, 2025
711d9af
Added missing import and disable network logging tests
mpretty-cyro Feb 24, 2025
c45ca57
fix: use correct type from chrono duration count()
Bilb Feb 24, 2025
00ef03c
Merge pull request #24 from mpretty-cyro/fix/msvc-builds
KeeJef Feb 24, 2025
93da4d4
Merge pull request #13 from Bilb/fix-timestamp-always-seconds
KeeJef Feb 24, 2025
d9d8a41
Tweaks to the iOS build script for more control over packaging process
mpretty-cyro Feb 25, 2025
4ccb5ef
Merge pull request #27 from mpretty-cyro/update-ios-build-script
mpretty-cyro Feb 25, 2025
a92dcd3
Mistake in ios.sh
mpretty-cyro Feb 26, 2025
d660b40
Merge pull request #28 from mpretty-cyro/update-ios-build-script
mpretty-cyro Feb 26, 2025
beb9106
Added a couple of unit tests to validate the merge bug fixes
mpretty-cyro Mar 4, 2025
0f18962
Add logging options and initialization to test suite
jagerman Mar 4, 2025
591e696
Add detailed debug logging to ConfigBase::_merge
jagerman Mar 4, 2025
908f533
Deprioritize current config when no current hash
jagerman Mar 4, 2025
0fa96e0
Updated the test to ensure obsolete merges still don't impact the cur…
mpretty-cyro Mar 4, 2025
0354edf
Explicitly set the log level for the test logging categories
mpretty-cyro Mar 4, 2025
ad2bb91
Fixed broken tests, fix typo, added log_level_raiser/log_level_lowerer
mpretty-cyro Mar 5, 2025
386924e
Move logging into its own binary to avoid log level/sink interference
jagerman Mar 5, 2025
3eb9eb7
Merge pull request #31 from mpretty-cyro/curr-hash-bug-tests
mpretty-cyro Mar 5, 2025
ecebd4a
Bumped version number and ran formatter
mpretty-cyro Mar 5, 2025
20d7275
Merge pull request #32 from mpretty-cyro/version-number-change
mpretty-cyro Mar 5, 2025
6843aef
Updated to the latest stable libQuic, Retyped the networking code
mpretty-cyro Feb 25, 2025
7c394ef
Fix missing headers
jagerman Feb 25, 2025
b163a14
Add missing static-deps include directory
jagerman Feb 26, 2025
e3f6f13
Fixed an issue where snode requests would fail due to compiler optimi…
mpretty-cyro Feb 27, 2025
dad34c3
Removed the {b/c/u}span custom types and made them explicit spans
mpretty-cyro Mar 10, 2025
1a4d146
fix: missing missing input statements in docstrings
yougotwill Mar 14, 2025
b5dafc0
feat: refactor folder structure for mkdocs
yougotwill Mar 14, 2025
f2d78cd
feat: added README
yougotwill Mar 14, 2025
0b0fac7
feat: use mkdocs to build api sites in dist folder
yougotwill Mar 14, 2025
a81cb1d
feat: restructured make commands to build, serve, and dev within the …
yougotwill Mar 14, 2025
968115a
feat: update mkdocs configuration and add KaTeX support for math rend…
yougotwill Mar 14, 2025
9b4e93c
feat: moved and updated README
yougotwill Mar 14, 2025
f125f80
feat: added requirements.txt
yougotwill Mar 14, 2025
931df61
feat: add config merge logic doc to api websites
yougotwill Mar 14, 2025
0832145
feat: added back search bar
yougotwill Mar 14, 2025
cf4d4f4
feat: disable mdx files from being committed
yougotwill Mar 14, 2025
f3ead39
fix: remove arguments from api comments in group info
yougotwill Mar 17, 2025
b17462f
fix: build-all command
yougotwill Mar 17, 2025
c6dc517
feat: auto generate table of contents
yougotwill Mar 17, 2025
0a4e3e4
feat: updated drone api task
yougotwill Mar 17, 2025
fc5e6b4
feat: adjusted content and right sidebar widths
yougotwill Mar 17, 2025
36f3b28
feat: added copyright
yougotwill Mar 17, 2025
1faf516
fix: using virtual environment for installing deps
yougotwill Mar 17, 2025
3e8b6f1
fix: remove pip upgrade step
yougotwill Mar 17, 2025
9e2306b
fix: use python3 alias
yougotwill Mar 17, 2025
60233a9
feat: install system wide python venv package
yougotwill Mar 17, 2025
aa30d07
Updated to the latest libQuic
mpretty-cyro Mar 17, 2025
9b066d1
fix: make sure to make the venv inside the correct directory
yougotwill Mar 17, 2025
d3b42b3
fix: source venv activiate using dot which is POSIX-compliant
yougotwill Mar 17, 2025
14b294d
feat: move venv ignore into docs api folder
yougotwill Mar 17, 2025
5f96d86
fix: dev-c make command
yougotwill Mar 17, 2025
099e351
fix: revert triggering api docs in drone unless we are pushing to dev
yougotwill Mar 17, 2025
b9823cc
Bump libquic to silence gcc stringop warnings
jagerman Mar 17, 2025
44d2b7f
Fix inconsistency with == and inequalities
jagerman Mar 17, 2025
086a310
Fixed broken logging test
mpretty-cyro Mar 17, 2025
54a11f7
Debug macOS release logging issue on CI
mpretty-cyro Mar 18, 2025
9636d5a
Updated logs for Apple Release builds (as they are different for some…
mpretty-cyro Mar 18, 2025
328e201
Retyped code to use vector & span instead of ustring & ustring_view
mpretty-cyro Mar 20, 2025
7428724
Fixed some CI errors due to missing imports
mpretty-cyro Mar 20, 2025
99b931c
Moved the vector include into types.hpp
mpretty-cyro Mar 20, 2025
382fc9c
Shifted imports around again
mpretty-cyro Mar 20, 2025
db030ec
Disable -Werror for buggy GCC stringop warnings
mpretty-cyro Mar 20, 2025
01d82ad
Got fed up and included vector everywhere we include array
mpretty-cyro Mar 20, 2025
0ccec22
Another include
mpretty-cyro Mar 20, 2025
a0714cc
Fixed a couple more CI issues
mpretty-cyro Mar 20, 2025
d1e08b2
Fixed a couple more basic_string_view uses
mpretty-cyro Mar 20, 2025
765753f
Fixed an error due to static analysis of a test
mpretty-cyro Mar 20, 2025
d94496b
Updated includes to fix build error due to new version of fmt
mpretty-cyro Mar 24, 2025
f207b8d
Updated to the latest libQuic
mpretty-cyro Mar 25, 2025
e877f08
Updates to support the latest oxen-encoding changes
mpretty-cyro Mar 27, 2025
2b22fe5
Updated formatter to clang-19
mpretty-cyro Mar 27, 2025
bfdff66
Added a header causing Desktop build issues
mpretty-cyro Mar 27, 2025
8f40960
Removed the <=> operator from service_node
mpretty-cyro Apr 1, 2025
90720c7
fix: zstd cmake_minimum_required is 2.8, but not supported anymore
Bilb Apr 1, 2025
a17b49f
Updated to the latest libQuic, ran the formatter
mpretty-cyro Apr 1, 2025
c6b12b2
Replaced oxenc::variant usages with stl <variant>
mpretty-cyro Apr 1, 2025
7aa6eb4
Fix the logging tests
mpretty-cyro Apr 1, 2025
16cf02e
Ran the formatter...
mpretty-cyro Apr 1, 2025
35e300d
Merge pull request #38 from Bilb/fix-zstd-cmake-build-issue
jagerman Apr 2, 2025
e5f5efb
Updated to the latest libQuic
mpretty-cyro Apr 3, 2025
dddc537
Updated version number to `1.3.0`
mpretty-cyro Apr 3, 2025
b52ebfe
Fixed a couple of incorrect 'LIBSESSION_WARN_UNUSED' usages
mpretty-cyro Apr 3, 2025
e2eed34
Merge pull request #26 from mpretty-cyro/feature/updated-libquic
mpretty-cyro Apr 3, 2025
96d0d77
docs: update README to include documentation writing guidelines
yougotwill Apr 3, 2025
369adf7
Updated the network tests to talk to a local callback
mpretty-cyro Mar 12, 2025
e7f0cbf
Updates for the de-network changes in libQuic
mpretty-cyro Mar 23, 2025
c487e40
Updates for the latest de-network branch changes
mpretty-cyro Mar 28, 2025
969b008
Fixed an infinite loop when refreshing the snode cache
mpretty-cyro Apr 4, 2025
5766c7a
Updated the version number to 1.3.1
mpretty-cyro Apr 4, 2025
77c4845
Changed the 'static macOS' build to 'arm64'
mpretty-cyro Apr 4, 2025
795b47a
Disabled MTU discovery & C API tweaks
mpretty-cyro Apr 7, 2025
25beeed
Ran the formatter...
mpretty-cyro Apr 7, 2025
201b37f
Merge pull request #39 from mpretty-cyro/fix/snode-cache-rebuild-infi…
mpretty-cyro Apr 7, 2025
5e2344a
Merge pull request #34 from yougotwill/feat/no-ref/mkdocs_material_mi…
KeeJef Apr 7, 2025
1309b32
fix: update comment for clarity in config message example test
yougotwill Apr 7, 2025
7d6f84d
Merge pull request #40 from yougotwill/fix/no-ref/config_merge_doc_test
KeeJef Apr 7, 2025
faf931c
Renaming 'network' to 'session_network' because xcode can't debug
mpretty-cyro Apr 9, 2025
c7b6ff7
Added general xchacha20 encrypt/decrypt functions, doc tweaks
mpretty-cyro Apr 9, 2025
820c82f
Added a unit test
mpretty-cyro Apr 9, 2025
0579f5c
Merge branch 'dev' into multipart
mpretty-cyro Apr 11, 2025
77d412f
Updated to the latest libQuic
mpretty-cyro Apr 13, 2025
79c7eaa
Ran the formatter
mpretty-cyro Apr 13, 2025
199d68f
Merge pull request #41 from mpretty-cyro/fix/xcode-debugger-name-coll…
mpretty-cyro Apr 14, 2025
80d894b
Ran the formatter
mpretty-cyro Apr 14, 2025
6c1d5d6
Merge pull request #42 from mpretty-cyro/feature/xchacha20-functions
mpretty-cyro Apr 14, 2025
a4d65ca
Extended durations of eventually/always tests, fixed crashing test
mpretty-cyro Apr 14, 2025
fe4eade
Merge remote-tracking branch 'upstream/dev' into fix/local-target-for…
mpretty-cyro Apr 14, 2025
29372ac
Merge remote-tracking branch 'upstream/dev' into multipart
mpretty-cyro Apr 14, 2025
5d3e100
Fixed C API size calculation
mpretty-cyro Apr 14, 2025
8760192
Add test case trace logger from libquic
jagerman Apr 14, 2025
31eed7e
Speed up huge contacts test with fake session ids
jagerman Apr 14, 2025
8e1671c
More useful test error on network timeout
jagerman Apr 14, 2025
e2722dc
formatting
jagerman Apr 14, 2025
cd827ba
multiparts: use ordered map for internal storage
jagerman Apr 14, 2025
6e80220
Updated to the latest libQuic
mpretty-cyro Apr 14, 2025
15a885f
PR comments
mpretty-cyro Apr 14, 2025
f489fc7
Removed some unneeded `mutable` usage in lambdas
mpretty-cyro Apr 14, 2025
2510db6
Refactored the 'EVENTUALLY' and 'ALWAYS' logic for networking tests
mpretty-cyro Apr 15, 2025
650dc3c
Ran the formatter...
mpretty-cyro Apr 15, 2025
5fb3995
Merge pull request #33 from mpretty-cyro/fix/local-target-for-network…
mpretty-cyro Apr 15, 2025
530879e
Merge remote-tracking branch 'upstream/dev' into multipart
mpretty-cyro Apr 15, 2025
ca53f1b
Bumped version to 1.4.0
mpretty-cyro Apr 15, 2025
3f71894
Merge pull request #11 from jagerman/multipart
mpretty-cyro Apr 15, 2025
0381192
Renamed current_hashes on GroupKeys to active_hashes for consistency
mpretty-cyro Apr 15, 2025
cb84438
Formatter
mpretty-cyro Apr 15, 2025
95b9fe7
Merge pull request #43 from mpretty-cyro/fix/rename_keys_current_hashes
mpretty-cyro Apr 15, 2025
4f79933
chore: make cppcheck happy in ed25519 sign
Bilb Apr 24, 2025
6df5dcb
Merge pull request #46 from Bilb/fix-cpp-check-vector
jagerman 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
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SpacesInAngles: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: c++17
Standard: c++20
UseTab: Never
SortIncludes: true
ColumnLimit: 100
Expand Down
157 changes: 104 additions & 53 deletions .drone.jsonnet

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/build*/
/compile_commands.json
/.cache/
/.vscode/
.DS_STORE
17 changes: 13 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "external/oxen-encoding"]
path = external/oxen-encoding
url = https://github.com/oxen-io/oxen-encoding.git
[submodule "external/libsodium-internal"]
path = external/libsodium-internal
url = https://github.com/jagerman/libsodium-internal.git
url = https://github.com/session-foundation/libsodium-internal.git
[submodule "tests/Catch2"]
path = tests/Catch2
url = https://github.com/catchorg/Catch2
Expand All @@ -13,3 +10,15 @@
[submodule "external/zstd"]
path = external/zstd
url = https://github.com/facebook/zstd.git
[submodule "external/nlohmann-json"]
path = external/nlohmann-json
url = https://github.com/nlohmann/json.git
[submodule "external/oxen-libquic"]
path = external/oxen-libquic
url = https://github.com/oxen-io/oxen-libquic.git
[submodule "external/protobuf"]
path = external/protobuf
url = https://github.com/protocolbuffers/protobuf.git
[submodule "external/oxen-logging"]
path = external/oxen-logging
url = https://github.com/oxen-io/oxen-logging.git
97 changes: 81 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.13...3.23)
cmake_minimum_required(VERSION 3.14...3.23)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Has to be set before `project()`, and ignored on non-macos:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "macOS deployment target (Apple clang only)")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "macOS deployment target (Apple clang only)")

set(LANGS C CXX)
find_program(CCACHE_PROGRAM ccache)
Expand All @@ -16,12 +16,16 @@ if(CCACHE_PROGRAM)
endforeach()
endif()


project(libsession-util
VERSION 1.1.0
VERSION 1.4.0
DESCRIPTION "Session client utility library"
LANGUAGES ${LANGS})

message(STATUS "${PROJECT_NAME} v${PROJECT_VERSION}")

set(LIBSESSION_LIBVERSION ${PROJECT_VERSION})

include(GNUInstallDirs)

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

Expand All @@ -36,29 +40,50 @@ else()
endif()


set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)

set(default_static_libstd OFF)
if(WIN32)
set(default_static_libstd ON)
endif()

if(MINGW OR ANDROID OR IOS OR STATIC_BUNDLE)
set(use_lto_default OFF)
option(BUILD_SHARED_LIBS "Build as shared library" OFF)

if(BUILD_SHARED_LIBS)
set(static_default OFF)
else()
set(use_lto_default ON)
set(static_default ON)
endif()

option(BUILD_STATIC_DEPS "Build all dependencies statically rather than trying to link to them on the system" ${static_default})
option(STATIC_BUNDLE "Build a single static .a containing everything (both code and dependencies)" ${static_default})

if(BUILD_SHARED_LIBS OR libsession_IS_TOPLEVEL_PROJECT)
set(install_default ON)
else()
set(install_default OFF)
endif()

option(LIBSESSION_INSTALL "Install libsession-util libraries and headers to cmake install target; defaults to ON if BUILD_SHARED_LIBS is enabled or when building the top-level project" ${install_default})

if(MINGW OR ANDROID OR IOS) # OR STATIC_BUNDLE)
set(use_lto_default OFF)
else()
set(use_lto_default ON)
endif()

option(WARNINGS_AS_ERRORS "Treat all compiler warnings as errors" OFF)

option(STATIC_LIBSTD "Statically link libstdc++/libgcc" ${default_static_libstd})
option(STATIC_BUNDLE "Build a single static .a containing everything (both code and dependencies)" OFF)
option(BUILD_SHARED_LIBS "Build as shared library" OFF)

option(USE_LTO "Use Link-Time Optimization" ${use_lto_default})

# Provide this as an option for now because GMP and Desktop are sometimes unhappy with each other.
option(ENABLE_ONIONREQ "Build with onion request functionality" ON)

if(USE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_ENABLED OUTPUT ipo_error)
Expand Down Expand Up @@ -86,23 +111,40 @@ if(STATIC_LIBSTD)
endif()
endif()

include(AddStaticBundleLib)

# Always build PIC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)


add_subdirectory(external)

if(ENABLE_ONIONREQ)
if(NOT TARGET nettle::nettle)
if(BUILD_STATIC_DEPS)
message(FATAL_ERROR "Internal error: nettle::nettle target (expected via libquic BUILD_STATIC_DEPS) not found")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(NETTLE REQUIRED IMPORTED_TARGET nettle)
add_library(nettle INTERFACE)
target_link_libraries(nettle INTERFACE PkgConfig::NETTLE)
add_library(nettle::nettle ALIAS nettle)
endif()
endif()
endif()

add_subdirectory(src)
add_subdirectory(proto)

if (BUILD_STATIC_DEPS)
include(StaticBuild)
endif()

if(STATIC_BUNDLE)

include(combine_archives)

combine_archives(session-util
crypto
config
version
libsodium::sodium-internal
libzstd_static)
combine_archives(session-util libsession-static-bundle "${LIBSESSION_STATIC_BUNDLE_LIBS}")
set(lib_folder lib)
if(IOS)
set(lib_folder "${lib_folder}-${ARCH}")
Expand All @@ -117,3 +159,26 @@ option(WITH_TESTS "Enable unit tests" ${libsession_IS_TOPLEVEL_PROJECT})
if(WITH_TESTS)
add_subdirectory(tests)
endif()


if(LIBSESSION_INSTALL)

install(
TARGETS ${libsession_export_targets}
EXPORT libsessionConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(DIRECTORY include/session DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PATTERN *.h PATTERN *.hpp)

set(libsession_target_links)
foreach(tgt ${libsession_export_targets})
set(libsession_target_links "${libsession_target_links} -lsession-${tgt}")
endforeach()
configure_file(libsession-util.pc.in libsession-util.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libsession-util.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

endif()
36 changes: 36 additions & 0 deletions cmake/AddStaticBundleLib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

set(LIBSESSION_STATIC_BUNDLE_LIBS "" CACHE INTERNAL "list of libs to go into the static bundle lib")

function(_libsession_static_bundle_append tgt)
list(APPEND LIBSESSION_STATIC_BUNDLE_LIBS "${tgt}")
set(LIBSESSION_STATIC_BUNDLE_LIBS "${LIBSESSION_STATIC_BUNDLE_LIBS}" CACHE INTERNAL "")
endfunction()

# Call as:
#
# libsession_static_bundle(target [target2 ...])
#
# to append the given target(s) to the list of libraries that will be combined to make the static
# bundled libsession-util.a.
function(libsession_static_bundle)
foreach(tgt IN LISTS ARGN)
if(TARGET "${tgt}" AND NOT "${tgt}" IN_LIST LIBSESSION_STATIC_BUNDLE_LIBS)
get_target_property(tgt_type ${tgt} TYPE)

if(tgt_type STREQUAL STATIC_LIBRARY)
message(STATUS "Adding ${tgt} to libsession-util bundled library list")
_libsession_static_bundle_append("${tgt}")
endif()

if(tgt_type STREQUAL INTERFACE_LIBRARY)
get_target_property(tgt_link_deps ${tgt} INTERFACE_LINK_LIBRARIES)
else()
get_target_property(tgt_link_deps ${tgt} LINK_LIBRARIES)
endif()

if(tgt_link_deps)
libsession_static_bundle(${tgt_link_deps})
endif()
endif()
endforeach()
endfunction()
5 changes: 4 additions & 1 deletion cmake/GenVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ else()
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE)

if(git_tag)
if(git_tag AND git_tag MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+$")
message(STATUS "${git_commit} is tagged (${git_tag}); tagging version as 'release'")
set(vfull "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(PROJECT_VERSION_TAG "release")

if (NOT git_tag STREQUAL "${vfull}")
message(FATAL_ERROR "This commit is tagged, but the tag (${git_tag}) does not match the project version (${vfull})!")
endif()
elseif(git_tag)
message(WARNING "Did not recognize git tag (${git_tag}) for ${git_commit}; tagging with commit hash")
set(PROJECT_VERSION_TAG "${git_commit}")
else()
message(STATUS "Did not find a git tag for ${git_commit}; tagging version with the commit hash")
set(PROJECT_VERSION_TAG "${git_commit}")
Expand Down
Loading