Extension methods to help with Rust FFI strings and vecs

This commit is contained in:
2025-11-28 04:24:34 -07:00
parent c97c5763ae
commit 4ac2e6408f
4 changed files with 74 additions and 1 deletions

View File

@@ -70,6 +70,18 @@ public unsafe struct Vec_FfiToken_t {
public UIntPtr cap;
}
public unsafe partial class Ffi {
[DllImport(RustLib, ExactSpelling = true)] public static unsafe extern
void free_ffi_token_vec (
Vec_FfiToken_t v);
}
public unsafe partial class Ffi {
[DllImport(RustLib, ExactSpelling = true)] public static unsafe extern
void free_string (
Vec_uint8_t s);
}
public unsafe partial class Ffi {
[DllImport(RustLib, ExactSpelling = true)] public static unsafe extern
Vec_FfiToken_t tokenize_line (