Commit Graph

29 Commits (quic-wip)

Author SHA1 Message Date
Jason Rhinelander 16506b6d8b
Default libcrypt to whether or not we find it
Also deliberately don't provide the function at all if we aren't
compiled with libcrypt so that we can't link if we try to call it when
not available.
8 months ago
Jason Rhinelander 18effaa76f Bring oxen-encoding back in as a submodule
As long as it's loaded before oxen-mq or libquic, this should end up
being the one that gets used in oxen-mq/libquic, and so we don't have to
update those when we want something in a newer oxen-encoding.
8 months ago
dr7ana bda8b211dd Cmake restructuring 8 months ago
dr7ana d1b7eee7c8 Zlib version bump 1.2.13 -> 1.3 9 months ago
dr7ana ad5055b85f cmake tweaks for redundant dependencies (WIP) 10 months ago
Thomas Winget 3c46b07bfe Add oxen-libquic submodule
TODO: correctly plug it into CMake and remove ngtcp2 submodule from lokinet
as it will now come from oxen-libquic, if even used directly by lokinet at all.
10 months ago
Jeff Becker 2498a085db
rearrange cmake libraries
define relations and document them.
make responsibilies clear and consice.
1 year ago
dan dc7f3cee22 Replace cxxopts with CLI11
- Simiplifies CLI code for future modification
- filesystem library linked in cmake check_for_std_filesystem file
1 year ago
Jason Rhinelander 081dfd3328 Update submodules to latest version:
cpr: 1.9.2
cxxopts: 3.0.0
ghc-filesystem: 1.5.12
nlohmann-json: 3.11.2
pybind11: 2.10.0
sqlite_orm: 1.7.1

Plus other updates need to make these work:
- cpr needs a cprver.h configured with the version (cmake code copied
  from oxen-core).
2 years ago
Thomas Winget eaf30de1fd
omq rpc log subscription
respects whether RPC is enabled, removes the log sink otherwise

bumps oxen-mq and oxen-logging
2 years ago
Jason Rhinelander 75e382604b
Bump required oxenc version 2 years ago
Jason Rhinelander 2eef7c5915
Don't look for sqlite when not building peerstats 2 years ago
Jason Rhinelander 09372994bb macOS system extension support
Adds support for building Lokinet as a system extension, and fixes
various problems in the macos implementation found during development of
the system extension support.
2 years ago
Jason Rhinelander b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2 years ago
Jason Rhinelander 523a8a74ca
Clean up system-or-submodule handling
Fixes a bug on older cmake linking against oxenmq (older cmake hates the
direct oxenmq::oxenmq -> PkgConfig::OXENMQ alias), and also makes it
easier to handle things like nlohmann::json (which we can use from the
system *or* submodule).

Borrowed from oxen-ss/oxen-core.
2 years ago
Jason Rhinelander d02558350a
Crank oxen-mq to (1.2.)11; switch to oxen-encoding
- Update oxen-mq submodule to latest stable
- Add oxen-encoding submodule
- Convert all oxenmq encoding usage to oxenc
- Modernize cmake handling of oxenmq/oxenc
2 years ago
Jeff Becker b20e7bedf8 identify 2 years ago
Jeff Becker 5b8ebb269c changes for liblokinet-ffi
* cmake option BUILD_DAEMON for toggling building of daemon directory
* when WITH_BOOTSTRAP is OFF dont build curl or cpr
2 years ago
Jason Rhinelander 089fc026d8 Redo how we build ngtcp2 lib
ngtcp2's top-level CMakeLists.txt is not friendly to being used as a
subdirectory (for instance, it always adds a `check` target when cunit
is installed), so stop using it in favour of skipping directly into the
ngtcp2/lib subdir.

This requires some hackery to set up a couple of the things the
top-level cmake does, but it isn't *too* painful.
3 years ago
jeff 0708a0d897
initial network extension code for macos
probably does not work
3 years ago
Jason Rhinelander d90b28ce24 Remove double cpr submodule
Fix cpr being listed twice in .gitmodules and submodule check.
3 years ago
Jeff Becker 83b0f25075
cleanup after rebase 3 years ago
Jeff Becker c547cd0118
fixes for lokinet-bootstrap
* use schannel on windows platforms
* load ca bundle for non windows platforms
* use geteuid for detecting root user when finding default data dir
3 years ago
Jeff Becker 3d87dbff91
bullshit for windows and openssl with CPR
* windows static cross compile is wonky af so we add some hacks to make it work
3 years ago
Jeff Becker ebdb9699c0
refactor: make lokinet-bootstrap a native executable
* pull in cpr
* tidy up windows.sh
* rename main.cpp to lokinet.cpp to satisfy my autism
* add llarp::GetDefaultBootstrap()
3 years ago
Jason Rhinelander a1a152b5c3
Disable building ngtcp2 example code 3 years ago
Jeff Becker eb965c8323
fix link error in ngtcp2 3 years ago
Jason Rhinelander 46c619c49f
Move external/ cmake bits into external/CMakeLists.txt
- Move uvw target to external instead of llarp/CMakeLists.txt

- Add sqlite_orm headers via interface library rather than shoving it
  into the global include search path.

- Find sqlite3 as part of the sqlite_orm target deps rather than linking
  it separately.  (Also don't link it into lokinet-util, which doesn't
  appear to actually need it).
3 years ago
Jeff Becker 0c37cc7f60
lokinet-bootstrap native binary 3 years ago