Expand description
Low-level FFI bindings to the libedit line-editing library (also known as editline, the BSD alternative to GNU readline).
These are raw, unsafe bindings generated by bindgen. They provide direct access to the C API with no ergonomic wrappers.
§Variadic functions
Several core functions are C variadic (el_set, el_get, el_wset,
el_wget, history, history_w). Calling C variadic functions from
Rust is undefined behavior and may silently corrupt data.
Simple integer/pointer arguments often work by accident, but this is not guaranteed across platforms or compiler versions. To safely use the full libedit API, you have two options:
-
Write a small C shim that wraps specific variadic call patterns with fixed-argument functions.
-
Use a higher-level crate (such as a future
libeditcrate) that provides safe wrappers and includes the necessary C shim.
This crate intentionally keeps the raw variadic bindings available so advanced users are not restricted, but they are use at your own risk.
Structs§
- FILE
- Hist
Event - _IO_
FILE - _IO_
codecvt - _IO_
marker - _IO_
wide_ data - __
Bindgen Bitfield Unit - editline
- histeventW
- history
- historyW
- lineinfo
- lineinfow
- tokenizer
- tokenizerW
Constants§
- CC_
ARGHACK - CC_
CURSOR - CC_EOF
- CC_
ERROR - CC_
FATAL - CC_
NEWLINE - CC_NORM
- CC_
REDISPLAY - CC_
REFRESH - CC_
REFRESH_ BEEP - EL_
ADDFN - EL_
ALIAS_ TEXT - EL_BIND
- EL_
CLIENTDATA - EL_
ECHOTC - EL_
EDITMODE - EL_
EDITOR - EL_
GETCFN - EL_
GETFP - EL_
GETTC - EL_HIST
- EL_
PREP_ TERM - EL_
PROMPT - EL_
PROMPT_ ESC - EL_
REFRESH - EL_
RESIZE - EL_
RPROMPT - EL_
RPROMPT_ ESC - EL_
SAFEREAD - EL_
SETFP - EL_
SETTC - EL_
SETTY - EL_
SIGNAL - EL_
TELLTC - EL_
TERMINAL - EL_
UNBUFFERED - H_ADD
- H_
APPEND - H_CLEAR
- H_CURR
- H_DEL
- H_
DELDATA - H_END
- H_ENTER
- H_FIRST
- H_FUNC
- H_
GETSIZE - H_
GETUNIQUE - H_LAST
- H_LOAD
- H_NEXT
- H_
NEXT_ EVDATA - H_
NEXT_ EVENT - H_
NEXT_ STR - H_
NSAVE_ FP - H_PREV
- H_
PREV_ EVENT - H_
PREV_ STR - H_
REPLACE - H_SAVE
- H_
SAVE_ FP - H_SET
- H_
SETSIZE - H_
SETUNIQUE
Functions§
- el_beep⚠
- el_
cursor ⚠ - el_
deletestr ⚠ - el_
deletestr1 ⚠ - el_end⚠
- el_get⚠
- el_getc⚠
- el_gets⚠
- el_init⚠
- el_
init_ ⚠fd - el_
insertstr ⚠ - el_line⚠
- el_
parse ⚠ - el_push⚠
- el_
replacestr ⚠ - el_
reset ⚠ - el_
resize ⚠ - el_set⚠
- el_
source ⚠ - el_wget⚠
- el_
wgetc ⚠ - el_
wgets ⚠ - el_
winsertstr ⚠ - el_
wline ⚠ - el_
wparse ⚠ - el_
wpush ⚠ - el_
wreplacestr ⚠ - el_wset⚠
- history⚠
- history_
end ⚠ - history_
init ⚠ - history_
w ⚠ - history_
wend ⚠ - history_
winit ⚠ - tok_end⚠
- tok_
init ⚠ - tok_
line ⚠ - tok_
reset ⚠ - tok_str⚠
- tok_
wend ⚠ - tok_
winit ⚠ - tok_
wline ⚠ - tok_
wreset ⚠ - tok_
wstr ⚠