-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustbind.toml
More file actions
41 lines (37 loc) · 2.53 KB
/
Copy pathrustbind.toml
File metadata and controls
41 lines (37 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ripgrep BindConfig for rustbind — the C# face of ripgrep's search engine
# (the Rust `ripgrep_ffi` cdylib in ../ripgrep-ffi). Regenerate the interop layer
# with `rk run rustbind -- gen-cs --config rustbind.toml` from
# ../ripgrep-ffi/bindings.json.
#
# Paths are resolved relative to THIS file's directory (the Ripgrep.cs repo root).
#
# Fresh crate: empty naming lexicons and no overrides — the single `rg_search`
# fn PascalCases naively (rg_search → RgSearch) and the thin ergonomic Ripgrep.cs
# marshals the (ptr,len) string pairs + owns the [UnmanagedCallersOnly] callback
# trampoline by hand. There is no version-probe fn (ripgrep-ffi ships none), so
# the resolver skips the load-time version check.
# ── identity of the emitted interop layer ──────────────────────────────────────
# Interop namespace deliberately NOT under a bare `Ripgrep` namespace token — the
# ergonomic entry point is a static class named `Ripgrep`, and a sibling `Ripgrep`
# *namespace* would collide with it at every `Ripgrep.Method()` call site (CS0234:
# the namespace wins name resolution). Nesting under `RipgrepBinding` keeps
# `Ripgrep` available purely as the class.
namespace = "RipgrepBinding.Interop"
lib_name = "ripgrep_ffi"
banner = "// GENERATED from bindings.json by rustbind — DO NOT EDIT. Regenerate with `rk run rustbind -- gen-cs --config rustbind.toml`. ffi={ffi}"
# ── runtime library resolution knobs ───────────────────────────────────────────
ffi_dir_env_var = "RIPGREP_FFI_DIR"
ffi_path_env_var = "RIPGREP_FFI_PATH"
# version_probe_fn intentionally omitted — ripgrep-ffi has no version self-check.
native_search_subdir = "ripgrep-ffi"
# ── pipeline I/O paths (relative to this config's directory) ────────────────────
manifest_path = "ripgrep-ffi/bindings.json"
out_path = "src/Ripgrep/Interop/Native.cs"
src_dir = "src/Ripgrep"
# overrides_path omitted — no ergonomic marshal sugar; the hand-written layer
# marshals the (ptr,len) pairs and the callback trampoline directly.
# ── naming deviations ───────────────────────────────────────────────────────────
# None — naive PascalCasing already matches the ergonomic layer's call sites.
compound_words = []
name_aliases = []
compound_members = []