Skip to content

Commit

Permalink
Continue implementation work on Orchid nanokernel.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed May 15, 2024
1 parent 5b11e25 commit 3f0db0d
Show file tree
Hide file tree
Showing 329 changed files with 862 additions and 1,275 deletions.
75 changes: 36 additions & 39 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
path = app-shared/flutter
url = https://github.com/flutter/flutter.git
[submodule "boost"]
path = p2p/boost
path = lib-shared/boost
url = https://github.com/boostorg/boost.git
[submodule "cppcoro"]
path = p2p/cppcoro
path = lib-shared/cppcoro
url = https://github.com/lewissbaker/cppcoro.git
[submodule "jsoncpp"]
path = p2p/jsoncpp
path = lib-shared/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "abseil-cpp"]
path = min-webrtc/abseil-cpp
path = lib-shared/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
[submodule "libsrtp"]
path = min-webrtc/libsrtp
Expand All @@ -20,10 +20,10 @@
path = min-webrtc/webrtc
url = https://webrtc.googlesource.com/src
[submodule "openvpn3"]
path = p2p/openvpn3
path = lib-protocol/openvpn3
url = https://github.com/OpenVPN/openvpn3.git
[submodule "lz4"]
path = p2p/lz4
path = lib-protocol/lz4
url = https://github.com/lz4/lz4.git
[submodule "openzeppelin-solidity"]
path = openzeppelin-solidity
Expand All @@ -35,25 +35,25 @@
path = vpn-shared/libevent
url = https://github.com/libevent/libevent.git
[submodule "lwip"]
path = p2p/lwip
path = lib-protocol/lwip
url = https://git.savannah.nongnu.org/git/lwip.git
[submodule "boringtun"]
path = p2p/boringtun
path = lib-protocol/boringtun
url = https://github.com/cloudflare/boringtun.git
[submodule "tor"]
path = vpn-shared/tor
url = https://git.torproject.org/tor.git
[submodule "libutp"]
path = p2p/libutp
path = lib-protocol/libutp
url = https://github.com/bittorrent/libutp.git
[submodule "flutter-desktop-embedding"]
path = app-shared/flutter-desktop-embedding
url = https://github.com/google/flutter-desktop-embedding
[submodule "url"]
path = p2p/url
path = lib-shared/url
url = https://github.com/cpp-netlib/url
[submodule "secp256k1"]
path = p2p/secp256k1
path = lib-shared/secp256k1
url = https://github.com/bitcoin-core/secp256k1.git
[submodule "openssl"]
path = min-openssl/openssl
Expand All @@ -65,16 +65,16 @@
path = min-zlib/libz
url = https://chromium.googlesource.com/chromium/src/third_party/zlib.git
[submodule "eEVM"]
path = p2p/eEVM
path = lib-shared/eEVM
url = https://github.com/microsoft/eEVM.git
[submodule "tap-windows6"]
path = p2p/tap-windows6
path = lib-protocol/tap-windows6
url = https://github.com/OpenVPN/tap-windows6
[submodule "sqlite"]
path = p2p/sqlite
path = lib-shared/sqlite
url = https://github.com/mackyle/sqlite.git
[submodule "SPCDNS"]
path = p2p/SPCDNS
path = lib-protocol/SPCDNS
url = https://github.com/spc476/SPCDNS
[submodule "wireshark"]
path = min-wireshark/wireshark
Expand All @@ -94,29 +94,23 @@
[submodule "gnulib"]
path = min-glib/gnulib
url = https://git.savannah.gnu.org/git/gnulib.git
[submodule "libcxxabi"]
path = env/libcxxabi
url = https://github.com/llvm-mirror/libcxxabi.git
[submodule "libcxx"]
path = env/libcxx
url = https://github.com/llvm-mirror/libcxx.git
[submodule "pkg-config"]
path = env/pkg-config
url = https://gitlab.freedesktop.org/pkg-config/pkg-config.git
[submodule "quickjs"]
path = vpn-shared/quickjs
url = https://github.com/bellard/quickjs.git
[submodule "intx"]
path = p2p/intx
path = lib-shared/intx
url = https://github.com/chfast/intx.git
[submodule "expected"]
path = p2p/expected
path = lib-shared/expected
url = https://github.com/TartanLlama/expected.git
[submodule "curl"]
path = p2p/curl
path = lib-protocol/curl
url = https://github.com/curl/curl.git
[submodule "challenge-bypass-ristretto-ffi"]
path = p2p/challenge-bypass-ristretto-ffi
path = lib-protocol/challenge-bypass-ristretto-ffi
url = https://github.com/brave-intl/challenge-bypass-ristretto-ffi.git
[submodule "icu"]
path = min-icu4c/icu
Expand All @@ -131,7 +125,7 @@
path = min-v8/trace_event
url = https://chromium.googlesource.com/chromium/src/base/trace_event/common.git
[submodule "protobuf"]
path = p2p/protobuf
path = lib-protocol/protobuf
url = https://chromium.googlesource.com/external/github.com/google/protobuf
[submodule "jinja2"]
path = min-v8/jinja2
Expand All @@ -140,19 +134,19 @@
path = min-v8/markupsafe
url = https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git
[submodule "fmt"]
path = p2p/fmt
path = lib-shared/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "leveldb"]
path = tst-explore/leveldb
url = https://github.com/google/leveldb.git
[submodule "c-ares"]
path = p2p/c-ares
path = lib-protocol/c-ares
url = https://github.com/c-ares/c-ares.git
[submodule "SHA3IUF"]
path = p2p/SHA3IUF
path = lib-shared/SHA3IUF
url = https://github.com/brainhub/SHA3IUF.git
[submodule "cpp-jwt"]
path = p2p/cpp-jwt
path = lib-protocol/cpp-jwt
url = https://github.com/arun11299/cpp-jwt.git
[submodule "cairo"]
path = min-cairo/cairo
Expand All @@ -164,7 +158,7 @@
path = min-cairo/pixman
url = https://gitlab.freedesktop.org/pixman/pixman.git
[submodule "chains"]
path = p2p/chains
path = lib-protocol/chains
url = https://github.com/ethereum-lists/chains.git
[submodule "engine"]
path = app-shared/engine
Expand All @@ -173,16 +167,16 @@
path = min-krypton/vpn-libraries
url = https://github.com/google/vpn-libraries.git
[submodule "compile-time-regular-expressions"]
path = p2p/ctre
path = lib-shared/ctre
url = https://github.com/hanickadot/compile-time-regular-expressions.git
[submodule "trezor-common"]
path = p2p/trezor-common
path = lib-protocol/trezor-common
url = https://github.com/trezor/trezor-common.git
[submodule "bech32"]
path = p2p/bech32
path = lib-shared/bech32
url = https://github.com/sipa/bech32.git
[submodule "pugixml"]
path = p2p/pugixml
path = lib-protocol/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "mediasoup"]
path = eng-mediasoup/mediasoup
Expand All @@ -197,7 +191,7 @@
path = min-webrtc/crc32c
url = https://github.com/google/crc32c.git
[submodule "snappy"]
path = p2p/snappy
path = lib-protocol/snappy
url = https://github.com/google/snappy.git
[submodule "pcre2"]
path = min-pcre2/pcre2
Expand Down Expand Up @@ -226,6 +220,9 @@
[submodule "mingw-w64"]
path = env/mingw-w64
url = https://git.code.sf.net/p/mingw-w64/mingw-w64
[submodule "base"]
path = min-v8/base
url = https://chromium.googlesource.com/chromium/src/base
[submodule "FP16"]
path = min-v8/FP16
url = https://github.com/Maratyszcza/FP16.git
[submodule "boringssl"]
path = min-boringssl/boringssl
url = https://boringssl.googlesource.com/boringssl
2 changes: 1 addition & 1 deletion app-ios/env
2 changes: 1 addition & 1 deletion app-macos/env
2 changes: 1 addition & 1 deletion cli-shared/env
4 changes: 0 additions & 4 deletions p2p/source/android.cpp → env/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
/* }}} */


