PackageTrack
Sign in Get early access

diplomat

The diplomat FFI generation macro

0.16.1 5.4M downloads/mo #4380 most downloaded on crates.io rust-diplomat/diplomat

What this package is like to depend on

Last release 3 days ago

20 Aug 2026

Ships fairly regularly

a new release about every 3 months

Rarely documented

notes for 3 of 21 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

21 releases · first in 2021

5 releases in the last 12 months

see the full history below

Release timeline

21 releases · Feb 2021 to Aug 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 21
  1. 0.16.1 20 Aug 2026
    Release notes

    Diplomat 0.16.1

    Zulip Chat

    Per discussion in #1235, we now have a dedicated Zulip chat for contributors, maintainers, and anyone curious about Diplomat: https://diplomat.zulipchat.com. Anyone interested in Diplomat is welcome, and no account is needed to browse the channels1.

    Diplomat Runtime Semi-Stabilization

    The Diplomat runtime is moving towards stabilization, so we're implementing a few changes in how we release the diplomat-runtime crate while we move towards diplomat-runtime 1.0.0.

    Our goal is to reduce churn for users using multiple diplomat crates in one build. Because diplomat-runtime exposes no_mangle functions, you can only have one copy at a time linked in to a binary. Once we have diplomat-runtime 1.0.0 we will not have these issues at all, but until then, we are going to limit the number of new 0.x.0 releases of diplomat-runtime we make.

    Previously, diplomat 0.x.0 would always be accompanied by diplomat-runtime 0.x.0 to make it easy to match dependencies, since there is no formal dependency between diplomat and diplomat-runtime. Now, when using diplomat 0.x.0, please use the latest 0.y.z version of diplomat-runtime where y ≤ x. Once we release diplomat-runtime 1.0.0, this will be simpler, just use 1.0.

    Breaking API changes

    Diplomat Tool

    • For backends based on the C backend, generating_struct_fields has been renamed to generate_definition_includes, since this is now used for structs and traits (e75e064)

    Other New Features

    Dart

    • Added Error and Exception to classes/enums which are used as errors and exceptions (#1220) (Contributed by mosuem and Robert Bastian)
    • Pinned Dart SDK to 3.12.2 (#1254)

    .NET

    C++

    • Added traits support (this is a preview feature, not recommended for use in production) (#1234)

    Bug Fixes

    Javascript

    • Added validation to arguments to assure type correctness (#902) (Contributed by Robert Bastian)

    .NET

    The Book

    • Exposed tuples entry (#1233)
    • Improved diplomat-runtime docs (#1242)

    Misc

    1. You will have to make an account to chat, however.

    Open source →
  2. 0.16.0 31 Jul 2026
    Release notes

    Diplomat 0.16.0

    syn v3

    We've upgraded to syn v3 to stay up to date with newer minor releases of syn (#1228)

    .NET backend

    Diplomat used to have a .NET backend with the old AST representation. This was removed since we transitioned to the HIR representation, and existing users have been on an old fork of the AST-based backend. Thankfully, first-time contributor irvingoujAtDevolution has been hard at work implementing the new HIR-based .NET backend:

    #1164 (co-authored with Claude Code), #1180, #1186, #1191, #1189, #1194, #1195, #1193 (co-authored with Claude Sonnet 4.6), #1201, #1216, #1214, #1213, #1215, #1226, #1225, #1230, #1231

    File/Line information in AST Errors

    Diplomat Core's MSRV is now 1.88, which enables support for procedural macro locations, which are used in new AST error reports. These new reports highlight line/file information instead of panicking with minimal context. There's a pretty printer that uses annotate-snippets (enabled by default in the tool, enabled elsewhere with the feature flag "pretty-print"), and an ugly printer (uses no extra dependencies, enabled by default in the macro).

    This was accomplished in two steps: first, we added proc_macro2::Span information to AST. Subsequently, we made five PRs to replace existing panic!, .expect, and assert! calls in the AST parser with these more detailed reports:

    #1172, #1177, #1183, #1206, #1208

    Other New Features

    Diplomat Core

    Diplomat Runtime

    C++

    Nanobind

    Dart

    Bugfixes

    Diplomat Macro

    Diplomat Tool

    JS Backend

    C++ Backend

    Nanobind Backend

    Dart Backend

    The Book

    Misc

    Open source →
  3. 0.15.0 31 Mar 2026
    Release notes

    Update Diplomat to 0.15.0 (#1095)

    Open source →
  4. 0.14.0 27 Oct 2025

    Nothing published for this version

  5. 0.13.0 23 Sep 2025

    Nothing published for this version

  6. 0.12.0 19 May 2025

    Nothing published for this version

  7. 0.11.0 06 May 2025

    Nothing published for this version

  8. 0.10.0 25 Feb 2025

    Nothing published for this version

  9. 0.9.0 23 Nov 2024

    Nothing published for this version

  10. 0.8.0 24 May 2024

    Nothing published for this version

  11. 0.7.0 15 Nov 2023

    Nothing published for this version

  12. 0.6.0 21 Sep 2023

    Nothing published for this version

  13. 0.5.2 28 Apr 2023

    Nothing published for this version

  14. 0.5.1 13 Apr 2023

    Nothing published for this version

  15. 0.5.0 17 Jan 2023

    Nothing published for this version

  16. 0.4.2 28 Oct 2022

    Nothing published for this version

  17. 0.4.1 20 Oct 2022

    Nothing published for this version

  18. 0.4.0 26 Sep 2022

    Nothing published for this version

  19. 0.3.0 29 Apr 2022

    Nothing published for this version

  20. 0.2.0 02 Aug 2021

    Nothing published for this version

  21. 0.1.0 22 Feb 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive