I was thinking a bit about Parrot NCI this afternoon. I usually describe it by talking about C's calling conventions and Parrot's calling conventions and then explaining that you can generate the thunking layer beforehand as you know C's calling conventions won't change. That is, a C function that takes two shorts and returns a long looks the same to the thunking layer no matter what library it's from. You can compile it once and let it do its magic for any library function whose conventions it understands.
Then I realized that I had never previously realized that Perl 5 also has calling conventions. Sure, they're a lot less strict than Parrot, but any function that passes three scalars and returns one does the same stuff to the stack.
I bet porting something like NCI to Perl 5 wouldn't be very hard. Certainly it'd be nice to replace the simpler bits of XS with something that doesn't require end users to have a compiler. Complexity does increase rapidly, but there's enough regularity that you can go quite a ways.