Skip to content

Commit

Permalink
fix: memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-eiger committed Jan 25, 2024
1 parent 289f9e8 commit 2d12594
Show file tree
Hide file tree
Showing 12 changed files with 995 additions and 381 deletions.
735 changes: 394 additions & 341 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ panic = 'unwind'
opt-level = 3

[workspace.dependencies]
graphcast-sdk = { git = "https://github.com/graphops/graphcast-sdk" }
graphcast-sdk = { git = "https://github.com/graphops/graphcast-sdk", branch="petko/fix-memory-leak" }
clap = { version = "4.4", features = [
"cargo",
"unstable-doc",
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM rust:1-bullseye AS build-image

# Update and install necessary packages, including libc6-dev for libresolv
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
Expand All @@ -9,19 +10,28 @@ RUN apt-get update \
libssl-dev \
clang \
build-essential \
libc6-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Ensure CA certificates are installed
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates

# Copy project files to the container
COPY . /subgraph-radio
WORKDIR /subgraph-radio

# Install Golang
RUN sh install-golang.sh
ENV PATH=$PATH:/usr/local/go/bin

# Set Rust flags to link against libresolv
ENV RUSTFLAGS="-C link-arg=-lresolv"

# Build the Rust project
RUN cargo build --release -p subgraph-radio

# Setup the runtime environment
FROM alpine:3.17.3 as alpine
RUN set -x \
&& apk update \
Expand Down
Loading

0 comments on commit 2d12594

Please sign in to comment.