I'm trying to investigate at least some part of the "raw-dylib" rfc. Could any one help sketch out a plan for implementing it? Currently i have some brief idea for what's needed. But i'm not really sure which logic belongs to which part of the compiler.
Also @nagisa for reviewing the initial feature gate PR. https://github.com/rust-lang/rust/pull/63948
Currently the next part should be picking up the codegen attributes. I've almost implemented it locally, by adding the necessary logic into
librustc_typeck/collect.rs. Haven't uploaded it yet.
But i had a hard time trying to find out where in the compiler should i try to enforce the rules within the RFC, like "link ordinal has to be used in a RawDylib foreign module, or raise an error". The
collect.rs file mentioned above doesn't seems like a good fit.
And i think a design and some interface change might be needed to ask the codegen to do the right thing for the raw-dylib rfc? I'm not sure how would that work. Not familiar with the codegen part at all :(
not really in a position to help with this atm.