Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
da17715
Basic setup of `wit-bindgen-d`
QuantumSegfault Mar 6, 2026
8e1666e
Initial support for most types.
QuantumSegfault Mar 10, 2026
bc9d5b1
Basic implementation of `wit.common` type templates.
QuantumSegfault Mar 10, 2026
fd71969
Refactor type generation
QuantumSegfault Mar 12, 2026
615677f
Resource import handles, WitVariant, and raw function imports.
QuantumSegfault Mar 15, 2026
22ba37d
Initial pass implementing of `FunctionBindgen` for imports.
QuantumSegfault Mar 18, 2026
401d4db
Basic export support.
QuantumSegfault Mar 20, 2026
3916ffa
Begin support for `cargo run test`
QuantumSegfault Mar 25, 2026
4e07c64
Finish world-level imports & exports.
QuantumSegfault Mar 31, 2026
3b72344
Fix resource lookups
QuantumSegfault Apr 2, 2026
fa89c21
Reorder emit instructions
QuantumSegfault Apr 3, 2026
14a4554
Fixed length lists
QuantumSegfault Apr 3, 2026
1c61360
Bitcasts, fixed export _retArea, make sure async fails.
QuantumSegfault Apr 3, 2026
0629cd5
Import and export static methods
QuantumSegfault Apr 8, 2026
3738327
Add export stub generation
QuantumSegfault Apr 8, 2026
2f9a7ff
Implement resource exports + stubs
QuantumSegfault Apr 9, 2026
6b6fd0f
cabi_post_* and cabi_realloc
QuantumSegfault Apr 9, 2026
30367fc
Merge branch 'main' into dlang
QuantumSegfault Apr 13, 2026
4d241db
Resource constructors
QuantumSegfault Apr 13, 2026
47da164
Resource alloc/dealloc
QuantumSegfault Apr 14, 2026
504f004
GitHub CI integration
QuantumSegfault Apr 14, 2026
c14326a
`ci/publish.rs` crate whitelist
QuantumSegfault Apr 14, 2026
e2d9662
Fix warnings, fix CI integration
QuantumSegfault Apr 14, 2026
c2ed6be
Replace `add_extension` with `set_extension`
QuantumSegfault Apr 14, 2026
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
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# moonbit removed from language matrix for now - causing CI failures
lang: [c, rust, csharp, cpp, go]
lang: [c, rust, csharp, cpp, go, d]
exclude:
# For now csharp doesn't work on macos, so exclude it from testing.
- os: macos-latest
Expand Down Expand Up @@ -111,6 +111,12 @@ jobs:
go-version: 1.25.4
if: matrix.lang == 'go'

- name: Setup D
uses: dlang-community/setup-dlang@v2
with:
compiler: ldc-1.41
if: matrix.lang == 'd'

# Hacky work-around for https://github.com/dotnet/runtime/issues/80619
- run: dotnet new console -o /tmp/foo
if: matrix.os != 'windows-latest' && matrix.lang == 'csharp'
Expand Down
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ wit-bindgen-csharp = { path = 'crates/csharp', version = '0.55.0' }
wit-bindgen-markdown = { path = 'crates/markdown', version = '0.55.0' }
wit-bindgen-moonbit = { path = 'crates/moonbit', version = '0.55.0' }
wit-bindgen-go = { path = 'crates/go', version = '0.55.0' }
wit-bindgen-d = { path = 'crates/d', version = '0.55.0' }
wit-bindgen = { path = 'crates/guest-rust', version = '0.55.0', default-features = false }
wit-bindgen-test = { path = 'crates/test', version = '0.55.0' }

Expand Down Expand Up @@ -95,6 +96,7 @@ wit-bindgen-markdown = { workspace = true, features = ['clap'], optional = true
wit-bindgen-moonbit = { workspace = true, features = ['clap'], optional = true }
wit-bindgen-csharp = { workspace = true, features = ['clap'], optional = true }
wit-bindgen-go = { workspace = true, features = ['clap'], optional = true }
wit-bindgen-d = { workspace = true, features = ['clap'], optional = true }
wit-bindgen-test = { workspace = true }
wit-component = { workspace = true }
wasm-encoder = { workspace = true }
Expand All @@ -109,7 +111,8 @@ default = [
'csharp',
'cpp',
'moonbit',
'async',
'd',
'async'
]
c = ['dep:wit-bindgen-c']
cpp = ['dep:wit-bindgen-cpp']
Expand All @@ -119,4 +122,5 @@ go = ['dep:wit-bindgen-go']
csharp = ['dep:wit-bindgen-csharp']
csharp-mono = ['csharp']
moonbit = ['dep:wit-bindgen-moonbit']
d = ['dep:wit-bindgen-d']
async = []
1 change: 1 addition & 0 deletions ci/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"wit-bindgen-markdown",
"wit-bindgen-moonbit",
"wit-bindgen-go",
"wit-bindgen-d",
"wit-bindgen-rust-macro",
"wit-bindgen-rt",
"wit-bindgen",
Expand Down
33 changes: 33 additions & 0 deletions crates/d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "wit-bindgen-d"
authors = ["Demetrius Kanios <demetrius@kanios.net>"]
version = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
rust-version = { workspace = true }
homepage = 'https://github.com/bytecodealliance/wit-bindgen'
description = """
D bindings generator for WIT and the component model, typically used through the
`wit-bindgen-cli` crate.
"""

[lints]
workspace = true

[lib]
doctest = false
test = false

[dependencies]
wit-bindgen-core = { workspace = true }
wit-component = { workspace = true }
wasm-encoder = { workspace = true }
wasm-metadata = { workspace = true }
anyhow = { workspace = true }
heck = { workspace = true }
clap = { workspace = true, optional = true }
indexmap = { workspace = true }

[features]
clap = ['dep:clap', 'wit-bindgen-core/clap']
1 change: 1 addition & 0 deletions crates/d/LICENSE-APACHE
1 change: 1 addition & 0 deletions crates/d/LICENSE-Apache-2.0_WITH_LLVM-exception
1 change: 1 addition & 0 deletions crates/d/LICENSE-MIT
17 changes: 17 additions & 0 deletions crates/d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `wit-bindgen` D Bindings Generator

This tool generates [D](https://dlang.org) bindings for a chosen WIT world.

## Usage

To generate bindings with this crate, issue the `d` subcommand to `wit-bindgen`:

```bash
$ wit-bindgen d [OPTIONS] <WIT>
```

See the output of `wit-bindgen help d` for available options.

-------

TODO: Flesh out fuller docs (ownership, more usage, examples, etc.)
Loading
Loading