workspace.Build
- func Build( ctx context
.Context , server tmux.Server , workspace Workspace, ) (tmux.Session , error) -
Build creates the workspace on server and returns the created session.
Description#
Build is not atomic. A failure after session creation returns that session; completed mutations remain in tmux. Command failures are not normalized. Every layout is checked against the selected daemon and desired pane count before session creation. tmux validates geometry when applying each layout.
Build uses subprocess operations below tmux 3.7. On qualified newer daemons, it owns a control connection during the build and closes it before return. The returned Session is not bound to the closed connection. Build verifies that the session remains reachable after closing it. An attached connection may fire client hooks and policies.
Each pane receives workspace, window, and pane CommandsBefore, then its own Commands. Sleep values pause Build rather than the pane.
- Parameters
-
Guides#
Pages that discuss Build.
In other ports#
Build a session from a workspace description
| Language | Equivalent |
|---|---|
| Python | tmuxp |
| Ruby | Lib |
| PowerShell | Lib Applies the exact reviewed -Plan after PowerShell confirmation. -WhatIf previews without applying it; application is detached. |
| Julia | Lib Applies a prepared WorkspacePlan on an explicit Server, detached and under one deadline. Existing session names fail unless reuse is explicit. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| Common Lisp | libtmux |
| TypeScript | builder |
| Rust | src |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Workspace |
| OCaml | Libtmux Apply a validated Plan through submit, then await its retained execution receipt. Inspect preserves partial and late outcomes. |
| Perl | Lib Loads through installed public core APIs; existing-target policy and known owned rollback effects are explicit. |
No equivalent is recorded in Lua, Erlang, Elixir, Clojure, Kotlin, Scala or F#.