Skip to content
Open
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 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# Update PATH for cargo
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
RUSTFLAGS="-C codegen-units=1" \
CARGO_PROFILE_RELEASE_LTO=fat \
PATH=/usr/local/cargo/bin:$PATH

# Install Rust toolchain, see https://rust-lang.github.io/rustup/installation/other.html
Expand Down
7 changes: 7 additions & 0 deletions publish_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
pathlib.Path(dst_dir).mkdir(parents=True, exist_ok=True)
pathlib.Path(dst_dir_debug).mkdir(parents=True, exist_ok=True)

# Build GDNative library with production optimizations
subprocess.run(
["cargo", "build", "--release"],
cwd="rust",
env={"RUSTFLAGS": "-C codegen-units=1", "CARGO_PROFILE_RELEASE_LTO": "fat"}
)

# Copy all dlls
src_dir = "godot"
for dll in glob.iglob(os.path.join(src_dir, "*.dll")):
Expand Down