This is where ImportC should shine, we'd no longer have to maintain bindings manually (hopefully)
June 03, 2021 Re: (Skia) Submit project to bindbc? | ||||
---|---|---|---|---|
| ||||
Posted in reply to pilger |
June 04, 2021 Re: (Skia) Submit project to bindbc? | ||||
---|---|---|---|---|
| ||||
Posted in reply to russhy | On 04/06/2021 10:18 AM, russhy wrote:
> This is where ImportC should shine, we'd no longer have to maintain bindings manually (hopefully)
That only includes static linking (both objects and shared libraries).
Dynamic linking of shared libraries which BindBC has as one of its key features isn't covered as of right now (not expected to).
|
June 04, 2021 Re: (Skia) Submit project to bindbc? | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Friday, 4 June 2021 at 00:52:21 UTC, rikki cattermole wrote:
> That only includes static linking (both objects and shared libraries).
Well, if importc works as well as claimed, it would be trivial to do a dynamic load off it using the same pattern I did in simpledisplay's dynamic loader: reflect over the static stuff and mix in dynamic stuff from it.
|
June 04, 2021 Re: (Skia) Submit project to bindbc? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Thursday, 3 June 2021 at 11:42:05 UTC, Ola Fosheim Grøstad wrote: >On Thursday, 3 June 2021 at 11:35:32 UTC, evilrat wrote: >Unfortunately it is still sucks because it uses STL, and there is tons of junk in it. Maybe if I could just strip produced garbage and take only what is used (atomics, unique_ptr, strings, etc..., but not all those extra functions) it will work. So maybe it is better to write an abstraction layer in C++ that can be used directly from D. Other than that, Skia is a good test case for D's C++ support. Actually I tried this as quick hack and it writes text on top of C API demo. So it is indeed just thin wrapper, and it makes possible to extend bindings to load text functions on top of it. HACK: DO NOT USEmain.d (add on top)
main.d (insert at the end of draw function before delete block)
|
June 07, 2021 Re: (Skia) Submit project to bindbc? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | Am 04.06.2021 um 03:11 schrieb Adam D. Ruppe: > On Friday, 4 June 2021 at 00:52:21 UTC, rikki cattermole wrote: >> That only includes static linking (both objects and shared libraries). > > Well, if importc works as well as claimed, it would be trivial to do a dynamic load off it using the same pattern I did in simpledisplay's dynamic loader: reflect over the static stuff and mix in dynamic stuff from it. FWIW, I've also made a little library a while ago that does this. It probably doesn't handle all attributes correctly, but otherwise works for any static binding: https://code.dlang.org/packages/dynamic |