Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Writing a Shell in Go, Advice
4 points by hello_computer on Aug 26, 2024 | hide | past | favorite | 2 comments
I like Go, and I'm thinking about writing a shell in it, but I'm not sure how well Go's runtime will play with fork and exec (probably not well). Any advice?


Take a look at yaegi, it already can be used and embedded as a REPL and shell. [1]

[1] https://github.com/traefik/yaegi


I think it does it very well.

Had some recent experience trying to write a shell and have it exposed over the web using websockets.

There are some parts where you wish it behaved like C but it does the job and is more than sufficient for a shell.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: