the.bay.news

Pre-RFC: defining globals in global_asm!

Rust Internals
Pre-RFC: defining globals in global_asm!
Rust's asm story currently has some big limitations related to defining globals from asm blocks. Specifically, there are two limitations: You have to pick the symbol name yourself. You cannot ask the compiler to pick a name using e.g. name mangling. Symbols have to be marked global because otherwise they cannot cross CGU boundaries. The second problem is quite problematic. Let's say you tried to define a symbol like this: extern "C" { static MY_GLOBAL_U64: u64; } global_asm!( "MY_GL...

Rust's asm story currently has some big limitations related to defining globals from asm blocks. Specifically, there are two limitations: You have to pick the symbol name…

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.