Microsoft’s new vim alternative is written in Rust???
AI Summary
Microsoft has released “Edit” - a new command-line text editor written entirely in Rust. This video explores this unexpected project from Microsoft’s Windows terminal team.
Key Points:
What is Edit?
- A lightweight CLI text editor written in Rust by Microsoft
- Designed to replace the missing MS-DOS editor in 64-bit Windows
- Open source (MIT licensed) and available on GitHub
- Only 250KB in size for the Windows build
- Will be included in Windows 11 by default
Why Microsoft Built This:
- 64-bit Windows versions lack a built-in CLI text editor (32-bit had MS-DOS editor)
- Existing options (nano, micro, etc.) were either too large or lacked Windows support
- Needed something small enough to bundle with Windows without justification
- Required good Unicode support and VT output for SSH integration
Technical Details:
- Built custom terminal UI library for plugin model around C ABI
- Uses arena allocator to handle Rust’s tree-building challenges
- Supports mouse mode, multiple files, find/replace, word wrap
- Modeless editor (unlike Vim) for better new user experience
- Cross-platform despite being Windows-focused
Development Story:
- Developer prototyped in C, C++, Zig, and Rust
- Preferred Zig > C > Rust > C++ personally
- Chose Rust due to internal Microsoft support
- Took 4 months to build, worked weekends and Christmas
- Team exploration of Rust for future Windows development
Significance:
- Represents Microsoft’s continued commitment to open source
- Potentially signals broader Rust adoption at Microsoft
- Shows evolution of Windows development tools
- Makes Windows possibly the only OS shipping with C++, C, assembly, Rust, and React Native code
The project demonstrates Microsoft’s willingness to invest in developer tools and their positive contribution to the open source ecosystem, even for seemingly simple utilities.