81 lines
2.1 KiB
C#
81 lines
2.1 KiB
C#
/*! \file */
|
|
/*******************************************
|
|
* *
|
|
* File auto-generated by `::safer_ffi`. *
|
|
* *
|
|
* Do not manually edit this file. *
|
|
* *
|
|
*******************************************/
|
|
|
|
#pragma warning disable IDE0044, IDE0049, IDE0055, IDE1006,
|
|
#pragma warning disable SA1004, SA1008, SA1023, SA1028,
|
|
#pragma warning disable SA1121, SA1134,
|
|
#pragma warning disable SA1201,
|
|
#pragma warning disable SA1300, SA1306, SA1307, SA1310, SA1313,
|
|
#pragma warning disable SA1500, SA1505, SA1507,
|
|
#pragma warning disable SA1600, SA1601, SA1604, SA1605, SA1611, SA1615, SA1649,
|
|
|
|
namespace Slang {
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
public unsafe partial class Ffi {
|
|
#if IOS
|
|
private const string RustLib = "slang.framework/slang";
|
|
#else
|
|
private const string RustLib = "slang";
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// Same as [<c>Vec<T></c>][<c>rust::Vec</c>], but with guaranteed <c>#[repr(C)]</c> layout
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential, Size = 24)]
|
|
public unsafe struct Vec_uint8_t {
|
|
public byte * ptr;
|
|
|
|
public UIntPtr len;
|
|
|
|
public UIntPtr cap;
|
|
}
|
|
|
|
public unsafe partial class Ffi {
|
|
[DllImport(RustLib, ExactSpelling = true)] public static unsafe extern
|
|
Vec_uint8_t compile_from_string (
|
|
byte /*const*/ * input);
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential, Size = 104)]
|
|
public unsafe struct FfiToken_t {
|
|
public Vec_uint8_t text;
|
|
|
|
public Vec_uint8_t tooltip;
|
|
|
|
public Vec_uint8_t error;
|
|
|
|
public Vec_uint8_t status;
|
|
|
|
public Int32 column;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Same as [<c>Vec<T></c>][<c>rust::Vec</c>], but with guaranteed <c>#[repr(C)]</c> layout
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential, Size = 24)]
|
|
public unsafe struct Vec_FfiToken_t {
|
|
public FfiToken_t * ptr;
|
|
|
|
public UIntPtr len;
|
|
|
|
public UIntPtr cap;
|
|
}
|
|
|
|
public unsafe partial class Ffi {
|
|
[DllImport(RustLib, ExactSpelling = true)] public static unsafe extern
|
|
Vec_FfiToken_t tokenize_line (
|
|
byte /*const*/ * input);
|
|
}
|
|
|
|
|
|
} /* Slang */
|