Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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,963 changes: 2,741 additions & 222 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
resolver = "2"
members = ["src/rust"]
members = ["src/rust", "overlay"]
exclude = ["overlay-stub"]

[profile.release]
codegen-units = 1
Expand Down
41 changes: 41 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,47 @@ tracy-csvexport: $(TRACY_CSVEXPORT_BUILD)/csvexport-release
bin_PROGRAMS += tracy-csvexport
endif # USE_TRACY_CSVEXPORT

# Rust overlay build
if USE_RUST_OVERLAY
RUST_OVERLAY_DIR=$(top_srcdir)/overlay
RUST_OVERLAY_TARGET=$(top_srcdir)/target

# Determine build profile based on configure options
if ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
RUST_BUILD_PROFILE=debug
RUST_PROFILE_FLAG=
RUST_PROFILE_DIR=debug
else
RUST_BUILD_PROFILE=release
RUST_PROFILE_FLAG=--release
RUST_PROFILE_DIR=release
endif

RUST_OVERLAY_BINARY=$(RUST_OVERLAY_TARGET)/$(RUST_PROFILE_DIR)/stellar-overlay

$(RUST_OVERLAY_BINARY): $(wildcard $(RUST_OVERLAY_DIR)/src/*.rs) $(wildcard $(RUST_OVERLAY_DIR)/src/**/*.rs) $(RUST_OVERLAY_DIR)/Cargo.toml
@echo "Building Rust overlay ($(RUST_BUILD_PROFILE))..."
cd $(RUST_OVERLAY_DIR) && $(CARGO) build $(RUST_PROFILE_FLAG)

stellar-overlay: $(RUST_OVERLAY_BINARY)
cp -v $< $@

bin_PROGRAMS += stellar-overlay

# Clean Rust build artifacts
clean-rust:
cd $(RUST_OVERLAY_DIR) && $(CARGO) clean

clean-local: clean-rust

# Run Rust tests
check-rust:
cd $(RUST_OVERLAY_DIR) && $(CARGO) test

check-local: check-rust

endif # USE_RUST_OVERLAY

EXTRA_DIST = stellar-core.supp test/testnet/multitail.conf \
test/testnet/run-test.sh README.md make-mks

Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@ AC_ARG_ENABLE(next-protocol-version-unsafe-for-production,
AM_CONDITIONAL(ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION,
[test x$enable_next_protocol_version_unsafe_for_production = xyes])

AC_ARG_ENABLE(rust-overlay,
AS_HELP_STRING([--disable-rust-overlay],
[Disable building the Rust overlay (libp2p-based P2P networking)]))
AM_CONDITIONAL(USE_RUST_OVERLAY, [test x$enable_rust_overlay != xno])

AC_ARG_ENABLE(libunwind,
AS_HELP_STRING([--disable-libunwind],
[Disable backtraces using libunwind]))
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ MAINTAINER Siddharth Suresh <siddharth@stellar.org>

EXPOSE 11625
EXPOSE 11626
# QUIC port for Rust overlay (peer_port + 1000, UDP)
EXPOSE 12625/udp

VOLUME /data
VOLUME /postgresql-unix-sockets
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile.testing
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ RUN apt-get update && \
apt-get -y install libunwind-20 postgresql curl sqlite3 iproute2 libc++abi1-20 libc++1-20

COPY --from=buildstage /usr/local/bin/stellar-core /usr/local/bin/stellar-core
COPY --from=buildstage /usr/local/bin/stellar-overlay /usr/local/bin/stellar-overlay
EXPOSE 11625
EXPOSE 11626
# QUIC port for Rust overlay (peer_port + 1000, UDP)
EXPOSE 12625/udp
CMD stellar-core
Loading