Skip to content

Commit

Permalink
readme: update to include info about breaking changes
Browse files Browse the repository at this point in the history
Update the readme to include information about `main` branch stability and breaking changes.
  • Loading branch information
jagobagascon authored Mar 20, 2024
1 parent a2e4fc0 commit ec850ee
Showing 1 changed file with 12 additions and 5 deletions.
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

0 comments on commit ec850ee

Please sign in to comment.