-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat(build): opt-in rusty_alloc global allocator feature #5968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,13 @@ description = "Agentic terminal facade for open-source and open-weight coding mo | |
| [lints] | ||
| workspace = true | ||
|
|
||
| [features] | ||
| # Opt-in global-allocator swap (#5872): build on rusty_alloc (the pure-Rust | ||
| # mimalloc v2.4.5 remake — no C compiler, no build script) instead of the | ||
| # default mimalloc. Off by default; the default build is unchanged. | ||
| # Build with: cargo build -p codewhale-cli --features rusty-alloc | ||
| rusty-alloc = ["dep:rusty_alloc-api"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Rust allocator still requires C toolchain Enabling Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎.
Comment on lines
+14
to
+18
|
||
|
|
||
| [[bin]] | ||
| name = "codewhale" | ||
| path = "src/main.rs" | ||
|
|
@@ -42,6 +49,7 @@ rustls.workspace = true | |
| semver.workspace = true | ||
| tokio.workspace = true | ||
| mimalloc.workspace = true | ||
| rusty_alloc-api = { workspace = true, optional = true } | ||
| sha2.workspace = true | ||
| tempfile.workspace = true | ||
| tracing.workspace = true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,14 @@ | ||
| // Default allocator: mimalloc. `--features rusty-alloc` swaps it for | ||
| // rusty_alloc (pure-Rust mimalloc v2.4.5 remake, #5872); the default build | ||
| // is unchanged. | ||
| #[cfg(not(feature = "rusty-alloc"))] | ||
| #[global_allocator] | ||
| static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; | ||
|
|
||
| #[cfg(feature = "rusty-alloc")] | ||
| #[global_allocator] | ||
| static GLOBAL: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc; | ||
|
|
||
| fn main() -> std::process::ExitCode { | ||
| codewhale_tui::run(std::env::args().collect()) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Changelog edits bypass merge workflow
Repository policy reserves both changelogs for batched commits on
main. Remove these branch changes and regenerate the derived web changelog.Was this helpful? React with 👍 or 👎 to provide feedback.