Commit Graph

111 Commits

Author SHA1 Message Date
github-actions[bot] 81b1e4f634 chore: Release v0.2.21-rc.1
Pre-release for toxcore. Primarily, we now have an experimental network profiling callback.
2025-02-24 14:28:06 +00:00
iphydf a9bb3a1c4d chore: Fix alpine-s390x build. 2025-02-16 00:37:49 +00:00
iphydf 432ab60c00 feat: Add a Makefile for the single file deploy build.
This makefile is untested, so hope is the strategy here.
2025-02-15 09:44:40 +00:00
iphydf a86c0011fd chore: Add deploy job for single C file library. 2025-02-15 08:32:28 +00:00
iphydf a682da99e8 chore: Export wasmExports from the wasm binary.
This is needed by dart's wasm_ffi.
2025-02-10 13:21:10 +00:00
iphydf f1991aaa02 perf: Use stack allocation for strerror rendering. 2025-01-30 21:20:25 +00:00
iphydf 01932ea2f7 chore: Add opus and vpx to the toxcore wasm build. 2025-01-29 23:31:00 +00:00
iphydf c834472637 refactor: Move tox_log_level out into its own file.
Perhaps we can reuse it in the logger.
2025-01-26 12:05:18 +00:00
iphydf 8799bea76c cleanup: Mark events/dispatch headers as experimental.
We're already installing these, but they have been experimental all this
time. We should not install them until we're really done with them.
2025-01-25 22:53:09 +00:00
iphydf d4164edb54 refactor: Remove tox_types.h; use struct tags instead.
This header was a nice idea but causes a *lot* of pain with C++ modules.
2025-01-25 22:14:25 +00:00
iphydf d408c98209 refactor: Move Tox_Options to tox_options.h.
For backwards compatibility, we also `#include "tox_options.h"` in
`tox.h`, but in 0.3.0 we can break that so most toxcore client code
doesn't need the options, only the part that creates the instance.
2025-01-24 18:18:31 +00:00
iphydf 4f09f4e147 chore: Fix tsan build by moving it to GitHub CI.
In exchange, moved some github actions to circleci.
2024-12-11 13:12:58 +00:00
iphydf 6460c25c9e refactor: Use merge_sort instead of qsort for sorting. 2024-12-05 18:33:21 +00:00
iphydf 0204db6184 cleanup: Fix layering check warnings.
These warnings aren't available yet, but will be in a future
toktok-stack build.
2024-12-04 10:24:23 +00:00
Robin Linden 934a830111 chore: Release 0.2.20 2024-11-11 01:27:06 +01:00
iphydf 350c0ba120 cleanup: Sort apk/apt install commands in Dockerfiles.
CodeQL scanning is complaining about this.
2024-11-06 15:43:33 +00:00
Maxim Biro 51b24d1c23 chore: Run CompCert on the stable branch of libsodium
The master branch might include staging code that is subject to change,
e.g. code including VLAs, which CompCert does not support and thus would
fail on, which will be changed to not use VLAs once merged into the
stable branch.

See https://github.com/jedisct1/libsodium/pull/1188#issuecomment-2221660989
2024-07-13 09:56:50 -04:00
Maxim Biro cab1f7d522 chore: Update WineHQ's apt key hash 2024-07-13 09:00:26 -04:00
Robin Linden da438763d5 chore: Release 0.2.19 2024-03-27 23:29:16 +01:00
Maxim Biro b3c3c49d26 fix: Disable IPv6 in Windows cross-compilation tests
Docker doesn't have an IPv6 network by default, so these tests were
failing when using IPv6.
2024-03-04 19:26:37 -05:00
Maxim Biro e742deddff feat: Check hashes of Windows dependencies when cross-compiling
It's a disableable option since we allow the user to change versions of
dependencies and we obviously have hashes only for the default versions,
we are not able to verify hashes of any other version, so it might be
handy to be able to disable the check in that case.
2024-03-04 15:18:03 -05:00
Maxim Biro 14de93ccec chore: Use WineHQ's Wine as Debian Bookworm's crashes 2024-03-04 15:11:59 -05:00
Maxim Biro ed37616249 docs: Update the Windows cross-compilation section 2024-03-04 15:11:56 -05:00
Maxim Biro 19475adb70 chore: Statically link OpenMP into the cracker fun util on Windows
For some reason even with -DCMAKE_EXE_LINKER_FLAGS="-static" specified,
CMake still links OpenMP dynamically, even though it links other libs
statically, e.g. -pthread.
2024-03-04 15:11:54 -05:00
Maxim Biro 1be311e51f feat: Build the fun utils when cross-compiling to Windows
While fun utils are of very low quality, both code-wise and usage-wise
-- not checking for failed mallocs, not offering usage instructions,
etc., there are a couple of them that Windows users might find useful,
like the vanity key generators or a savedata creator, for example.

