Mercurial > hg > orthanc-book
comparison Sphinx/source/developers/creating-plugins.rst @ 795:23271902921a
replace ABI by more adequate FFI
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Dec 2021 13:19:11 +0100 |
parents | e22c1284ea0e |
children | 01fa632daae9 |
comparison
equal
deleted
inserted
replaced
794:e22c1284ea0e | 795:23271902921a |
---|---|
16 <https://sdk.orthanc-server.com/>`__ whose interface is available as a | 16 <https://sdk.orthanc-server.com/>`__ whose interface is available as a |
17 `C header | 17 `C header |
18 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h>`__. | 18 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h>`__. |
19 As a consequence, an Orthanc plugin will typically be written using C | 19 As a consequence, an Orthanc plugin will typically be written using C |
20 or C++, although it is also possible to create native plugins using | 20 or C++, although it is also possible to create native plugins using |
21 languages that feature compatibility with C headers and with C ABI | 21 languages that feature compatibility with C headers and with `FFI of |
22 (such as Rust or Objective-C). | 22 the C language |
23 <https://en.wikipedia.org/wiki/Foreign_function_interface>`__ (such as | |
24 Rust or Objective-C). | |
23 | 25 |
24 For developers who are more familiar with Python, it is also possible | 26 For developers who are more familiar with Python, it is also possible |
25 to create plugins using this simpler language. Check out the | 27 to create plugins using this simpler language. Check out the |
26 :ref:`dedicated Python plugin <python-plugin>`. | 28 :ref:`dedicated Python plugin <python-plugin>`. |
27 | 29 |
65 Structure of the plugins | 67 Structure of the plugins |
66 ------------------------ | 68 ------------------------ |
67 | 69 |
68 A plugin takes the form of a shared library (``.DLL`` under Windows, | 70 A plugin takes the form of a shared library (``.DLL`` under Windows, |
69 ``.so`` under GNU/Linux, ``.dylib`` under Apple OS X...) that uses the | 71 ``.so`` under GNU/Linux, ``.dylib`` under Apple OS X...) that uses the |
70 `ABI of the C language | 72 `FFI of the C language |
71 <https://en.wikipedia.org/wiki/Application_binary_interface>`__ to | 73 <https://en.wikipedia.org/wiki/Application_binary_interface>`__ to |
72 declare 4 public functions/symbols: | 74 declare 4 public functions/symbols: |
73 | 75 |
74 * ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This | 76 * ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This |
75 callback function is responsible for initializing the plugin. The | 77 callback function is responsible for initializing the plugin. The |