Closed timotheecour closed 8 months ago
note: this is an alternative to https://github.com/nim-lang/Nim/pull/13016 ; not yet clear on which is best; if https://github.com/nim-lang/Nim/pull/13016 can be completed than maybe #13016 is better (better syntax)
This RFC is stale because it has been open for 1095 days with no activity. Contribute a fix or comment on the issue, or it will be closed in 30 days.
{.pragma: foo, bar1, bar2.}
can't be exported and has other drawbacks.Here's a library solution that can be used instead:
example 1
shows an example where we define something analogous to
{.pragma: foo, importc: name, nodecl.}
except thatfoo
can be exportedexample 2
turn
inclrtl
from an include to an import using this approachproposal
add it to std/macros
note
could also extend it to cover other kinds, such as var and types using the recent-ish pragma macro syntax