Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions astro.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export default defineConfig({
label: 'LuaJIT client',
slug: 'clients/luajit',
},
{
label: 'D client',
slug: 'clients/d',
},
],
},
],
Expand Down
16 changes: 10 additions & 6 deletions astro/content/docs/clients/d.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ Modules hierarchy:
```bash
.
└── source
├── c
│   ├── ada.d # low-level C bindings - @nogc, nothrow, @safe and betterC compatible
│   └── wrapper.d # D (mangled) RAII - nothrow, @safe and betterC compatible
└── package.d # by default set public wrapper.d in 'import ada_url'
# (for low-level C bindings use 'import c.ada')
└── ada
├── c
│   ├── ada.d # low-level C bindings - @nogc, nothrow, @safe and betterC compatible
│   └── wrapper.d # D (mangled) RAII - @nogc, nothrow, @safe and betterC compatible
└── url
└── package.d # by default set public wrapper.d in 'import ada.url'
# (for low-level C bindings use 'import ada.c.ada')
```

## Usage

Here is an example illustrating a common usage:

```d
import ada_url : AdaUrl, ParseOptions; // @safe, nothrow and betterC compatible
import ada.url : AdaUrl, ParseOptions; // @safe, nothrow and betterC compatible
import std.stdio : writeln; // need GC and throw exception

void main() @safe {
Expand All @@ -46,6 +48,8 @@ void main() @safe {
}
```

full example: [here](https://github.com/kassane/ada-d/tree/main/example)

## Resources

- [Source code][source-code]
Expand Down
Loading