Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Language binding

From Wikipedia, the free encyclopedia
Software library that allows using another library coded in another programming language

Inprogramming andsoftware design, abinding is anapplication programming interface (API) that providesglue code specifically made to allow aprogramming language to use a foreignlibrary oroperating 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 ofsoftware libraries, bindings arewrapper libraries that bridge twoprogramming languages, so that alibrary written for one language can be used in another language.[1] Many software libraries are written insystem programming languages such asC orC++. To use such libraries from another language, usually ofhigher-level, such asJava,Common Lisp,Scheme,Python, orLua, a binding to the library must be created in that language, possibly requiringrecompiling the language's code, depending on the amount of modification needed.[2] However, most languages offer aforeign function interface, such as Python's andOCaml'sctypes, andEmbeddable Common Lisp'scffi anduffi.[3][4][5]

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

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

Runtime environment

[edit]
[icon]
This sectionneeds expansion. You can help byadding missing information.(November 2016)

Object models

[edit]
Further information:Object model
[icon]
This sectionneeds expansion. You can help byadding missing information.(November 2016)

Virtual machines

[edit]
Further information:Virtual machine
[icon]
This sectionneeds expansion. You can help byadding missing information.(November 2016)

Porting

[edit]
Further information:Porting
[icon]
This sectionneeds expansion. You can help byadding missing information.(November 2016)

See also

[edit]
This articleis inlist format but may read better asprose. You can help byconverting this article, if appropriate.Editing help is available.(November 2016)

References

[edit]
  1. ^"Appendix A. Creating a language binding for cairo". Cairographics.org. Retrieved2014-04-02.
  2. ^"Standards, APIs, Interfaces and Bindings". Acm.org. Archived fromthe original on 2015-01-16. Retrieved2014-04-02.
  3. ^"ctypes – A foreign function library for Python".Python v3.8.3 documentation. Docs.python.org. Retrieved2020-06-04.
  4. ^Hickey, Jason; Madhavapeddy, Anil; Minsky, Yaron (2013)."Real World OCaml, Chapter 19. Foreign Function Interface".realworldocaml.org. Archived fromthe original on 2015-07-18. Retrieved2015-07-19.
  5. ^"Introduction – CFFI User Manual". Common-lisp.net. Retrieved2014-04-02.
  6. ^"Subversion JavaHL FAQ". Subclipse.tigris.org. 2013-06-18. Archived fromthe original on 2014-12-27. Retrieved2014-04-02.

External links

[edit]


Stub icon

Thisprogramming-language-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Language_binding&oldid=1319367572"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp