ondra05 opened PR #6131 from ondra05:main to bytecodealliance:main:
cranelift-codegenhas an optional featurestd, but when not enabled, it fails to compile demandingstd.Most of the issues were an easy fix:
- Which was on several places used instead of
core/alloc(fixed using simple search-replace)- Replacing
std'sHashMapinscoped_hash_mapwithhashbrown's (added little shim)Currently the only remaining fix is
timingmodule which relies on thread locals which in current implementation state are instdandstd::time::Instant.Here I am not so sure about possible fix. The thread local issue could be worked around by using nightly thread locals implementation, which isn't std dependent if
stdfeature not used. The missingInstantcould be fixed by not having a default timer implementation for no-std / having a no-op one. Both can be fixed by having no-op timer functions under conditional compilation, but that doesn't sound like a particularly nice solution.
ondra05 closed without merge PR #6131.
Last updated: Dec 06 2025 at 06:05 UTC