-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump v0.7.0+v0.25.0 Create `docs/RELEASE.md` containing the release procedure. Refactor configuration options from `README.md` into `docs/CONFIGURATION.md`. * Update docs/RELEASE.md Co-authored-by: Martynas Gurskas <[email protected]> --------- Co-authored-by: Martynas Gurskas <[email protected]>
- Loading branch information
Showing
7 changed files
with
186 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
---- | ||
|
||
### v0.7.0+v0.25.0 | ||
|
||
- **BREAKING**: Emit `byte[]` instead of `List<byte>` for `bytes` type [#53](https://github.com/NordSecurity/uniffi-bindgen-cs/pull/53). | ||
|
||
---- | ||
|
||
### v0.6.0+v0.25.0 | ||
|
||
- **BREAKING**: Update to uniffi v0.25.0. | ||
- Implement Display trait method for objects. Override ToString() C# object method. | ||
|
||
---- | ||
|
||
### v0.5.1+v0.24.0 | ||
|
||
- Bump to correct crate version. | ||
|
||
### v0.5.0+v0.24.0 | ||
|
||
- **BREAKING**: Update uniffi to 0.24. | ||
- **BREAKING**: Remove `package` configuration option, use `namespace` instead. | ||
- Implement `bytes` type. | ||
- Implement `--library` command line option. | ||
- Default config file to `uniffi.toml` in crate root, if no config file is specified in | ||
command line options. | ||
|
||
---- | ||
|
||
### v0.4.1+v0.23.0 | ||
|
||
- Bump to correct crate version. | ||
|
||
### v0.4.0+v0.23.0 | ||
|
||
- **BREAKING**: Emit flat enum variants using `PascalCase` instead of `SCREAMING_SNAKE_CASE`. | ||
- Lowercase numeric types in generated bindings code. | ||
|
||
---- | ||
|
||
### v0.3.0, v0.3.1 | ||
|
||
This is a version somewhere between 0.23.0 and 0.24.0. This was supposed to be a temporary stepping | ||
stone for the actual 0.24.0 version, but ended up never being actually used (at least by us). It | ||
is reverted in main branch. Use v0.2.0 instead. | ||
|
||
- **DO NOT USE, UNFINISHED** | ||
|
||
---- | ||
|
||
### v0.2.4+v0.23.0 | ||
|
||
- Fix missing imports when ImplicitUsings is not enabled. | ||
- Allow configuration of global methods class name (uniffi.toml: global_methods_class_name). | ||
|
||
### v0.2.3+v0.23.0 | ||
|
||
- Fix 0.2 release to be compatible with mozilla/uniffi-rs 0.23.0 after docstring changes. | ||
|
||
### v0.2.2+v0.23.0 | ||
|
||
- Implement docstrings. | ||
|
||
### v0.2.1+v0.23.0 | ||
|
||
- Add `namespace` configuration option to `uniffi.toml`. | ||
|
||
### v0.2.0+v0.23.0 | ||
|
||
- **BREAKING**: Update uniffi to 0.23.0. | ||
- Allow `uniffi-bindgen-cs` to be used as a library. | ||
|
||
---- |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "uniffi-bindgen-cs" | ||
version = "0.6.0+v0.25.0" | ||
version = "0.7.0+v0.25.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Configuration options | ||
|
||
It's possible to configure some settings by passing `--config` argument to the generator. All | ||
configuration keys are defined in `bindings.csharp` section. | ||
```bash | ||
uniffi-bindgen-cs path/to/definitions.udl --config path/to/uniffi.toml | ||
``` | ||
|
||
- `cdylib_name` - override the dynamic library name linked by generated bindings, excluding `lib` | ||
prefix and `.dll` file extension. When using `--library` mode, defaults to library's name. | ||
In standalone mode this value is required, and error will be produced if its missing. | ||
```toml | ||
# For library `libgreeter.dll` | ||
[bindings.csharp] | ||
cdylib_name = "greeter" | ||
``` | ||
|
||
- `custom_types` - properties for custom type defined in UDL with `[Custom] typedef string Url;`. | ||
```toml | ||
# Represent URL as a C# native `Uri` class. The underlying type of URL is a string. | ||
[bindings.csharp.custom_types.Url] | ||
imports = ["System"] | ||
type_name = "Uri" | ||
into_custom = "new Uri({})" | ||
from_custom = "{}.AbsoluteUri" | ||
``` | ||
|
||
- `imports` (optional) - any imports required to satisfy this type. | ||
|
||
- `type_name` (optional) - the name to represent the type in generated bindings. Default is the | ||
type alias name from UDL, e.g. `Url`. | ||
|
||
- `into_custom` (required) - an expression to convert from the underlying type into custom type. `{}` will | ||
will be expanded into variable containing the underlying value. The expression is used in a | ||
return statement, i.e. `return <expression(value)>;`. | ||
|
||
- `from_custom` (required) - an expression to convert from the custom type into underlying type. `{}` will | ||
will be expanded into variable containing the custom value. The expression is used in a | ||
return statement, i.e. `return <expression(value);>`. | ||
|
||
- `namespace` - override the `namespace ..;` declaration in generated bindings file. The default is | ||
`uniffi.{{namespace}}`, where `namespace` is the namespace from UDL file. | ||
```toml | ||
# emits `namespace com.example.greeter;` in generated bindings file | ||
[bindings.csharp] | ||
namespace = "com.example.greeter" | ||
``` | ||
|
||
- `global_methods_class_name` - override the class name containing top level functions. The default | ||
is `{{namespace}}Methods`, where `namespace` is the namespace from UDL file. | ||
```toml | ||
# emits `public static class LibGreeter { .. }` in generated bindings file | ||
[bindings.csharp] | ||
namespace = "LibGreeter" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## Figure out next version | ||
|
||
Following [versioning rules](../README.md/#versioning), figure | ||
out the version to be made. If there were any breaking changes since last version, bump the minor | ||
component. If there weren't any breaking changes, bump the patch component. | ||
|
||
The version follows semver, and consists of `uniffi-bindgen-cs` base version, followed by | ||
upstream `uniffi-rs` version in the build metadata component (denoted as `+`). The upstream explicit | ||
upstream `uniffi-rs` aids consumer to target the same upstream version when mixing multiple | ||
generators, e.g. `uniffi-bindgen-cs` and `uniffi-bindgen-go`. | ||
``` | ||
v0.6.0+v0.25.0 | ||
``` | ||
|
||
## Update version in [bindgen/Cargo.toml](../bindgen/Cargo.toml) | ||
|
||
Note that the version in [bindgen/Cargo.toml](../bindgen/Cargo.toml) is not prefixed with `v`, | ||
i.e. `0.6.0+v0.25.0` instead of `v0.6.0+v0.25.0`. | ||
|
||
## Update version in [Cargo.lock](../Cargo.lock) | ||
|
||
Run any `cargo` command to include the new version in `Cargo.lock` file, e.g. | ||
``` | ||
cargo build | ||
``` | ||
|
||
## Update version in [README.md](../README.md) | ||
|
||
- Update the [installation command](../README.md#how-to-install) to use the new version. | ||
- If upstream uniffi-rs version was updated, add new entry to [versioning table](../README.md#versioning). | ||
|
||
## Update [CHANGELOG.md](../CHANGELOG.md) | ||
|
||
Inspect Git history, create a list of changes since last version. | ||
- For breaking changes, prefix the change with `**BREAKING**:` | ||
- For important changes, such as memory leak or race condition fixes, prefix the change with `**IMPORTANT**:` | ||
|
||
## Create PR | ||
|
||
Create PR, get the PR reviewed, and merge into `main`. | ||
|
||
## Create tag | ||
|
||
Once the PR is merged into `main`, create new tag in `main` branch. |
File renamed without changes.