bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
36 stars 22 forks source link

Replace usage of our own vector/xvector classes with DRuntime's #298

Open AndrejMitrovic opened 5 years ago

AndrejMitrovic commented 5 years ago

Once our minimum supported version becomes v2.088 (including LDC), we can leverage the DRuntime bindings for vector/string classes: https://dlang.org/changelog/2.088.0.html#std_vector

This shouldn't be done yet as we are still using older versions of DMD (and LDC).

Geod24 commented 5 years ago

Some of the tests might not be enabled though. Manu mostly wanted to get things up and running for Windows which is what he uses. See e.g. https://github.com/dlang/druntime/pull/2722

Geod24 commented 4 years ago

We need https://github.com/dlang/dmd/pull/10593 and https://github.com/dlang/druntime/pull/2878

Geod24 commented 3 years ago

@omerfirmak : This was the original plan. However, as I mentioned, cross compilation is an issue. It is quite likely that LDC uses the clang++ runtime by default (instead of G++'s), in which case this would still be possible and save you some time. However, you'd have to find a way to make things like std::vector serializable (Vibe.d, serializer) in a non-intrusive way. Currently we do this via the range interface: https://github.com/bosagora/agora/blob/c1d67bf97c663e2b4e6c2db118f693aef034283e/source/scpd/Cpp.d#L260-L279

omerfirmak commented 3 years ago

This first needs a way to emit CppRuntime_Clang on Linux, which is not possible ATM.

omerfirmak commented 3 years ago

https://github.com/ldc-developers/druntime/blob/45e2e56451e22dd834bef6ec8f541aa299293e92/src/core/stdcpp/vector.d#L15-L17

Sadly druntime std::vector only supports Windows runtime.