On 09/29/2012 02:06 PM, Brian Anderson wrote:
On 09/29/2012 10:43 AM, Alex Rønne Petersen wrote:
Hi folks,

I just read this in tutorial-ffi.md:

     The `"abi"` attribute applies to a foreign module (it can not be
applied
     to a single function within a module), and must be either `"cdecl"`
     or `"stdcall"`. Other conventions may be defined in the future.

Why must it be applied to a module as a whole? I don't quite
understand why this limitation is there.

The main reason for this arrangement is that one platform, OS X, does
symbol resolution using a 'two-level namespace' that includes the name
of the library, so encoding that information in the structure of the
bindings is attractive.

I just realized that this didn't answer your question at all. There is no particular reason for the limitation except that nobody has written the code to support it.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to