Pydjinni

Latest version: v1.0a6

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0a6

Async Methods, improved error handling and (better) nullability annotations ✨

After a pretty long development period without releases, this new pre-release bundles quite a lot of new capabilities! 🧪

Added

- A completely new [**Project Setup Wizard**](https://pydjinni.github.io/pydjinni/v1.0a5/project_setup/) helps with setting up a new PyDjinni C++ project in no time! (e7f7b3f36cd133f8d70c48253aee8f7cf6c87599)
- The introduction of the new [**async** keyword](https://pydjinni.github.io/pydjinni/v1.0a5/idl/#async) allows the seamless integration of C++ coroutines into asynchronous programming features in Java ([`CompletableFuture`](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html)), .NET ([`Task`](https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/async-return-types)) and Objective-C ([`completion` handlers](https://developer.apple.com/documentation/swift/calling-objective-c-apis-asynchronously)). (927a4643d2b85cffe2bd1fb799e6dc5d10a8c60c)
- The **exception translation** was completely reimagined (927a4643d2b85cffe2bd1fb799e6dc5d10a8c60c, 24e5e22fcc1ae7139c1ac0170aa09a6d5004acd3):
- PyDjinni methods are marked as `noexcept` in C++ by default, unless explicitly annotated with the new [`throws` keyword](https://pydjinni.github.io/pydjinni/v1.0a5/idl/#throwing-exceptions).
- A new [`error` type](https://pydjinni.github.io/pydjinni/v1.0a5/idl/#errors) was introduced. It allows to define custom errors with additional metadata that is translated across language boundaries when thrown. This can be helpful to throw custom domain exceptions.
- C++ exceptions are no longer translated to `NSException` in Objective-C. Instead, throwing methods have an error-parameter that is used to pass a [`NSError` pointer to the caller](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/ErrorHandling/ErrorHandling.html). This change was made because it maps better to the Swift error handling model.
- The handling of optional types in record fields, method parameters or return types as optional, has been extended:
- types not marked with a `?` are not nullable by default. This can be enforced in C++ by configuring a `not_null` wrapper for pointer types.
- Nullability annotations can now be configured for all host languages.
- The C++ record serialization now utilizes the new `std::format` (requires at least C++20).
- The generated Java code does not rely on the deprecated `finalize` method anymore. Instead, it uses a `Cleaner` instance that calls C++ destructors from a separate thread.
- Testing of the generated code has been extended to Kotlin and Swift. (701bd1ea9d740522a27345ba40c95f9038daba49, 503d55254a26229cfabbd5efcdc08ddedd6544fd)
- The **language server capabilities** have been improved. If supported by the editor, the language server can now provide a document outline and code lenses that link to the files that have been generated from the IDL (68081f82a25f13283ef4fe8853709fbad06a0325).
![New language server capabilities in action](https://github.com/user-attachments/assets/7d250268-eea6-4ca5-9e98-7613eda4c708)

Changes

- **Breaking Change:** String serialization is not a record extension anymore. It is now enabled by default and can be disabled for each generated language individually in the `pydjinni.yaml` configuration file.

**Full Changelog**: https://github.com/pydjinni/pydjinni/compare/v1.0a5...v1.0a6

1.0a5

Improving Windows compatibility

This release does not bring any new features, but focuses mainly on improving Windows compatibility. Check out the new [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=PyDjinni.PyDjinni)!

Fixed

- Android Archive packaging is now possible on Windows. (3e04db9fc387149808f19f9140c6873af35c2017)
- The Language Server is now compatible with Visual Studio. (df2fd67e7ebfd9c187a90dd429a7f251d6b725ac)
- A problem with the language server deprecation warning diagnostic reports was fixed. (4904790a05ddbffca7664f22e3ac6c3a87a377a3)


**Full Changelog**: https://github.com/pydjinni/pydjinni/compare/v1.0a4...v1.0a5

1.0a4

Language Server

Added
* PyDjinni now ships with a language server that can be used by IDE plugins for improving the code editing experience. (90cc409ba29eaacc2024e6350af2d13be8090614)
* Python 3.12 is now supported. (079561b30a750af9522eb1935c3f611861d7ce6b)
* The Python wheel does now ship the [`PyDjinni`](https://github.com/pydjinni/pydjinni/blob/main/src/pydjinni/cmake/modules/PyDjinni.cmake) CMake module as a resource. This allows the new [`FindPyDjinni`](https://github.com/pydjinni/pydjinni/blob/main/cmake/modules/FindPyDjinni.cmake) CMake module to load the module from the current Python environment. (f2f1674c1f91f2d2b3dd2fd36c04c1b50a6e0b51)

**Full Changelog**: https://github.com/pydjinni/pydjinni/compare/v1.0a3...v1.0a4

1.0a3

C++/CLI Support, Comment Conversion, Record Deriving, and Enum String Serialization 💪

Added

* C++/CLI support was added (adapted from [cross-language-cpp/djinni-generator](https://github.com/cross-language-cpp/djinni-generator) , [iit-reacts/djinni](https://github.com/iit-reacts/djinni)). (508f749cd5654f9f5c99552c8f093e1dbd69c512)
* Comment conversion was vastly improved! It can now convert Markdown comments from the IDL to Javadoc, Doxygen, DocC and XML doc comments. It supports simple text styling, lists, code blocks, and more. The commands `returns`, `param` and `deprecated` can also be used. Adding `deprecated` to a comment marks the generated interfaces as deprecated (inspired by https://github.com/cross-language-cpp/djinni-generator/pull/156). (9c201ff71864552fdab3893bc7c5a0c18bd2ca37)
* Record deriving is finally implemented, supporting `str`, `eq` and `ord`. (2c6bf441c23e98c362c0f59fa54245b0ec7643c7)
* mutagene added `enum` and `flags` string serialization support in C++ (adapted from [Snapchat/djinni](https://github.com/Snapchat/djinni)). (8b3a4ef40ad885d4368821273c5dad4473db7c5d)

Changed

* The IDL parser was migrated from [Arpeggio](https://textx.github.io/Arpeggio/2.0/) to [ANTLR4](https://www.antlr.org/). This was required for the Language Server (Coming Soon™), because ANTLR4 supports syntax error recovery. (bacf0879e817c64f0b414b93deb72515e435b519)
* **Breaking Change:** The Android AAR packaging process was changed. The generated Java sources are now directly copied to the AAR Gradle project, without a need to package them into a JAR before. (9c201ff71864552fdab3893bc7c5a0c18bd2ca37)

New Contributors

Thanks to the first contributions to this project!

* paulocoutinhox made their first contribution in https://github.com/pydjinni/pydjinni/pull/9
* mutagene made their first contribution in https://github.com/pydjinni/pydjinni/pull/12

**Full Changelog**: https://github.com/pydjinni/pydjinni/compare/v1.0a2...v1.0a3

1.0a2

Initial Preview 🐣

This is the first early preview of the new **PyDjinni** C++ cross-platform library development toolkit.
It is unfinished and should only be used with caution! Some features may be incomplete or even broken!

PyDjinni was heavily inspired by [Djinni](https://djinni.xlcpp.dev).

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.