What is Nostr?
pedro /
npub1t68…e5g6
2024-07-22 07:15:03

pedro on Nostr: #rustaceans, if I want to have a function in my program called from another lib ...

#rustaceans, if I want to have a function in my program called from another lib (which I control), e.g. `entry()` calls `main()`, am I constrained to use `extern {}` or is there another way to do it? I'm asking because I'd like to use type parameters, but the compiler won't (rightfully) let me use them in FFI functions. I know that I could probably get the same result with macros, but I was wondering if there's a cleaner way. #rust #rustlang
Author Public Key
npub1t68wenzg2f07yn7dx5exp74sr2hgqvgasw5sp6zxz6twutuxyq9qgpe5g6