Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rust: explore (size) optimizations that should be on by default, in the examples or (upcoming) Rust modules #17515

Open
chrysn opened this issue Jan 13, 2022 · 0 comments
Assignees
Labels
Area: Rust Area: Rust wrapper Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Comments

@chrysn
Copy link
Member

chrysn commented Jan 13, 2022

Candidates are:

  • Set optimization level to "s"
  • Enable LTO
  • Set debug to true (not an optimization, but this leaves metadata around that are really useful)
  • -Zbuild-std=core, applying all the above to core
  • -Zbuild-std-features=panic_immediate_abort (depending on that), completely sidestepping panic handling in favor of an abort (HCF, or whatever that is on the platform). That makes debugging a lot harder but should help code size a lot.
  • Disable the panic-handler_format feature of riot-wrappers by default. That'd be like the little brother of panic_immediate_abort, and would still print which thread panicked but not where. May be a middle ground, but let's test aborting panics too: It could well be that when a debugger is attached, the stack recovery prints that RIOT does actually give better information on the error cause than the line-number-less simple panic handler.
@chrysn chrysn added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: Rust Area: Rust wrapper labels Jan 13, 2022
@chrysn chrysn self-assigned this Jan 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: Rust Area: Rust wrapper Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

No branches or pull requests

1 participant