Thread overview
@safe SQL database on Windows
February 12, 2022

I'm trying to use a SQL database with vibe.d on Windows. I'd like to write fully @safe code on Windows. I know I could just use @trusted but I need to be sure that the library code can be trusted. It would be nice if the library is also somewhat popular so I know it won't just be forgotten and never be supported. I've tried many libraries including the following:

  • mysql-native seems nice except for the @system code;
  • derelict-pq is also @system and requires a wrapping for using D types additionaly;
  • dpq2 is @system and tries to link to pq.lib instead of libpq.lib and the lib directory inside the postgresql installation needs to be included in PATH.
February 12, 2022

On 2/12/22 2:03 PM, Mateus de Lima Oliveira wrote:

>

I'm trying to use a SQL database with vibe.d on Windows. I'd like to write fully @safe code on Windows. I know I could just use @trusted but I need to be sure that the library code can be trusted. It would be nice if the library is also somewhat popular so I know it won't just be forgotten and never be supported. I've tried many libraries including the following:

  * mysql-native seems nice except for the @system code;

I'm working on mysql-native to be @safe. Sorry, it's been on my plate for a while. I was nearly complete, and then I had to take over the whole library (Nick handed me the reins).

It's in a state right now where I have to pretty much port all the changes to the latest branch. It's not really hard, but because I shuffled all the tests from the main library, the code is impossible to rebase.

I'm hoping in the next month I'll have it merged. Then @safe mysql-native will be a thing.

For reference:

https://github.com/mysql-d/mysql-native/issues/175
https://github.com/mysql-d/mysql-native/pull/214

-Steve

February 14, 2022

On Sunday, 13 February 2022 at 01:58:31 UTC, Steven Schveighoffer wrote:

>

I'm hoping in the next month I'll have it merged. Then @safe mysql-native will be a thing.

This is great news, Steve. I will mark my code @trusted meanwhile and wait for the merge.