#ifdef __ANDROID__

// some rust projects depend indirectly on the nix crate
// and rust object files have leaky translation units :(
// so linking the archive tries to pull in these symbols
Expand All @@ -35,5 +33,3 @@ extern "C" int getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t buf
extern "C" int getgrnam_r(const char *name, struct group *grp, char *buffer, size_t bufsize, struct group **result) {
orc_insist(false);
}

#endif
3 changes: 3 additions & 0 deletions env/extra/__config_site
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define _LIBCPP_ABI_VERSION 2
#define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
1 change: 0 additions & 1 deletion env/libcxx
Submodule libcxx deleted from 2076f5
1 change: 1 addition & 0 deletions env/libcxx
1 change: 0 additions & 1 deletion env/libcxxabi
Submodule libcxxabi deleted from a88633
1 change: 1 addition & 0 deletions env/libcxxabi
2 changes: 1 addition & 1 deletion env/submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -e
# XXX: flutter needs deep for an unknown reason; maybe this can be fixed?
# XXX: googletest broke recently and doesn't even support HEAD and I sigh
# XXX: the other repositories need uploadpack.allowReachableSHA1InWant :(
git submodule update --init --recursive "$@" -- app-shared/flutter min-cairo/libpng min-glib/{gnulib,libiconv} min-zlib/googletest p2p/lwip srv-worker/glibc vpn-shared/{libssh,tor}
git submodule update --init --recursive "$@" -- app-shared/flutter min-cairo/libpng min-glib/{gnulib,libiconv} min-zlib/googletest lib-protocol/lwip srv-worker/glibc vpn-shared/{libssh,tor}
git submodule update --init --recursive "$@" --depth 1
2 changes: 2 additions & 0 deletions env/target-and.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ lflags += -nostdlib++ -lc++abi
lflags += -lm -llog

