前々回に公開した pty crate を使って hokaido というターミナル共有ツールを作っています。
* https://github.com/hibariya/pty-rs * https://github.com/idobata/hokaido
Introducing HokaidoRust of Us - Chapter 42015-10-31@hibariya
View Slide
Hi, there.● Hika Hibariya● @hibariya
github.com/hibariya/pty-rs
その後の成果
github.com/idobata/hokaido
Hokaido: Terminal sharing tool
Hokaido: Terminal sharing tool● シェルを起動し出力を TCP で共有する● 画面が滲まない● あまり帯域を使わない● シェル以外は共有できない
Broadcaster <-> Server <-> Watcher
Hokaido needs server for relay$ hokaido server
Watching other’s shell$ hokaido watch \--host hokaido.example.com
Broadcasting your shell output$ hokaido broadcast \--host hokaido.example.com
Watch● 見るだけ● 1つのシェル出力を複数人で watch できる
Broadcast● 同時に broadcast できるのは1人だけ● 他の人に奪われると以後共有されなくなる
Channel● broadcaster + watchers = channel● 1つのサーバで複数の共有を中継できる● --channel オプションで名前をつける
$ Demo
[dependencies]docopt='0.6' # parse optionslibc='0.1.8'nix='0.3.9' # signal handlingpty='0.1.5' # fork with new ptyrmp-serialize = '0.7' # MessagePackrustc-serialize='0.3'termios='0.2.0' # inherit termios
Current version: 0.0.2● 動く● エラー処理が不十分● テストがほしい● 使い心地の調整が必要
cargo install hokaido