Skip to content

docs: Runtime:start_server and OwnedServer:stop needed to run guides/attaching-to-tmux without a shell launcher #116

Open

Description

@tony

Summary

libtmux.org's Lua "Attaching to tmux" page must run as one native program with no shell launcher. The program starts a private demonstration server when LIBTMUX_SOCKET_PATH is unset, creates the work session, connects a second Server by socket path, and stops the demonstration server. The published rock libtmux 0.1.1-1 has no way to start a server, so the page starts the daemon by spawning tmux ... start-server through uv.spawn.

Missing API in the published rock

  • Runtime:start_server starts a private daemon on a socket path.
  • OwnedServer:stop stops that daemon and releases its resources.

Both exist on the default branch (added for #103 and used by the examples there) but not in 0.1.1-1, the version the page installs from LuaRocks with luarocks install libtmux 0.1.1-1. #108 records the same gap for the README quick start.

Page that needs it

guides/attaching-to-tmux for Lua in libtmux/docs (site/src/content/docs/ports/lua/guides/attaching-to-tmux.md). Its connect.lua uses these calls only to build the demonstration server. The Lua "Capture pane output" example spawns tmux for the same reason.

Expected

A published rock that contains Runtime:start_server and OwnedServer:stop. The page then replaces its uv.spawn block with runtime:start_server and owned:stop() and pins the new version.

Published caller check

An isolated install of libtmux 0.1.1-1 exposed Runtime:connect and had no Runtime:start_server or Runtime:with_server. The SCM install exposed both constructors. The module version string was 0.1.1 in both installs, so that string alone cannot establish which program a reader can run. issue 108 records the tested source-rock digest. LuaRocks release · Constructors on master

Use two cases for the attaching guide. When the caller supplies an endpoint, connect to it without taking ownership. When the guide creates the demonstration server, connect the second handle by its socket and verify the original owner stops the server on exit. Run that second case against the eventual published rock in an isolated install.

Activity

  1. added
    p2
    documentation
    area:examples
    area:release
    topic:distribution
    lua
    on Dec 3, 2026
  2. tony commented on Dec 5, 2026

    @tony
    ContributorAuthor

    With a supplied socket, the Lua example reads the existing work session and leaves the server running. With a missing socket, the connection fails without changing an unrelated server. The published 0.1.1-1 rock still uses its release launcher.

    Pull request #183.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:examplesarea:releasedocumentationluap2topic:distribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions