Type size in proc-macro

#1

Someone just asked

does anybody know how to get target’s word size inside a proc-macro function?

on IRC. The problem is that proc-macro code is run on the host, so sizes may be different to the target

The solution given was to use cfg!(target_pointer_width=".."), but this seems error prone. Is there (or should there be) any better solution?

0 Likes

closed #2

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

0 Likes