Skip to content

Add --enable-fastdev-unsafe-for-production, subsuming unified buid#5298

Open
graydon wants to merge 3 commits into
stellar:masterfrom
graydon:fastdev-build
Open

Add --enable-fastdev-unsafe-for-production, subsuming unified buid#5298
graydon wants to merge 3 commits into
stellar:masterfrom
graydon:fastdev-build

Conversation

@graydon
Copy link
Copy Markdown
Contributor

@graydon graydon commented May 28, 2026

This is a proposal for how to address #5267 in the short term. Longer term we might need some more involved fixes, but this should make life much nicer day-to-day for stellar-core devs.

It adds a new mode --enable-fastdev-unsafe-for-production which:

  • Is still an optimized mode, but not quite as optimized (it turns off LTO and turns on multiple CGUs)
  • Still has debuginfo, but not quite as much (just line tables; enough for profiling and backtraces)
  • Turns off all soroban hosts except curr and optionally next (if next is enabled)
  • Turns on the "unified build" (it actually subsumes/replaces that flag, since it was mainly useful for this sort of scenario anyways, along with asan and tsan, both of which are mainly useful for testing curr and next)
  • Also turns on next, because .. it's simpler to implement / fewer features if it's a superset. Also it doesn't cost much more and next is a very common development configuration anyways.

Results:

Before:

$ time make -j 20 (with warm ccache)
real    6m6.625s
user    12m13.915s
sys     0m57.854s

$ ls -lah src/stellar-core
-rwxr-xr-x 1 dev dev 993M May 28 04:37 src/stellar-core

After:

$ time make -j 20 (with warm ccache)
real    0m42.597s
user    3m35.143s
sys     0m27.528s

$ ls -lah src/stellar-core
-rwxr-xr-x 1 dev dev 277M May 28 04:48 src/stellar-core

Copilot AI review requested due to automatic review settings May 28, 2026 04:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new unsafe fast development Rust build mode intended to reduce local build time and binary size by using a lighter Rust profile and compiling fewer Soroban host versions.

Changes:

  • Adds --enable-fastdev-unsafe-for-production configure/build plumbing.
  • Introduces a fastdev Cargo profile and feature.
  • Gates older Soroban protocol modules/caches out of fastdev builds and updates docs.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
configure.ac Adds the fastdev configure option and sanitizer messaging updates.
src/Makefile.am Wires fastdev into Rust toolchain/profile/features and Soroban protocol selection.
Cargo.toml Defines the root fastdev Rust profile.
Cargo.lock Updates locked Soroban/XDR git dependencies.
src/rust/Cargo.toml Replaces unified feature docs/dependencies with fastdev feature wiring.
src/rust/src/soroban_proto_all.rs Excludes older hosts in fastdev and adjusts dispatch tests.
src/rust/src/soroban_module_cache.rs Gates older module caches and dispatches cache operations via selected host module.
src/rust/src/soroban_test_extra_protocol.rs Gates p22-only test resource modification out of fastdev.
CONTRIBUTING.md Updates developer documentation from unified Rust builds to fastdev builds.

Comment thread src/rust/Cargo.toml
Comment thread src/Makefile.am Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cc328cf5d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/rust/src/soroban_module_cache.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants