Compare commits

...
Author SHA1 Message Date
Vinzenz Schroeter
13a34e83d7 update to wip uniffi binding
Some checks failed
Rust / build (pull_request) Failing after 18s
2025-06-13 11:48:40 +02:00
Vinzenz Schroeter
08bc35db29 update to nixos 25.05 2025-06-13 11:44:44 +02:00
Vinzenz Schroeter
5d69c140ba remove workspace 2025-06-13 11:44:21 +02:00
8 changed files with 723 additions and 437 deletions

View file

@ -1,3 +0,0 @@
[workspace]
resolver = "2"
members = ["uniffi-bindgen-cs", "servicepoint-binding-uniffi"]

View file

@ -1,8 +1,7 @@
using System.Threading;
using ServicePoint;
// TODO: replace with new Connection("127.0.0.1:2342") to send to a real display
var connection = Connection.NewFake();
var connection = new Connection("127.0.0.1:2342");
connection.Send(Command.Clear());
connection.Send(Command.Brightness(5));

View file

@ -15,6 +15,8 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
namespace ServicePoint;
using Brightness = Byte;
using FfiConverterTypeBrightness = FfiConverterUInt8;
@ -816,6 +818,22 @@ static class _UniFFILib {
@ -936,6 +954,18 @@ static class _UniFFILib {
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitmap_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_bitmaplegacycommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitmaplegacycommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_bitmaplegacycommand_new(ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_brightnessgrid(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
@ -1052,6 +1082,18 @@ static class _UniFFILib {
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_chargrid_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_clearcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_clearcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_new(ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_command(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
@ -1172,6 +1214,30 @@ static class _UniFFILib {
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_cp437grid_width(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_fadeoutcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_fadeoutcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_new(ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_clone_hardresetcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_hardresetcommand(IntPtr @ptr,ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_new(ref UniffiRustCallStatus _uniffi_out_err
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern RustBuffer uniffi_servicepoint_binding_uniffi_fn_func_get_constants(ref UniffiRustCallStatus _uniffi_out_err
);
@ -1600,6 +1666,10 @@ static class _UniFFILib {
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_clone(
);
@ -1624,6 +1694,10 @@ static class _UniFFILib {
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear(
);
@ -1680,6 +1754,14 @@ static class _UniFFILib {
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new(
);
[DllImport("servicepoint_binding_uniffi", CallingConvention = CallingConvention.Cdecl)]
public static extern uint ffi_servicepoint_binding_uniffi_uniffi_contract_version(
);
@ -1792,14 +1874,14 @@ static class _UniFFILib {
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill();
if (checksum != 47185) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill` checksum `47185`, library returned `{checksum}`");
if (checksum != 46387) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_fill` checksum `46387`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get();
if (checksum != 39844) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get` checksum `39844`, library returned `{checksum}`");
if (checksum != 47112) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_get` checksum `47112`, library returned `{checksum}`");
}
}
{
@ -1810,8 +1892,8 @@ static class _UniFFILib {
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set();
if (checksum != 24064) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set` checksum `24064`, library returned `{checksum}`");
if (checksum != 27525) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_brightnessgrid_set` checksum `27525`, library returned `{checksum}`");
}
}
{
@ -1994,6 +2076,12 @@ static class _UniFFILib {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized` checksum `47687`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new();
if (checksum != 44315) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmaplegacycommand_new` checksum `44315`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_brightnessgrid_clone();
if (checksum != 56444) {
@ -2030,6 +2118,12 @@ static class _UniFFILib {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_chargrid_new` checksum `2094`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new();
if (checksum != 340) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_clearcommand_new` checksum `340`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear();
if (checksum != 62752) {
@ -2114,6 +2208,18 @@ static class _UniFFILib {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_cp437grid_new` checksum `8874`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new();
if (checksum != 9933) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_fadeoutcommand_new` checksum `9933`, library returned `{checksum}`");
}
}
{
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new();
if (checksum != 65216) {
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_hardresetcommand_new` checksum `65216`, library returned `{checksum}`");
}
}
}
}
@ -2680,13 +2786,139 @@ class FfiConverterTypeBitmap: FfiConverter<Bitmap, IntPtr> {
public interface IBitmapLegacyCommand {
}
public class BitmapLegacyCommand : IBitmapLegacyCommand, IDisposable {
protected IntPtr pointer;
private int _wasDestroyed = 0;
private long _callCounter = 1;
public BitmapLegacyCommand(IntPtr pointer) {
this.pointer = pointer;
}
~BitmapLegacyCommand() {
Destroy();
}
public BitmapLegacyCommand() :
this(
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmaplegacycommand_new( ref _status)
)) {}
protected void FreeRustArcPtr() {
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitmaplegacycommand(this.pointer, ref status);
});
}
protected IntPtr CloneRustArcPtr() {
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_bitmaplegacycommand(this.pointer, ref status);
});
}
public void Destroy()
{
// Only allow a single call to this method.
if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0)
{
// This decrement always matches the initial count of 1 given at creation time.
if (Interlocked.Decrement(ref _callCounter) == 0)
{
FreeRustArcPtr();
}
}
}
public void Dispose()
{
Destroy();
GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead.
}
private void IncrementCallCounter()
{
// Check and increment the call counter, to keep the object alive.
// This needs a compare-and-set retry loop in case of concurrent updates.
long count;
do
{
count = Interlocked.Read(ref _callCounter);
if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name));
if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name));
} while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count);
}
private void DecrementCallCounter()
{
// This decrement always matches the increment we performed above.
if (Interlocked.Decrement(ref _callCounter) == 0) {
FreeRustArcPtr();
}
}
internal void CallWithPointer(Action<IntPtr> action)
{
IncrementCallCounter();
try {
action(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
internal T CallWithPointer<T>(Func<IntPtr, T> func)
{
IncrementCallCounter();
try {
return func(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
}
class FfiConverterTypeBitmapLegacyCommand: FfiConverter<BitmapLegacyCommand, IntPtr> {
public static FfiConverterTypeBitmapLegacyCommand INSTANCE = new FfiConverterTypeBitmapLegacyCommand();
public override IntPtr Lower(BitmapLegacyCommand value) {
return value.CallWithPointer(thisPtr => thisPtr);
}
public override BitmapLegacyCommand Lift(IntPtr value) {
return new BitmapLegacyCommand(value);
}
public override BitmapLegacyCommand Read(BigEndianStream stream) {
return Lift(new IntPtr(stream.ReadLong()));
}
public override int AllocationSize(BitmapLegacyCommand value) {
return 8;
}
public override void Write(BitmapLegacyCommand value, BigEndianStream stream) {
stream.WriteLong(Lower(value).ToInt64());
}
}
public interface IBrightnessGrid {
byte[] CopyRaw();
bool Equals(BrightnessGrid @other);
void Fill(byte @value);
byte Get(ulong @x, ulong @y);
void Fill(Brightness @value);
Brightness Get(ulong @x, ulong @y);
ulong Height();
void Set(ulong @x, ulong @y, byte @value);
void Set(ulong @x, ulong @y, Brightness @value);
ulong Width();
}
public class BrightnessGrid : IBrightnessGrid, IDisposable {
@ -2799,17 +3031,17 @@ public class BrightnessGrid : IBrightnessGrid, IDisposable {
}
public void Fill(byte @value) {
public void Fill(Brightness @value) {
CallWithPointer(thisPtr =>
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_fill(thisPtr, FfiConverterUInt8.INSTANCE.Lower(@value), ref _status)
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_fill(thisPtr, FfiConverterTypeBrightness.INSTANCE.Lower(@value), ref _status)
));
}
public byte Get(ulong @x, ulong @y) {
return CallWithPointer(thisPtr => FfiConverterUInt8.INSTANCE.Lift(
public Brightness Get(ulong @x, ulong @y) {
return CallWithPointer(thisPtr => FfiConverterTypeBrightness.INSTANCE.Lift(
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_get(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), ref _status)
)));
@ -2824,10 +3056,10 @@ public class BrightnessGrid : IBrightnessGrid, IDisposable {
}
public void Set(ulong @x, ulong @y, byte @value) {
public void Set(ulong @x, ulong @y, Brightness @value) {
CallWithPointer(thisPtr =>
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterUInt8.INSTANCE.Lower(@value), ref _status)
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_brightnessgrid_set(thisPtr, FfiConverterUInt64.INSTANCE.Lower(@x), FfiConverterUInt64.INSTANCE.Lower(@y), FfiConverterTypeBrightness.INSTANCE.Lower(@value), ref _status)
));
}
@ -3151,6 +3383,132 @@ class FfiConverterTypeCharGrid: FfiConverter<CharGrid, IntPtr> {
public interface IClearCommand {
}
public class ClearCommand : IClearCommand, IDisposable {
protected IntPtr pointer;
private int _wasDestroyed = 0;
private long _callCounter = 1;
public ClearCommand(IntPtr pointer) {
this.pointer = pointer;
}
~ClearCommand() {
Destroy();
}
public ClearCommand() :
this(
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_clearcommand_new( ref _status)
)) {}
protected void FreeRustArcPtr() {
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_clearcommand(this.pointer, ref status);
});
}
protected IntPtr CloneRustArcPtr() {
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_clearcommand(this.pointer, ref status);
});
}
public void Destroy()
{
// Only allow a single call to this method.
if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0)
{
// This decrement always matches the initial count of 1 given at creation time.
if (Interlocked.Decrement(ref _callCounter) == 0)
{
FreeRustArcPtr();
}
}
}
public void Dispose()
{
Destroy();
GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead.
}
private void IncrementCallCounter()
{
// Check and increment the call counter, to keep the object alive.
// This needs a compare-and-set retry loop in case of concurrent updates.
long count;
do
{
count = Interlocked.Read(ref _callCounter);
if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name));
if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name));
} while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count);
}
private void DecrementCallCounter()
{
// This decrement always matches the increment we performed above.
if (Interlocked.Decrement(ref _callCounter) == 0) {
FreeRustArcPtr();
}
}
internal void CallWithPointer(Action<IntPtr> action)
{
IncrementCallCounter();
try {
action(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
internal T CallWithPointer<T>(Func<IntPtr, T> func)
{
IncrementCallCounter();
try {
return func(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
}
class FfiConverterTypeClearCommand: FfiConverter<ClearCommand, IntPtr> {
public static FfiConverterTypeClearCommand INSTANCE = new FfiConverterTypeClearCommand();
public override IntPtr Lower(ClearCommand value) {
return value.CallWithPointer(thisPtr => thisPtr);
}
public override ClearCommand Lift(IntPtr value) {
return new ClearCommand(value);
}
public override ClearCommand Read(BigEndianStream stream) {
return Lift(new IntPtr(stream.ReadLong()));
}
public override int AllocationSize(ClearCommand value) {
return 8;
}
public override void Write(ClearCommand value, BigEndianStream stream) {
stream.WriteLong(Lower(value).ToInt64());
}
}
public interface ICommand {
bool Equals(Command @other);
}
@ -3706,6 +4064,258 @@ class FfiConverterTypeCp437Grid: FfiConverter<Cp437Grid, IntPtr> {
public interface IFadeOutCommand {
}
public class FadeOutCommand : IFadeOutCommand, IDisposable {
protected IntPtr pointer;
private int _wasDestroyed = 0;
private long _callCounter = 1;
public FadeOutCommand(IntPtr pointer) {
this.pointer = pointer;
}
~FadeOutCommand() {
Destroy();
}
public FadeOutCommand() :
this(
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_fadeoutcommand_new( ref _status)
)) {}
protected void FreeRustArcPtr() {
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_fadeoutcommand(this.pointer, ref status);
});
}
protected IntPtr CloneRustArcPtr() {
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_fadeoutcommand(this.pointer, ref status);
});
}
public void Destroy()
{
// Only allow a single call to this method.
if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0)
{
// This decrement always matches the initial count of 1 given at creation time.
if (Interlocked.Decrement(ref _callCounter) == 0)
{
FreeRustArcPtr();
}
}
}
public void Dispose()
{
Destroy();
GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead.
}
private void IncrementCallCounter()
{
// Check and increment the call counter, to keep the object alive.
// This needs a compare-and-set retry loop in case of concurrent updates.
long count;
do
{
count = Interlocked.Read(ref _callCounter);
if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name));
if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name));
} while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count);
}
private void DecrementCallCounter()
{
// This decrement always matches the increment we performed above.
if (Interlocked.Decrement(ref _callCounter) == 0) {
FreeRustArcPtr();
}
}
internal void CallWithPointer(Action<IntPtr> action)
{
IncrementCallCounter();
try {
action(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
internal T CallWithPointer<T>(Func<IntPtr, T> func)
{
IncrementCallCounter();
try {
return func(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
}
class FfiConverterTypeFadeOutCommand: FfiConverter<FadeOutCommand, IntPtr> {
public static FfiConverterTypeFadeOutCommand INSTANCE = new FfiConverterTypeFadeOutCommand();
public override IntPtr Lower(FadeOutCommand value) {
return value.CallWithPointer(thisPtr => thisPtr);
}
public override FadeOutCommand Lift(IntPtr value) {
return new FadeOutCommand(value);
}
public override FadeOutCommand Read(BigEndianStream stream) {
return Lift(new IntPtr(stream.ReadLong()));
}
public override int AllocationSize(FadeOutCommand value) {
return 8;
}
public override void Write(FadeOutCommand value, BigEndianStream stream) {
stream.WriteLong(Lower(value).ToInt64());
}
}
public interface IHardResetCommand {
}
public class HardResetCommand : IHardResetCommand, IDisposable {
protected IntPtr pointer;
private int _wasDestroyed = 0;
private long _callCounter = 1;
public HardResetCommand(IntPtr pointer) {
this.pointer = pointer;
}
~HardResetCommand() {
Destroy();
}
public HardResetCommand() :
this(
_UniffiHelpers.RustCall( (ref UniffiRustCallStatus _status) =>
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_hardresetcommand_new( ref _status)
)) {}
protected void FreeRustArcPtr() {
_UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_hardresetcommand(this.pointer, ref status);
});
}
protected IntPtr CloneRustArcPtr() {
return _UniffiHelpers.RustCall((ref UniffiRustCallStatus status) => {
return _UniFFILib.uniffi_servicepoint_binding_uniffi_fn_clone_hardresetcommand(this.pointer, ref status);
});
}
public void Destroy()
{
// Only allow a single call to this method.
if (Interlocked.CompareExchange(ref _wasDestroyed, 1, 0) == 0)
{
// This decrement always matches the initial count of 1 given at creation time.
if (Interlocked.Decrement(ref _callCounter) == 0)
{
FreeRustArcPtr();
}
}
}
public void Dispose()
{
Destroy();
GC.SuppressFinalize(this); // Suppress finalization to avoid unnecessary GC overhead.
}
private void IncrementCallCounter()
{
// Check and increment the call counter, to keep the object alive.
// This needs a compare-and-set retry loop in case of concurrent updates.
long count;
do
{
count = Interlocked.Read(ref _callCounter);
if (count == 0L) throw new System.ObjectDisposedException(String.Format("'{0}' object has already been destroyed", this.GetType().Name));
if (count == long.MaxValue) throw new System.OverflowException(String.Format("'{0}' call counter would overflow", this.GetType().Name));
} while (Interlocked.CompareExchange(ref _callCounter, count + 1, count) != count);
}
private void DecrementCallCounter()
{
// This decrement always matches the increment we performed above.
if (Interlocked.Decrement(ref _callCounter) == 0) {
FreeRustArcPtr();
}
}
internal void CallWithPointer(Action<IntPtr> action)
{
IncrementCallCounter();
try {
action(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
internal T CallWithPointer<T>(Func<IntPtr, T> func)
{
IncrementCallCounter();
try {
return func(CloneRustArcPtr());
}
finally {
DecrementCallCounter();
}
}
}
class FfiConverterTypeHardResetCommand: FfiConverter<HardResetCommand, IntPtr> {
public static FfiConverterTypeHardResetCommand INSTANCE = new FfiConverterTypeHardResetCommand();
public override IntPtr Lower(HardResetCommand value) {
return value.CallWithPointer(thisPtr => thisPtr);
}
public override HardResetCommand Lift(IntPtr value) {
return new HardResetCommand(value);
}
public override HardResetCommand Read(BigEndianStream stream) {
return Lift(new IntPtr(stream.ReadLong()));
}
public override int AllocationSize(HardResetCommand value) {
return 8;
}
public override void Write(HardResetCommand value, BigEndianStream stream) {
stream.WriteLong(Lower(value).ToInt64());
}
}
public record Constants (
ulong @tileSize,
ulong @tileWidth,
@ -4056,6 +4666,16 @@ class FfiConverterTypeServicePointError : FfiConverterRustBuffer<ServicePointExc
}
}
}
/**
* Typealias from the type name used in the UDL file to the builtin type. This
* is needed because the UDL type name is used in function/method signatures.
* It's also what we have an external type that references a custom type.
*/
#pragma warning restore 8625
public static class ServicepointBindingUniffiMethods {
public static Constants GetConstants() {

8
flake.lock generated
View file

@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1746183838,
"narHash": "sha256-kwaaguGkAqTZ1oK0yXeQ3ayYjs8u/W7eEfrFpFfIDFA=",
"lastModified": 1749494155,
"narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bf3287dac860542719fe7554e21e686108716879",
"rev": "88331c17ba434359491e8d5889cce872464052c2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -2,7 +2,7 @@
description = "Flake for the servicepoint library.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
};
outputs =

View file

@ -2,14 +2,18 @@
set -e
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
UNIFFI_BINDING_PATH="$(realpath "$SCRIPT_PATH"/servicepoint-binding-uniffi)"
UNIFFI_BINDGEN_CS_PATH="$(realpath "$SCRIPT_PATH"/uniffi-bindgen-cs)"
cd "$SCRIPT_PATH"
cargo build --release
TARGET_PATH="$(realpath "$SCRIPT_PATH"/target/release)"
SERVICEPOINT_SO="$TARGET_PATH/libservicepoint_binding_uniffi.so"
cargo build --release --manifest-path="$UNIFFI_BINDING_PATH"/Cargo.toml
SERVICEPOINT_SO="$(realpath "$UNIFFI_BINDING_PATH"/target/release/libservicepoint_binding_uniffi.so)"
echo "Source: $SERVICEPOINT_SO"
echo "Output: $LIBRARIES_PATH"
"$TARGET_PATH/uniffi-bindgen-cs" --library "$SERVICEPOINT_SO" --out-dir "$SCRIPT_PATH/ServicePoint"
cargo build --manifest-path="$UNIFFI_BINDGEN_CS_PATH"/Cargo.toml
UNIFFI_BINDGEN_CS="$UNIFFI_BINDGEN_CS_PATH"/target/debug/uniffi-bindgen-cs
# cd is needed because in library mode, Cargo.toml is read from the current directory
cd $UNIFFI_BINDING_PATH
$UNIFFI_BINDGEN_CS "$SERVICEPOINT_SO" --library --out-dir "$SCRIPT_PATH/ServicePoint" --no-format

@ -1 +1 @@
Subproject commit 022106e2dba704a58f9e6f97b1db7c9ce38005ab
Subproject commit 635fef024437d29b922999fe1d8bd7e6e30524a9

818
uniffi-bindgen-cs/Cargo.lock generated Normal file
View file

@ -0,0 +1,818 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "anyhow"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "askama"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28"
dependencies = [
"askama_derive 0.12.5",
"askama_escape",
]
[[package]]
name = "askama"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d4744ed2eef2645831b441d8f5459689ade2ab27c854488fbab1fbe94fce1a7"
dependencies = [
"askama_derive 0.13.1",
"itoa",
"percent-encoding",
"serde",
"serde_json",
]
[[package]]
name = "askama_derive"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83"
dependencies = [
"askama_parser 0.2.1",
"basic-toml",
"mime",
"mime_guess",
"proc-macro2",
"quote",
"serde",
"syn 2.0.103",
]
[[package]]
name = "askama_derive"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d661e0f57be36a5c14c48f78d09011e67e0cb618f269cca9f2fd8d15b68c46ac"
dependencies = [
"askama_parser 0.13.0",
"basic-toml",
"memchr",
"proc-macro2",
"quote",
"rustc-hash",
"serde",
"serde_derive",
"syn 2.0.103",
]
[[package]]
name = "askama_escape"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
[[package]]
name = "askama_parser"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0"
dependencies = [
"nom",
]
[[package]]
name = "askama_parser"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f"
dependencies = [
"memchr",
"serde",
"serde_derive",
"winnow",
]
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "basic-toml"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bytes"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "camino"
version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab"
dependencies = [
"serde",
]
[[package]]
name = "cargo-platform"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
dependencies = [
"serde",
]
[[package]]
name = "cargo_metadata"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
"thiserror",
]
[[package]]
name = "clap"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
"once_cell",
"strsim",
"termcolor",
"textwrap",
]
[[package]]
name = "clap_derive"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008"
dependencies = [
"heck 0.4.1",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "extend"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "311a6d2f1f9d60bff73d2c78a0af97ed27f79672f15c238192a5bbb64db56d00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.103",
]
[[package]]
name = "fs-err"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"
dependencies = [
"autocfg",
]
[[package]]
name = "glob"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
[[package]]
name = "goblin"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47"
dependencies = [
"log",
"plain",
"scroll",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "itoa"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "libc"
version = "0.2.172"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
[[package]]
name = "log"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "memchr"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "mime_guess"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
dependencies = [
"mime",
"unicase",
]
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "os_str_bytes"
version = "6.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "percent-encoding"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "plain"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn 1.0.109",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2",
"quote",
"version_check",
]
[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustc-hash"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "ryu"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "scroll"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6"
dependencies = [
"scroll_derive",
]
[[package]]
name = "scroll_derive"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.103",
]
[[package]]
name = "semver"
version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
dependencies = [
"serde",
]
[[package]]
name = "serde"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.103",
]
[[package]]
name = "serde_json"
version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "siphasher"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "smawk"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "termcolor"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "textwrap"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
dependencies = [
"smawk",
"unicode-linebreak",
"unicode-width",
]
[[package]]
name = "thiserror"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.103",
]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "unicase"
version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-linebreak"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
[[package]]
name = "unicode-width"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c"
[[package]]
name = "uniffi-bindgen-cs"
version = "0.0.0"
dependencies = [
"uniffi-bindgen-cs 0.9.0+v0.28.3",
]
[[package]]
name = "uniffi-bindgen-cs"
version = "0.9.0+v0.28.3"
source = "git+https://github.com/NordSecurity/uniffi-bindgen-cs?rev=3345db909a57a1175846bc91b53721bb61ee2787#3345db909a57a1175846bc91b53721bb61ee2787"
dependencies = [
"anyhow",
"askama 0.13.1",
"camino",
"cargo_metadata",
"clap",
"extend",
"fs-err",
"heck 0.4.1",
"paste",
"serde",
"serde_json",
"textwrap",
"toml",
"uniffi_bindgen",
"uniffi_meta",
"uniffi_udl",
]
[[package]]
name = "uniffi_bindgen"
version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cade167af943e189a55020eda2c314681e223f1e42aca7c4e52614c2b627698f"
dependencies = [
"anyhow",
"askama 0.12.1",
"camino",
"cargo_metadata",
"fs-err",
"glob",
"goblin",
"heck 0.5.0",
"once_cell",
"paste",
"serde",
"textwrap",
"toml",
"uniffi_meta",
"uniffi_udl",
]
[[package]]
name = "uniffi_checksum_derive"
version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "802d2051a700e3ec894c79f80d2705b69d85844dafbbe5d1a92776f8f48b563a"
dependencies = [
"quote",
"syn 2.0.103",
]
[[package]]
name = "uniffi_meta"
version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a74ed96c26882dac1ca9b93ca23c827e284bacbd7ec23c6f0b0372f747d59e4"
dependencies = [
"anyhow",
"bytes",
"siphasher",
"uniffi_checksum_derive",
]
[[package]]
name = "uniffi_testing"
version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6f984f0781f892cc864a62c3a5c60361b1ccbd68e538e6c9fbced5d82268ac"
dependencies = [
"anyhow",
"camino",
"cargo_metadata",
"fs-err",
"once_cell",
]
[[package]]
name = "uniffi_udl"
version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "037820a4cfc4422db1eaa82f291a3863c92c7d1789dc513489c36223f9b4cdfc"
dependencies = [
"anyhow",
"textwrap",
"uniffi_meta",
"uniffi_testing",
"weedle2",
]
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "weedle2"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e"
dependencies = [
"nom",
]
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd"
dependencies = [
"memchr",
]