wflags += -L$(CURDIR)/env/android

source += env/android.cpp
24 changes: 15 additions & 9 deletions env/target-cxx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
# }}}


pwd/env := $(pwd)

xflags += -nostdinc++
xflags += -isystem $(CURDIR)/$(pwd)/libcxx/include
xflags += -isystem $(CURDIR)/$(pwd)/libcxxabi/include
xflags += -isystem $(CURDIR)/$(pwd)/extra

cflags/$(pwd)/libcxx/ += -I$(CURDIR)/$(pwd/env)/libcxx/src
cflags/$(pwd)/libcxxabi/ += -I$(CURDIR)/$(pwd/env)/libcxx/src

source += $(wildcard $(pwd)/libcxx/src/*.cpp)
source += $(wildcard $(pwd)/libcxx/src/ryu/*.cpp)
qflags += -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS

cflags/$(pwd)/libcxx/ += -D_LIBCPP_BUILDING_LIBRARY=
Expand All @@ -26,15 +33,14 @@ else
cflags/$(pwd)/libcxx/ += -D__GLIBCXX__
endif

cflags/$(pwd)/libcxx/src/exception.cpp += -Wno-\#warnings
cflags/$(pwd)/libcxxabi/src/cxa_thread_atexit.cpp += -Wno-pointer-bool-conversion
source += $(pwd)/libcxxabi/src/abort_message.cpp
source += $(pwd)/libcxxabi/src/cxa_demangle.cpp
source += $(pwd)/libcxxabi/src/cxa_guard.cpp
source += $(pwd)/libcxxabi/src/cxa_virtual.cpp

source += env/libcxxabi/src/abort_message.cpp
source += env/libcxxabi/src/cxa_demangle.cpp
source += env/libcxxabi/src/cxa_guard.cpp
source += env/libcxxabi/src/cxa_virtual.cpp

ifneq ($(target),win)
ifeq ($(target),win)
source += $(pwd)/libcxx/src/support/win32/thread_win32.cpp
else
# this requires _LIBCXXABI_WEAK to be defined
source += env/libcxxabi/src/cxa_thread_atexit.cpp
source += $(pwd)/libcxxabi/src/cxa_thread_atexit.cpp
endif
7 changes: 6 additions & 1 deletion env/target-lld.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
include $(pwd)/target-gnu.mk

wflags += -fuse-ld=lld
lflags += -Wl,--icf=all
lflags += -Wl,--error-limit=0

ifeq ($(filter nostrip,$(debug)),)
lflags += -Wl,--icf=all
else
lflags += -Wl,--icf=none
endif

export LLD_VERSION := Linker: LLD
4 changes: 0 additions & 4 deletions env/target-lnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,8 @@ endef
$(each)

ifeq ($(distro),)
ifneq ($(centos/$(machine)),)
distro := centos6 $(machine) $(centos/$(machine))
else
distro := ubuntu bionic 7
endif
endif

sysroot += $(output)/sysroot

Expand Down
1 change: 1 addition & 0 deletions eth-sender/lib
2 changes: 1 addition & 1 deletion eth-sender/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cflags += -I$(pwd)/source
# XXX: this literally crashes clang-tidy and I haven't filed the bug
checks/$(pwd)/source/main.cpp += -bugprone-unchecked-optional-access

$(call include,p2p/target.mk)
$(call include,lib/target.mk)
include env/output.mk

$(output)/%/cj$(exe): $(patsubst %,$(output)/$$*/%,$(object) $(linked))
Expand Down
1 change: 0 additions & 1 deletion eth-sender/p2p

This file was deleted.

23 changes: 23 additions & 0 deletions lib-protocol/boringtun.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Orchid - WebRTC P2P VPN Market (on Ethereum)
# Copyright (C) 2017-2020 The Orchid Authors

# GNU Affero General Public License, Version 3 {{{ */
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# }}}


linked += $(pwd)/boringtun/boringtun/librust.a
cflags += -I$(pwd)/boringtun/boringtun/src
features/$(pwd)/boringtun/boringtun += ffi-bindings
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions lib-protocol/jwt.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Orchid - WebRTC P2P VPN Market (on Ethereum)
# Copyright (C) 2017-2020 The Orchid Authors

# GNU Affero General Public License, Version 3 {{{ */
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# }}}


cflags += -I$(pwd)/cpp-jwt/include
File renamed without changes.
Loading

0 comments on commit 3f0db0d

Please sign in to comment.