The building of the fun utils was broken on Windows due to the utils
failing to find sodium.h, as no libsodium include dirs were set on the
fun utils.
2024-03-04 15:11:52 -05:00
Maxim Biro 88133f8446 chore: Strip Windows binaries 2024-03-04 15:11:51 -05:00
Maxim Biro 3cc0ae7535 refactor: Copy over all of the required static dependencies
Including libwinpthread and libssp.
2024-03-04 15:11:49 -05:00
Maxim Biro c4fa8f7fb1 feat: Generate .def, .exp and .lib files when building for Windows 2024-03-04 15:11:48 -05:00
Maxim Biro 74bbac5363 feat: Let CMake create the dll instead of doing so ourselves
We used to make the dll manually as we previously had 3 dlls:
libtoxcore.dll, libtoxav.dll and libtoxencryptsave.dll, but for Windows
we wanted them to be all combined into libtox.dll with all the
dependencies included: libsodium, libopus, libvpx, pthreads, etc, to
reduce the overall dll size and simplify linking. However, since CMake
now produces a single libtoxcore.dll with toxcore, toxav and
toxencryptsave included, we don't have to do this manually anymore.

This results in the dll being named libtoxcore.dll instead of the
libtox.dll that it previously was, matching the static libtoxcore.a's
name.
2024-03-04 15:11:46 -05:00
Maxim Biro 246642e9ae feat: Harden Windows cross-compilation
The same hardening flags as the slated for the upcoming gcc's
`-fhardened` sets, sans `-Wl,-z,relro,-z,now` as MinGW-w64's gcc doesn't
support -z flags. This adds a dependency on libssp -- gcc's stack
protector library.
2024-03-04 15:11:45 -05:00
Maxim Biro 8d431c0d11 chore: Bump Windows build dependency versions 2024-03-04 15:11:43 -05:00
iphydf ed2b60c217 chore: Use a specific non-broken slimcc version.
https://github.com/fuhsnn/slimcc/commit/7b7c98604ab3eb85e68d7b3ae7f884d5537638c8 broke it.
2024-02-28 15:51:36 +00:00
iphydf 0627c36716 test: Add pkgsrc build.
Used by NetBSD, but we build on Alpine Linux for speed. Separately, we
will build on NetBSD without pkgsrc, to see whether it compiles and runs
there. That VM build is more expensive and harder to debug, so we keep
the pkgsrc Linux build for development.
2024-02-19 21:02:19 +00:00
iphydf 92578afe4b test: Add FreeBSD VM action on GitHub. 2024-02-19 20:15:18 +00:00
iphydf a1e999fd80 chore: Compile libsodium reference implementation with compcert.
This ensures that we're able to generate a guaranteed semantically
correct binary with all of toxcore and libsodium. We don't currently
compile libvpx and opus with compcert. Probably not worth the effort.
2024-02-14 00:21:14 +00:00
iphydf 5d7b7a7bbc refactor: Use tox rng to seed the keypair generation. 2024-02-11 18:56:51 +00:00
iphydf 93c83fbc7c refactor: Use strong typedef instead of struct for Socket.
Sparse checks it. This is neater than using a struct, which has some
slightly weird syntax at times. This also reduces the risk of someone
adding another struct member.
2024-02-09 01:10:06 +00:00
iphydf 9fe18b176f fix: Fix some false positive from PVS Studio.
It correctly warns about potentially dereferencing NULL chat in a log
statement. However, chat can semantically never be NULL in that call,
and it's just a defensive check. Still good to fix for clarity.
2024-02-09 00:40:36 +00:00
iphydf aacff73939 docs: Fix up doxyfile.
No longer using :sources, since that fails on render.com.
2024-02-07 22:56:05 +00:00
iphydf 42010660e1 test: Add slimcc compiler compatibility test. 2024-02-02 23:50:46 +00:00
iphydf 4e2dba4d9f chore: Reformat sources with astyle.
Restyled astyle is fixed now.
2024-02-02 01:31:32 +00:00
iphydf 0c05566e58 cleanup: Further #include cleanups. 2024-01-31 21:04:53 +00:00
iphydf 511bfe39c8 cleanup: Use Bazel modules to enforce proper #include hygiene. 2024-01-30 23:51:43 +00:00
iphydf eeaa039222 chore: Fix rpm build; add a CI check for it. 2024-01-26 23:38:48 +00:00
iphydf 8328449c1a chore: Speed up docker builds a bit by reducing layer count.
This is especially noticeable on local builds (less so on the github
workers).
2024-01-26 14:13:34 +00:00
iphydf 5c093c4888 cleanup: Remove all uses of SIZEOF_VLA.
This is step 1 towards removing VLAs altogether.
2024-01-25 07:40:41 +00:00
iphydf 662c2140f3 test: Add goblint static analyser. 2024-01-24 23:31:00 +00:00
iphydf 8f07755834 cleanup: Use memzero(x, s) instead of memset(x, 0, s).
It's clearer and doesn't risk having a non-zero filler value.
2024-01-24 19:14:32 +00:00
iphydf 50f1b30fa9 test: Add fuzz tests to the coverage run.
So we don't need to write so many edge case tests ourselves for things
like parsers, which really don't need those manual tests, as long as we
can check for some properties like "can output the parsed data and it'll
be the same as the input".
2024-01-12 12:33:41 +00:00
iphydf df76f5cf47 chore: Move from gcov to llvm source-based coverage. 2024-01-12 10:27:48 +00:00