bazelbuild / bazelbuild/rules_rust
Disable access to the standard allocator using `rust_library`?
Open
needs-triage
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Is it possible to disable access to the standard allocator using `rust_library`?
Context: I'd like to make access require an explicit opt-in, as a way to force engineers at my company to avoid allocating wherever possible. We have a wrapper around `rust_library` already that is used everywhere, so I was hoping to make an argument to this wrapper, e.g. `allow_alloc` with a default of `False`. That way if you really need to allocate, you would add `allow_alloc=True` and provide a justification comment. But I'm not sure what to pass to the underlying `rust_library` to achieve this...
Any help would be appreciated!
Contributor guide
Assessment
This issue has not been assessed yet.