bond_target(3)
π bond_target(3) π
okay bestie, this one is from the Library Functions Manual and it's giving βplumbing but make it loreβ π. It's the bond_target page, and we're gonna get you from zero to βohhh that's what that pipe doesβ without losing a single arg, flag, or vibe. periodt.
πΈ NAME πΈ
bond_targetβ Setup a state transfer pipe between two targets. π«Ά
β¨ SYNOPSIS β¨
not me presenting the synopsis exactly as written, lone nil and all, because we do not editorialize the API π:
nil
bond_target( vid:source, vid:dest )
bond_target( vid:source, vid:dest, bool:blob )
bond_target( vid:source, vid:dest, bool:blob, string:identifier )
bond_target( vid:source, vid:dest, bool:blob, string:id_source,
string:id_dest )
π DESCRIPTION π
okay so this function is used to setup a state transfer stream between two targets. The way it works is a pipe-pair gets created: the write-end is sent to source, and the read-end is sent to dest. icon behavior, honestly. π
By default, the transfer target type is marked as 'state', which means dest should replace its runtime state with that of source. highkey the whole point. β¨
If the blob argument is set to true, then the transfer type becomes that of an opaque data blob, and it's up to dest to figure out what to do with it. no extra instructions, just vibes and bytes π.
The identifier is a short string matching a previously announced extension or one of the reserved stdin, stdout or stderr names. If a single identifier is sent, it gets used for both source and dest. Otherwise, id_source is sent to source and id_dest is sent to dest. iykyk. π
π EXAMPLE π
here's the exact example, bestie β bond_target0() doing its little two-feed pipeline moment π
function bond_target0()
local feed_1 =
launch_avfeed("keep_alive:exec=ls /", "terminal",
function(source, status)
end
)
local feed_2 =
launch_avfeed("keep_alive:exec=tee", "terminal",
function(source, status)
end
)
bond_target(feed_1, feed_2, true, "stdout", "stdin")
local in = open_nonblock(feed_2, false)
end
the way it spins up feed_1 with "keep_alive:exec=ls /", spins up feed_2 with "keep_alive:exec=tee", bonds them with bond_target(feed_1, feed_2, true, "stdout", "stdin"), then grabs local in = open_nonblock(feed_2, false)? obsessed. π¦
π SEE ALSO π
- Arcan Lua API β that's the see-also squad, and it's carrying the whole section π.
π that's the whole page, bestie: source/version Arcan Lua API, date October 2026, and the manual page is bond_target(3). slay, go bond some targets πβ¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms