Tag Archives: MS-DOS

Building Microsoft Edit on Mac OSX Silicon

Microsoft have released source code for the MS-DOS era text editor, Edit – remade in Rust, on their Github. Christopher Nguyen, a product manager on Microsoft’s Windows Terminal team wrote:

What motivated us to build Edit was the need for a default CLI text editor in 64-bit versions of Windows. 32-bit versions of Windows ship with the MS-DOS editor, but 64-bit versions do not have a CLI editor installed inbox.

My computer legacy originally started on MS-DOS on an IBM PS/2, and Edit was the very first text editor I ever used – so I was keen to give this a go on my Mac.

The release includes binaries for Windows & Linux, but does not include binaries for Mac. I thought this was a good chance to blog about how I built and installed edit:

# Install rust nightly and source rust environment to configure the shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y
. "$HOME/.cargo/env"

# Clone the repo & cd to its directory
git clone --branch v1.2.0 --depth 1 https://github.com/microsoft/edit.git
cd edit

# Build and install to ~/.cargo/bin/edit
cargo install --path .

# Install for all users
sudo cp ~/.cargo/bin/edit /usr/local/bin/

You can then run it simply with edit