Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Characteristics  





2 Runtime environment  



2.1  Object models  





2.2  Virtual machines  







3 Porting  





4 See also  





5 References  





6 External links  














Language binding







Català
Čeština
فارسی
Français

Italiano
Magyar
Nederlands

Português
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Inprogramming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign libraryoroperating system service (one that is not native to that language).

Characteristics[edit]

Binding generally refers to a mapping of one thing to another. In the context of software libraries, bindings are wrapper libraries that bridge two programming languages, so that a library written for one language can be used in another language.[1] Many software libraries are written in system programming languages such as CorC++. To use such libraries from another language, usually of higher-level, such as Java, Common Lisp, Scheme, Python, or Lua, a binding to the library must be created in that language, possibly requiring recompiling the language's code, depending on the amount of modification needed.[2] However, most languages offer a foreign function interface, such as Python's and OCaml's ctypes, and Embeddable Common Lisp's cffi and uffi.[3][4][5]

For example, Python bindings are used when an extant C library, written for some purpose, is to be used from Python. Another example is libsvn which is written in C to provide an API to access the Subversion software repository. To access Subversion from within Java code, libsvnjavahl can be used, which depends on libsvn being installed and acts as a bridge between the language Java and libsvn, thus providing an API that invokes functions from libsvn to do the work.[6]

Major motives to create library bindings include software reuse, to reduce reimplementing a library in several languages, and the difficulty of implementing some algorithms efficiently in some high-level languages.

Runtime environment[edit]

Object models[edit]

Virtual machines[edit]

Porting[edit]

See also[edit]

  • Application binary interface (ABI)
  • Calling convention
  • Embedded SQL
  • Name mangling
  • Simplified Wrapper and Interface Generator (SWIG) – interface binding generator from many languages to many languages, open-source
  • Wrapper function
  • References[edit]

    1. ^ "Appendix A. Creating a language binding for cairo". Cairographics.org. Retrieved 2014-04-02.
  • ^ "Standards, APIs, Interfaces and Bindings". Acm.org. Archived from the original on 2015-01-16. Retrieved 2014-04-02.
  • ^ "ctypes – A foreign function library for Python". Python v3.8.3 documentation. Docs.python.org. Retrieved 2020-06-04.
  • ^ Hickey, Jason; Madhavapeddy, Anil; Minsky, Yaron (2013). "Real Worl OCaml, Chapter 19. Foreign Function Interface". realworldocaml.org. Retrieved 2015-07-19.
  • ^ "Introduction – CFFI User Manual". Common-lisp.net. Retrieved 2014-04-02.
  • ^ "Subversion JavaHL FAQ". Subclipse.tigris.org. 2013-06-18. Retrieved 2014-04-02.
  • External links[edit]


  • t
  • e

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Language_binding&oldid=1044834982"

    Categories: 
    Compilers
    Computer libraries
    Programming language topic stubs
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Articles to be expanded from November 2016
    All articles to be expanded
    Articles using small message boxes
    Articles needing cleanup from November 2016
    All pages needing cleanup
    Articles with sections that need to be turned into prose from November 2016
    All stub articles
     



    This page was last edited on 17 September 2021, at 09:16 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki