dynamic 0.9.0
Generates dynamic bindings from static bindings at compile time
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
dynamic
This is an automatic generator for runtime bindings to shared libraries/DLLs
that works based on plain static bindings consisting of - typically
extern(C)
- function prototypes. This means that the same bindings can be
used to either link statically against a library, or to load the library at
runtime.
Example
First, build the example library:
cd example
dub build :foo
This will create a dynamic/shared library in the foo/ sub folder. Afterwards, build and run the example itself:
dub
This will load the generated dynamic library at runtime and will then calls the
exported foo
function. Note how the foo_binding.d
file defines just a static
function prototype, which could just as well be used to statically link against
the library.
- Registered by Sönke Ludwig
- 0.9.0 released 7 years ago
- s-ludwig/dynamic
- MIT
- Copyright © 2017, Sönke Ludwig
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.0 2023-Mar-17 0.9.7 2020-Apr-17 0.9.6 2020-Feb-03 0.9.5 2019-Jun-25 0.9.4 2018-Feb-12 - Download Stats:
-
-
0 downloads today
-
1 downloads this week
-
6 downloads this month
-
361 downloads total
-
- Score:
- 1.4
- Short URL:
- dynamic.dub.pm