Skip to content

Add a build task for crates to opt-in to no_alloc builds - #208

Open
kuqin12 wants to merge 5 commits into
OpenDevicePartnership:mainfrom
kuqin12:no_alloc
Open

kuqin12 wants to merge 5 commits into
OpenDevicePartnership:mainfrom
kuqin12:no_alloc

Conversation

@kuqin12

@kuqin12 kuqin12 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This change adds a build task that allows the build for crates that do not pull in alloc.

For crates that would like to opt-in for this build, one should set the following and trigger build with cargo make build-no-alloc:

[package.metadata.patina]
no_alloc = true

Comment thread .sync/rust/Makefiles/Makefile-patina.toml Outdated
Comment thread .sync/rust/Makefiles/Makefile-patina.toml
`cargo make -p release build-no-alloc`
"""
clear = true
script_runner = "@duckscript"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this need to also run on aarch64-pc-windows-msvc? Or, for consistency, could it have a conditional script like build-x64?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That is what I started, to only run on x64 because only supv uses that. But I thought it might be useful for aarch64 as well. I can scope it down to x64 if that is more desirable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It is fine either way. If it stays, maybe address the inconsistency with the other tasks by saying those are skipped because it is unexpected to cross-compile for X64 targets from AARCH64, whereas this is a correctness check independent of architectures.

@kuqin12 kuqin12 Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I went back check the current status once again and think it makes better sense to keep it to x64 for now. We can expand it to aarch64 when it is needed.

This is now moved under cargo make check-no-alloc-x64.

Comment thread .sync/rust/Makefiles/Makefile-patina.toml Outdated
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.

4 participants