Skip to content

Known Limitations of Translation

Per Larsen edited this page Oct 22, 2019 · 19 revisions

This document is to track things that we know the translator can't handle, as well as things it probably won't ever handle.

Unimplemented

Unimplemented, might be implementable but very low priority

  • restrict pointers (Rust has references)
  • function-like macros (simple constant expression macros are translated to const)
  • Non x86/64 SIMD function/types and x86/64 SIMD function/types which have no Rust equivalent

Likely won't ever support

  • longjmp/setjmp Although there are LLVM intrinsics for these, it is unclear how these interact with Rust (esp. idiomatic Rust). These functions are currently translated to C library calls, which may do what you expect, but no guarantees. YYMV.
  • jumps into and out of statement expressions We support GNU C statement expressions, but we can not handle jumping into or out of these. Both entry and exit into the expression have to be through the usual fall-through evaluation of the expression.

Nightly Rust Requirements

Miscellaneous

  • LLVM 7 improves support for X86 intrinsics; if you are translating SIMD code, we recommend you use LLVM 7 or later.