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
42
[]
= "leaf-ffi"
= true
= true
= true
= true
= true
= "C-ABI / Swift frontend binding for leaf: wraps the filesystem-free leaf-core Doc behind UniFFI so an AppKit/SwiftUI app can drive the byte-offset caret model and render the VisualMap as style runs — the native-Apple peer of leaf-wasm."
# staticlib -> the .a linked into the xcframework for device/simulator.
# cdylib -> a .dylib for a host-side macOS build and for `uniffi-bindgen
# --library` to introspect.
# lib -> lets `cargo test` and the in-tree bindgen bin see the crate.
[]
= ["staticlib", "cdylib", "lib"]
# The bindings generator. Run as `cargo run -p leaf-ffi --bin uniffi-bindgen --
# generate --library <path-to-dylib> --language swift --out-dir <dir>`; the build
# script below wraps that. Kept in-tree (rather than the standalone
# `uniffi-bindgen` crate) so the generator version can never drift from the
# `uniffi` runtime this crate links.
[[]]
= "uniffi-bindgen"
= "uniffi-bindgen.rs"
[]
# The document model, filesystem-free — same contract leaf-wasm builds against: a
# sandboxed embed has no path to read and persists bytes its own way, so `fs` is
# off and the host drives `Doc::from_source` + the public `source` field +
# `mark_saved`.
= { = "../leaf-core", = "0.1.1", = false }
# The FFI machinery: `proc-macro` mode (no .udl file) — the view structs derive
# `Record`, the handle derives `Object`, and `setup_scaffolding!()` emits the C
# ABI. `cli` pulls in `uniffi_bindgen_main` for the bin target above.
= { = "0.28", = ["cli"] }
= "1"
# A visual column is a display cell; a native text run (NSAttributedString /
# NSTextView) counts UTF-16 units — the two drift by a cell per wide glyph (CJK,
# emoji). Same crate/version leaf-core segments with, so cluster boundaries agree.
= "1.13.3"