Skip to content

Feat: Mac Port #183

Closed
Closed

Description

@jgiles

Request: Ability to install and run shpool on OSX machines.

Management of persistent shell sessions on a Mac is certainly a niche usecase compared to e.g. sessions on a Linux box accessed from a Mac. However, that capability could be useful in the case of Mac desktop/home servers (e.g. the new Mac Mini devices) or in Mac build farms.

Is support for Mac a goal of shpool?

Depending on the level of difficulty, I might be interested in assisting, given some pointers on how to help.

I see work on a Mac port is mentioned by @ethanpailes here: #177 (comment)

Is that referring to the draft changes here from @jrmlhermitte :

or are there other work-in-progress artifacts for Mac support?

Activity

  1. jrmlhermitte commented on Dec 29, 2024

    @jrmlhermitte

    Unfortunately there is no work at the moment. I'm unable to commit more time to open source for a while. If you are interested please go ahead :).

    That PR was just initial investigation to see what we might need to change to get it working, but there is still a lot more work to be done.

    I will let @ethanpailes answer more but if you wanted to try making the right hacks to get it to build all over again, I think that's the right way to go to get started. Thanks in advance for the interest! :)

  2. jgiles commented on Dec 30, 2024

    @jgiles
    Author

    OK, thank you! If I have a chance I will poke around a bit.

    Just to be clear though: I think it's worth some real consideration of the question "Is support for Mac a goal of shpool?"

    There's the initial implementation to get it working, but there would also be some ongoing cost to the project maintaining cross-platform support. I want to make sure there is appetite for that, given that Mac is likely to remain a less-common usecase. The alternative would be to explicitly say the project doesn't have plans to support Mac and guide folks with that usecase toward tmux/etc.

  3. jayvdb commented on Oct 7, 2025

    @jayvdb

    https://github.com/shell-pool/shpool_pty has been archived. :/

    Currently I see

    error[E0425]: cannot find function `ptsname_r` in crate `libc`
        --> /Users/jayvdb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/shpool_pty-0.3.1/src/fork/pty/master/mod.rs:73:29
         |
      73 |                 match libc::ptsname_r(fd, data as *mut libc::c_char, buf.len()) {
         |                             ^^^^^^^^^ help: a function with a similar name exists: `ptsname`
         |
        ::: /Users/jayvdb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/mod.rs:1602:5
         |
    1602 |     pub fn ptsname(fd: c_int) -> *mut c_char;
         |     ----------------------------------------- similarly named function `ptsname` defined here
    
    For more information about this error, try `rustc --explain E0425`.
  4. ethanpailes commented on Oct 7, 2025

    @ethanpailes
    Contributor

    That repo should not be archived. I just unarchived it and am looking into why it was archived in the first place.

  5. seruman commented on Oct 21, 2025

    @seruman
    Contributor

    I hacked my way in these two branches to make it work on macOS;

    By no means I think ready for upstream -little to no experience in Rust-, but they get the job done for me as they are.

  6. jrmlhermitte commented on Oct 24, 2025

    @jrmlhermitte

    That's impressively very little change. If this works this is great. Can you please make a pull request so we can review it?
    I'll try to test it in the coming days.

  7. ethanpailes commented on Oct 27, 2025

    @ethanpailes
    Contributor

    Yeah, even if things are a little wonky, I would be happy to merge. Some amount of mac support is better than none.

  8. c22 commented on Jan 23, 2026

    @c22
    Contributor

    As far as I know, this was effectively blocked by shell-pool/shpool_pty#4 but that was merged recently 🥳

    Would the shpool team be willing to take some of the changes from @seruman?

    There was also an attempt to fix things in #48, but I think upstreaming seruman's fork is probably a nicer fix.

    I'm also happy to spend some time on this if desired!

  9. jrmlhermitte commented on Jan 23, 2026

    @jrmlhermitte

    Closing #48 because it is too stale (have had no bandwidth for this).

    Please yes @seruman or @c22 make a PR!

  10. ethanpailes commented on Jan 23, 2026

    @ethanpailes
    Contributor

    @c22 I cut a new release of shpool_pty so that that change could get picked up. I think @seruman said they had a version of shpool that was building on mac and they were thinking of upstreaming it. If you want to do the work of converting their fork into a PR for the main shpool repo though, we'd be happy to take the patch. (though if you are working on it actively @seruman speak up so that @c22 doesn't waste the time).

  11. seruman commented on Jan 23, 2026

    @seruman
    Contributor

    @ethanpailes i won't be able to allocate time for this for some time. @c22 feel free to take over it; master...seruman:shpool:macos

    AFAIR replacing INotifyWatcher with RecommendedWatcher caused config watcher tests to fail on macOS tho.

  12. ethanpailes commented on Jan 23, 2026

    @ethanpailes
    Contributor

    No pressure. Thanks for making the fork in the first place!

  13. c22 commented on Jan 29, 2026

    @c22
    Contributor

    I hope this is along the lines of what you guys are after

    #300

  14. ethanpailes commented on Jan 29, 2026

    @ethanpailes
    Contributor

    Thanks @c22! I haven't looked at the diff in detail yet, but I appreciate the work!

  15. seruman commented on Jan 29, 2026

    @seruman
    Contributor

    Thank you @c22, thanks for picking this up!

  16. ethanpailes commented on Feb 6, 2026

    @ethanpailes
    Contributor

    This is now done. There are some test cases that are disabled for macos, but the core of it builds and seems to work. We're testing against mac in CI to prevent regressions.

    The remaining tests can be re-enabled in followup changes.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions