Commit Graph

153 Commits (a4141617d7084c7281e776ac08a0a19e4f48d905)

Author SHA1 Message Date
Jeff Becker 1fdb8b4c94 initial pybind11 introspection code 4 years ago
Jeff Becker f4520ac920
make decaying hashset use llarp::Time_t and move unit tests to use catch2 4 years ago
Jason Rhinelander 0839c16f19 Final abseil purge
Bye-bye Google Boost.
4 years ago
Jason Rhinelander 54186c4a89 Replace absl string_view with string_view from lokimq
When we add loki-mq has a dependency we can just alias it, but for now
it's easier to copy the header than add the whole submodule library.
4 years ago
Jason Rhinelander 2e9840ea39 Replace abseil date code with Hinnart's date.h
Howard Hinnart's date.h is the library that was accepted as C++20
date/calendar support, so this is essentially a backport of C++20 date
time support.

(It does support timezone support, but requires more of the library and
that seems like overkill for what we need; this just prints UTC
timestamps instead, which need only a header-only include).
4 years ago
Jason Rhinelander f84ce61d66 Removed empty cpp files
These aren't needed: CMake already knows how to follow #includes and
rebuild when headers change as long as the headers are included
*somewhere*.  The extra .cpp files here just require building a bunch of
.cpp files with just header content that we just end up throw away
during linking (since the same things will also be compiled in whatever
other compilation units include the same headers).
4 years ago
Jason Rhinelander fe61367a87 Vastly simplified llarp::util::memFn
There is a huge pile of unnecessary machinery here that can be solved
with a few lambdas and some member function pointer type deduction.
4 years ago
Jason Rhinelander b4440094b0 De-abseil, part 2: mutex, locks, (most) time
- util::Mutex is now a std::shared_timed_mutex, which is capable of
  exclusive and shared locks.

- util::Lock is still present as a std::lock_guard<util::Mutex>.

- the locking annotations are preserved, but updated to the latest
  supported by clang rather than using abseil's older/deprecated ones.

- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
  locks anymore (WTF abseil).

- ReleasableLock is gone.  Instead there are now some llarp::util helper
  methods to obtain unique and/or shared locks:
    - `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
      unlockable object (std::unique_lock<T>, with T inferred from
      `mutex`).
    - `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
      "reader") lock of the mutex.
    - `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
      used to atomically lock multiple mutexes at once (returning a
      tuple of the locks).
  This are templated on the mutex which makes them a bit more flexible
  than using a concrete type: they can be used for any type of lockable
  mutex, not only util::Mutex.  (Some of the code here uses them for
  getting locks around a std::mutex).  Until C++17, using the RAII types
  is painfully verbose:

  ```C++
  // pre-C++17 - needing to figure out the mutex type here is annoying:
  std::unique_lock<util::Mutex> lock(mutex);
  // pre-C++17 and even more verbose (but at least the type isn't needed):
  std::unique_lock<decltype(mutex)> lock(mutex);
  // our compromise:
  auto lock = util::unique_lock(mutex);
  // C++17:
  std::unique_lock lock(mutex);
  ```

  All of these functions will also warn (under gcc or clang) if you
  discard the return value.  You can also do fancy things like
  `auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
  lock take over an already-locked mutex).

- metrics code is gone, which also removes a big pile of code that was
  only used by metrics:
  - llarp::util::Scheduler
  - llarp:🧵:TimerQueue
  - llarp::util::Stopwatch
4 years ago
Jason Rhinelander ac1486d0be Replace absl::optional with optional-lite
Step 1 of removing abseil from lokinet.

For the most part this is a drop-in replacement, but there are also a
few changes here to the JSONRPC layer that were needed to work around
current gcc 10 dev snapshot:

- JSONRPC returns a json now instead of an optional<json>.  It doesn't
  make any sense to have a json rpc call that just closes the connection
  with returning anything.  Invoked functions can return a null (default
  constructed) result now if they don't have anything to return (such a
  null value won't be added as "result").
4 years ago
Jason Rhinelander c522bc0537 ghc::filesystem devendor to submodule
Also removed some unused/old options for conditionally not using
ghc::filesystem and a sodium option that wasn't used anywhere.
4 years ago
Jason Rhinelander 5a787de73b Switch abseil & nlohmann to submodules and update to latest stable
Our current abseil won't build with gcc 10 (its `optional`
implementation appears broken), and spews warnings under slightly older
compilers; updating to the latest stable 2019 branch fixes both issues.
4 years ago
Jeff Becker ea3851d15f
rc gossiping 4 years ago
Jason Rhinelander 66ebe3995e Remove -Wshadow; it is far too aggressive under gcc 4 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 4 years ago
jeff f728e6016b router version 4 years ago
Jeff Becker fde0ca374f
i hate curl 4 years ago
Jeff Becker 336a748695
make it build in normal mode too 4 years ago
Jeff Becker 80cbddde7b
fixups for review 4 years ago
Jeff Becker 2ce592e4af
static link with docs 4 years ago
Jeff Becker 562f3f07ab
add unit test for decaying hash set 4 years ago
Thomas Winget f4c9e09d44 remove obsolete timer-related code 5 years ago
Rick V 9fa9209114
don't be aggressive
remove libcurl packaging rules. We still build it, but ship only the curl.exe
5 years ago
Rick V 6d49ffd60b
include all platform dependencies transitively 5 years ago
Rick V e15c57c114
get ready for v0.6
bump version

don't ship the shared object
5 years ago
Jeff Becker fcf0ae2b9e
prune unused files. 5 years ago
Stephen Shelton 332f33b049 Remove FS_LIB conditionals 5 years ago
Jason Rhinelander 638fb25b47 Put version info into a compiled file
This rewrites the version info using lokid's approach of compiling it
into a .cpp file that gets generated as part of the build (*not* during
the configure stage).

Among other things, this means that changing the version no longer
invalidates ccache or cmake dependencies, and because it depends on
`.git/index` git commits will cause the version to be regenerated,
making the commit tag more reliable (currently if you rebuild without
running cmake your git commit tag doesn't update).
5 years ago
Jason Rhinelander 99d27a4886 Add missing ev_libuv (now needed everywhere) 5 years ago
Jeff Becker 7a78160bf0
final change 5 years ago
Jeff Becker 5729d0bff5
more 5 years ago
Jeff Becker 0afb3b320b
add bootstrap list functionality and utility 5 years ago
Stephen Shelton 93b8832026
Merge branch 'dev' into private-keys-backup-support 5 years ago
Jeff 76fc50cfb7
Merge pull request #914 from despair86/dev
win32 fixes
5 years ago
Rick V cf3469e11a
crash on wine, we support linux, ucb_unix, svr4
natively ffs. i tested this patch on wine 4.4 on fuckin
Solaris 11 snv_151
5 years ago
Jeff Becker 3878ebd534
use curl to fetch from lokid rpc the identity key 5 years ago
Jeff Becker ac686a9329
remove valgrind access errors 5 years ago
Stephen Shelton fd02e3e149 Stub out KeyManager class 5 years ago
Jeff 3a6c16aa36
Merge pull request #871 from majestrate/ed25519-signing
Ed25519 signing
5 years ago
jeff 996ff06c6a update cmakelists.txt to no longer build removed file 5 years ago
jeff 52757fef0e Merge remote-tracking branch 'micheal/background_mode' into vpn-api-2019-10-03 5 years ago
jeff 1853b28590 remove libutp and all such code related to utp 5 years ago
jeff ac2a2aed1d gut libutp and finish making things compile and pass tests 5 years ago
Michael edd0ec398f
Move thread stuff to subdirectory 5 years ago
Michael 0950571313
Move metrics to subdirectory 5 years ago
Michael 4d8fe2a8a8
Move meta programming to subdirectory 5 years ago
Michael 1aec0dfa2b
Move logging to subdirectory 5 years ago
Jeff Becker 426ee41c46
initial iwp 5 years ago
Jeff Becker 3c3338e801
Merge remote-tracking branch 'origin/master' into memlink 5 years ago
Jeff Becker 2345dd3239
try adding proper limits 5 years ago
Jeff Becker c1f33bb1ac
initial mempipe implementation 5 years ago