auto merge of #5849 : thestinger/rust/ffi, r=brson
auto merge of #5849 : thestinger/rust/ffi, r=brson

The code samples are xfail'ed because the buildbot won't have `libsnappy.so` and I don't want to add boilerplate to all the snippets (but they're directly from my snappy bindings so I'll just send a pull request whenever they break). It works really well as an example because it's tiny library and lets the caller manage all the buffers.

I think everything stated in the `Interoperability with foreign code` section is accurate but it deserves a thorough double-check :).

pczarn/rust,AerialX/rust-rt-minimal,mihneadb/rust,pshc/rust,quornian/rust,TheNeikos/rust,pythonesque/rust,barosl/rust,barosl/rust,0x73/rust,zubron/rust,aturon/rust,GBGamer/rust,bombless/rust,defuz/rust,ebfull/rust,sarojaba/rust-doc-korean,aturon/rust,ejjeong/rust,mvdnes/rust,0x73/rust,aidancully/rust,omasanori/rust,rohitjoshi/rust,michaelballantyne/rust-gpu,nham/rust,kwantam/rust,philyoon/rust,defuz/rust,pythonesque/rust,pelmers/rust,mvdnes/rust,pythonesque/rust,miniupnp/rust,philyoon/rust,jbclements/rust,nham/rust,aturon/rust,michaelballantyne/rust-gpu,graydon/rust,pelmers/rust,untitaker/rust,quornian/rust,miniupnp/rust,pelmers/rust,XMPPwocky/rust,servo/rust,bombless/rust-docs-chinese,zubron/rust,jashank/rust,P1start/rust,carols10cents/rust,andars/rust,rprichard/rust,stepancheg/rust-ide-rust,avdi/rust,nham/rust,vhbit/rust,erickt/rust,barosl/rust,P1start/rust,P1start/rust,barosl/rust,retep998/rand,sae-bom/rust,aidancully/rust,TheNeikos/rust,mitsuhiko/rust,fabricedesre/rust,omasanori/rust,zaeleus/rust,cllns/rust,nham/rust,Ryman/rust,KokaKiwi/rust,reem/rust,jashank/rust,kwantam/rust,nwin/rust,pshc/rust,ruud-v-a/rust,sae-bom/rust,dwillmer/rust,victorvde/rust,rprichard/rust,dinfuehr/rust,carols10cents/rust,gifnksm/rust,jashank/rust,avdi/rust,mdinger/rust,pshc/rust,GBGamer/rust,philyoon/rust,dwillmer/rust,defuz/rust,GBGamer/rust,zachwick/rust,jbclements/rust,kmcallister/rust,richo/rust,andars/rust,zaeleus/rust,mihneadb/rust,aturon/rust,jashank/rust,kimroen/rust,untitaker/rust,erickt/rust,carols10cents/rust,gifnksm/rust,fabricedesre/rust,richo/rust,mdinger/rust,kmcallister/rust,AerialX/rust,SiegeLord/rust,pshc/rust,emk/rust,erickt/rust,aneeshusa/rust,ebfull/rand,aepsil0n/rust,kimroen/rust,zachwick/rust,philyoon/rust,erickt/rust,AerialX/rust-rt-minimal,jbclements/rust,erickt/rust,zachwick/rust,jroesch/rust,sarojaba/rust-doc-korean,stepancheg/rust-ide-rust,kwantam/rust,jroesch/rust,sarojaba/rust-doc-korean,GBGamer/rust,pythonesque/rust,seanrivera/rust,philyoon/rust,j16r/rust,andars/rust,AerialX/rust,LeoTestard/rust,krzysz00/rust,KokaKiwi/rust,dwillmer/rust,jroesch/rust,stepancheg/rust-ide-rust,achanda/rand,l0kod/rust,ejjeong/rust,vhbit/rust,mvdnes/rust,hauleth/rust,AerialX/rust,richo/rust,0x73/rust,pythonesque/rust,andars/rust,jroesch/rust,nwin/rust,SiegeLord/rust,pczarn/rust,0x73/rust,reem/rust,0x73/rust,seanrivera/rust,mahkoh/rust,ebfull/rust,waynenilsen/rand,untitaker/rust,pczarn/rust,omasanori/rust,mahkoh/rust,richo/rust,michaelballantyne/rust-gpu,ebfull/rust,kwantam/rust,Ryman/rust,jbclements/rust,dwillmer/rust,ktossell/rust,emk/rust,pythonesque/rust,victorvde/rust,cllns/rust,P1start/rust,reem/rust,defuz/rust,hauleth/rust,shepmaster/rand,sarojaba/rust-doc-korean,zaeleus/rust,michaelballantyne/rust-gpu,untitaker/rust,j16r/rust,ruud-v-a/rust,stepancheg/rust-ide-rust,AerialX/rust-rt-minimal,defuz/rust,quornian/rust,seanrivera/rust,aneeshusa/rust,pelmers/rust,pelmers/rust,robertg/rust,mihneadb/rust,untitaker/rust,ktossell/rust,carols10cents/rust,nham/rust,zaeleus/rust,P1start/rust,rprichard/rust,jbclements/rust,j16r/rust,nwin/rust,ruud-v-a/rust,krzysz00/rust,miniupnp/rust,AerialX/rust-rt-minimal,vhbit/rust,andars/rust,nwin/rust,LeoTestard/rust,reem/rust,kimroen/rust,cllns/rust,omasanori/rust,vhbit/rust,aepsil0n/rust,kimroen/rust,ejjeong/rust,AerialX/rust-rt-minimal,mihneadb/rust,Ryman/rust,graydon/rust,zaeleus/rust,TheNeikos/rust,SiegeLord/rust,jashank/rust,dwillmer/rust,mahkoh/rust,AerialX/rust-rt-minimal,j16r/rust,miniupnp/rust,robertg/rust,emk/rust,ktossell/rust,rprichard/rust,l0kod/rust,andars/rust,omasanori/rust,aepsil0n/rust,dinfuehr/rust,fabricedesre/rust,jbclements/rust,mahkoh/rust,rohitjoshi/rust,cllns/rust,dinfuehr/rust,ejjeong/rust,hauleth/rust,bhickey/rand,sarojaba/rust-doc-korean,robertg/rust,kimroen/rust,ktossell/rust,rohitjoshi/rust,philyoon/rust,mitsuhiko/rust,dwillmer/rust,kwantam/rust,jroesch/rust,michaelballantyne/rust-gpu,kmcallister/rust,jashank/rust,dwillmer/rust,mitsuhiko/rust,nham/rust,l0kod/rust,ejjeong/rust,rohitjoshi/rust,vhbit/rust,fabricedesre/rust,avdi/rust,servo/rust,fabricedesre/rust,pczarn/rust,GrahamDennis/rand,bombless/rust,kmcallister/rust,XMPPwocky/rust,vhbit/rust,KokaKiwi/rust,victorvde/rust,emk/rust,zaeleus/rust,emk/rust,nwin/rust,krzysz00/rust,ruud-v-a/rust,rprichard/rust,mvdnes/rust,mahkoh/rust,pelmers/rust,omasanori/rust,mitsuhiko/rust,dinfuehr/rust,aidancully/rust,barosl/rust,SiegeLord/rust,avdi/rust,gifnksm/rust,nham/rust,l0kod/rust,zubron/rust,Ryman/rust,robertg/rust,gifnksm/rust,sae-bom/rust,P1start/rust,bombless/rust,l0kod/rust,pythonesque/rust,zubron/rust,seanrivera/rust,AerialX/rust,hauleth/rust,dinfuehr/rust,graydon/rust,mdinger/rust,robertg/rust,sae-bom/rust,barosl/rust,michaelballantyne/rust-gpu,aturon/rust,pczarn/rust,victorvde/rust,barosl/rust,bluss/rand,jbclements/rust,ruud-v-a/rust,KokaKiwi/rust,seanrivera/rust,j16r/rust,servo/rust,arthurprs/rand,nwin/rust,erickt/rust,XMPPwocky/rust,cllns/rust,aidancully/rust,aneeshusa/rust,KokaKiwi/rust,ejjeong/rust,bombless/rust,mdinger/rust,bombless/rust,rohitjoshi/rust,michaelballantyne/rust-gpu,jroesch/rust,jashank/rust,aepsil0n/rust,pczarn/rust,zubron/rust,mitsuhiko/rust,kimroen/rust,ebfull/rust,P1start/rust,GBGamer/rust,krzysz00/rust,rprichard/rust,kwantam/rust,miniupnp/rust,mdinger/rust,carols10cents/rust,vhbit/rust,SiegeLord/rust,zachwick/rust,aidancully/rust,TheNeikos/rust,jbclements/rust,aneeshusa/rust,XMPPwocky/rust,vhbit/rust,untitaker/rust,miniupnp/rust,aturon/rust,nwin/rust,kmcallister/rust,quornian/rust,fabricedesre/rust,AerialX/rust,zachwick/rust,j16r/rust,ktossell/rust,reem/rust,sae-bom/rust,gifnksm/rust,servo/rust,kimroen/rust,nwin/rust,servo/rust,mitsuhiko/rust,SiegeLord/rust,defuz/rust,hauleth/rust,servo/rust,hauleth/rust,TheNeikos/rust,GBGamer/rust,servo/rust,l0kod/rust,aneeshusa/rust,SiegeLord/rust,mvdnes/rust,0x73/rust,aturon/rust,krzysz00/rust,Ryman/rust,XMPPwocky/rust,victorvde/rust,dinfuehr/rust,ruud-v-a/rust,graydon/rust,aepsil0n/rust,GBGamer/rust,erickt/rust,seanrivera/rust,mihneadb/rust,zubron/rust,sarojaba/rust-doc-korean,ebfull/rust,l0kod/rust,pshc/rust,stepancheg/rust-ide-rust,jroesch/rust,LeoTestard/rust,huonw/rand,jroesch/rust,LeoTestard/rust,pczarn/rust,stepancheg/rust-ide-rust,quornian/rust,aneeshusa/rust,avdi/rust,sae-bom/rust,miniupnp/rust,aepsil0n/rust,l0kod/rust,mvdnes/rust,carols10cents/rust,mitsuhiko/rust,Ryman/rust,quornian/rust,richo/rust,richo/rust,rohitjoshi/rust,victorvde/rust,j16r/rust,fabricedesre/rust,emk/rust,stepancheg/rust-ide-rust,KokaKiwi/rust,kmcallister/rust,bombless/rust,XMPPwocky/rust,TheNeikos/rust,kmcallister/rust,LeoTestard/rust,robertg/rust,mahkoh/rust,sarojaba/rust-doc-korean,jashank/rust,ebfull/rust,zachwick/rust,avdi/rust,reem/rust,gifnksm/rust,Ryman/rust,LeoTestard/rust,graydon/rust,graydon/rust,krzysz00/rust,0x73/rust,GBGamer/rust,dwillmer/rust,pshc/rust,zubron/rust,miniupnp/rust,zubron/rust,quornian/rust,LeoTestard/rust,ktossell/rust,mihneadb/rust,ktossell/rust,cllns/rust,pshc/rust,emk/rust,aidancully/rust,pshc/rust,jbclements/rust,AerialX/rust,mdinger/rust