Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme: update to include info about breaking changes #87

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ WinRT Go is an autogenerated language projection for Windows Runtime (WinRT) API
The project was originally intended to assist in the development of the Windows implementation of the [tinygo-org/bluetooth](https://github.com/tinygo-org/bluetooth) library.
That's why it currently only contains WinRT APIs related to Bluetooth, but we are open to include new APIs if requested.

> **Note**
> Notice that the code generator is not capable of generating any WinRT types.
> It will work with most of them, but we've added the functionalities we exclusively needed to generate the BLE APIs.
> So some things may still be missing.
> Check out the [known missing features](#known-missing-features) section below for more information.
> [!IMPORTANT]
> Due to the nature of this project we decided not to tag any releases.
> All commits to the `main` branch are considered stable, and we encourage you to use the latest commit available.
>
> Breaking changes in the `main` branch should be an exception, but we may include them in favor of the simplicity of the project.

The project also contains the `winrt-go-gen` code generator and the source Windows Metadata (WinMD) files (located in `/internal/winmd/metadata`) that describe the WinRT APIs.

Notice that the code generator is not capable of generating any WinRT types.
It will work with most of them, but we've added the functionalities we exclusively needed to generate the BLE APIs.
So some things may still be missing.
Check out the [known missing features](#known-missing-features) section below for more information.

## Generated code

All the generated code is stored in the `windows` folder, and is divided in folders that match the namespace of each class.
Expand All @@ -24,6 +29,8 @@ Also notice that the generated method names may differ from the ones defined in
This is because Go does not support method overloading, so we are using the overload name defined in the WinMD files.
The [`GetGattServicesAsync` method](https://docs.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.bluetoothledevice.getgattservicesasync?view=winrt-22621), for example, has an attribute defining the following overload name: `GetGattServicesWithCacheModeAsync`.

This also affects static methods, which include their class name as prefix to avoid collisions between classes inside the same package.

## Generating the code

The code is generated using `go generate`. But the Makefile includes a target (`make gen-files`) that removes all generated code and executes the `go generate` command.
Expand Down
Loading