It not only written in Rust, but they avoid basically any dependencies to third-party crates (beside the obligatory windows-sys/libc), optimizing probably for binary size.
To achieve this, they seem to re-implement considerable parts of the rust ecosystem (own TUI library implementation, own unicode handling, own arena implementation, ...).
01HNNWZ0MV43FF · 1h ago
I'd say the windows crate is even technically first-party since the OS vendor publishes it
arghwhat · 2h ago
Yay for finally having a default text editor that works over ssh. Managing windows servers over ssh is a bit of a pain without.
They could just have packaged nano, but oh well.
zozbot234 · 3m ago
This could be a great text-mode IDE with the addition of some LSP, tree-sitter and DAP support. There is already an open issue about possibly adding support for tree-sitter grammars for fast syntax highlighting, but they do mention that this requires some sort of optional plugin system to avoid bloating up the codebase severely (for example, the tree-sitter grammars within the Helix editor take up hundreds of megabytes, which is obviously unacceptable here).
6c696e7578 · 10m ago
I am truly behind the times. I didn't know you can ssh into a Windows system.
red_admiral · 1h ago
I was about to say, I use nano regularly, both locally and over ssh (to machines which have it installed, which is pretty much all of them). This looks nice and I love old-style console UIs, I fondly remember EDIT.COM and NC.EXE, and still use `mc` regularly with one pane pointing at a sshfs.
Ages ago I had to maintain a .BAT file, editing in EDIT.COM, that threw stuff at EDLIN.COM (roughly MS version of `ed`). Those where the ... not-so-good old days.
These days, with windows versions of `nano` and `busybox` you have some power tools without a full linux install.
yjftsjthsd-h · 1h ago
Ah, that makes sense then; I was really confused at first because I couldn't figure out why Windows would want a built-in text-mode editor. I suppose if folks are seriously using SSH to access Windows machines ... then I have other questions about why not RDP, but if that's a real thing people are doing then adding a built-in editor for them makes sense.
Now that they have a text editor that can be used in a terminal:
Calling it: 2025 will be the year of Windows on the server. /s
dijit · 1h ago
Aside from Windows being... "windows" (IE; graphical) and the whole "we will do our own paradigm for nearly everything including file paths (UUNC included) and encoding... Windows is actually pretty stellar if you're writing high performance software.
You can go really far with IOCP and it's so nice to write compared to the contemporary kqueue (BSD) or epoll. I will admit to not trying IO_Uring myself though.
Also the Windows system probes predate any kind of bpf and are easier to use than dtrace.
This is the maximum amount of love I will ever send in Windows' direction though. Everything else is ball-busting.
toast0 · 29m ago
It's not my idea of a good time, but Windows pioneered some stuff that's really handy for servers.
Receive side scaling[1] is super handy at high volume, and it came from Windows. And Windows has better apis for it than I saw in FreeBSD or Linux when I needed it (I didn't look too closely at Linux though, so maybe it was there).
Nitpick - this is a text user oriented (TUI) or a screen editor, not a CLI editor. A CLI editor is ed(1), or ex(1), or EDLIN for MS-DOS lineage.
90s_dev · 2h ago
Interesting how we always go in circles.
edit.cmd was one of the first programs I ever used.
Now it's back rewritten as a Windows 10+ program in Rust?
Yet it looks and works just the same as 30 years ago!
dbuxton · 1h ago
I can't wait for the Rust port of QBasic Gorillas
red_admiral · 1h ago
This is a denial-of-service attack on my productivity :)
I fondly remember the times of editing the explosion radius to "tactical nuclear banana".
trinix912 · 2h ago
I wonder what prevented them from porting the ms-dos EDIT.COM to 64bit Windows back then. There's still EDLIN.COM in the 32bit version.
tadfisher · 2h ago
They canceled the 64-bit port of NTVDM (virtual DOS machine), which is what handles all those INT 21h syscalls from DOS applications. Without that, there's honestly not much to port, and it's easier to just make a new NT-native CLI app.
90s_dev · 1h ago
Did they cancel it because dosbox exists? If so, that's smart.
kmeisthax · 54m ago
Most likely because Microsoft didn't consider it a valuable use of engineering time in general.
AMD's 64-bit extensions explicitly forbade dropping to 16-bit code. Once you enter 64-bit mode you lose access to all the modes which NTVDM needs to run MS-DOS or 3.x apps.
AFAIK the virtualization extensions added in 64-bit (known as VT-x etc) do allow 16-bit code, but that would require rebuilding NTVDM as a Hyper-V client (ala WSL2) instead of using 32-bit protected mode as a way to virtualize 16-bit code. However, these extensions didn't exist until way later and they didn't get support for booting 16-bit guests until later than that.
You could software emulate x86 to do NTVDM stuff. In fact, there's a FOSS program that does this, called WineVDM[0]. The MIPS/Alpha/PPC ports of NT used software emulation in NTVDM, so it is feasible.
Interestingly, they also recommend using DOSBox for DOS apps.
zozbot234 · 11m ago
It looks like you can switch the processor back to true 32-bit protected mode (not just 32-bit "compatibility mode" within long mode) https://forum.osdev.org/viewtopic.php?t=43127 which in turn gives you access to the old virtual 16-bit mode - but this involves running kernel code too in 32-bit mode, which is kind of a no-go in a modern OS. Using the virtualization extensions will be a lot easier.
EvanAnderson · 19m ago
NTVDM has been unofficially built for x64[0] and it works (or rather, worked until MSFT started ripping-out USER32 APIs that are necessary for running Win16 apps).
DOS-era codebases are just terrible in a modern context, they would have to rewrite it from scratch anyway. The TUI IDE included within FreePascal is basically bitrotting due to this very reason.
tored · 2h ago
Oh nice! Can't wait to replace nano. Plugin support in lua?
90s_dev · 2h ago
I hope someone adds typed Lua support and sends a PR!
Ericson2314 · 1h ago
Will the old one from DOS be replaced entirely with this?
fredoralive · 35m ago
64 bit Windows, the only sort now with W11, doesn’t have MS-DOS support, so doesn’t have the old edit to start with.
Ericson2314 · 32m ago
Didn't know 32-bit Windows was completely gone.
andrewstuart · 2h ago
Edit for DOS was my favorite editor.
All the keys worked as you expect. You could select text with shift. It had find and a replace. That’s a lot more than most editors give you without config fiddling and arcane key commands.
Those simple things get almost everything I need for operating system maintenance.
Edit was the pure distilled essence of an editor.
It was a work of art really.
sedatk · 2h ago
It was okay when it came out because the alternative was EDLIN (DOS version of ed). But IIRC, it had a 64KB file size limitation which was a problem.
GuinansEyebrows · 1h ago
cute. extremely NIH in a field with many existing options, but very cute :)
mixmastamyk · 2h ago
What happened to shipping yedit? From the yori project, which I recommend to everyone on windows. Why wait when it has been available for years?
(Someone mentioned ssh, which leads me to believe this one is using ansi instead of the console API.)
QuiCasseRien · 2h ago
> Open Source, writen and build at Microsoft.
Oh yeah, i will get some C# or C++ code !
> Rust
Fucked. Why Why Why ?
lblume · 2h ago
I can see why people don't like to write Rust. It is more tedious, harder because of the ownership model, and has a very steep learning curve.
What I don't get is what people have against programs written in Rust from the bottom up. They are safer to use, introduce far fewer vulnerabilities, and you can even locally reason about the code much better than in typical 'unsafe' languages like C++.
eikenberry · 2h ago
It seems like your first paragraph answers the question in the second. If it is harder to use and learn then that reduces the value of free software released using it as that software is then harder to modify, fix, contribute to, etc. The tradeoff for Rust being hard should be more security and fewer bugs. The additional cost here, and the one that the OP is probably annoyed with, is that it moves away from the languages/platforms that MS has traditionally used and that developers who work on that platform expect.
koakuma-chan · 1h ago
Is Rust harder than C++?
npalli · 28m ago
Yes.
Guekka · 14m ago
That answer lacks some nuance
Yes, it is harder to get a Rust program to compile. But it also is easier to accomplish the desired task safely
90s_dev · 2h ago
> and you can even locally reason about the code much better than in typical 'unsafe' languages like C++.
Do you have an example of this? I'm just a TypeScript guy who never had a fair chance to use C++ or Rust for long, so I'd be curious how what you say is true.
teddyh · 2h ago
The non-stable ABI, forcing all-statically linked binaries, is also a thing.
tadfisher · 1h ago
Which has next to zero impact on Windows applications, which ship their own DLLs anyway (besides stuff like DirectX).
free_bip · 2h ago
What's wrong with a terminal app being written in Rust?
They could just have packaged nano, but oh well.
Ages ago I had to maintain a .BAT file, editing in EDIT.COM, that threw stuff at EDLIN.COM (roughly MS version of `ed`). Those where the ... not-so-good old days.
These days, with windows versions of `nano` and `busybox` you have some power tools without a full linux install.
[0]: https://github.com/antirez/kilo/
[0]: https://github.com/zyedidia/micro
Calling it: 2025 will be the year of Windows on the server. /s
You can go really far with IOCP and it's so nice to write compared to the contemporary kqueue (BSD) or epoll. I will admit to not trying IO_Uring myself though.
Also the Windows system probes predate any kind of bpf and are easier to use than dtrace.
This is the maximum amount of love I will ever send in Windows' direction though. Everything else is ball-busting.
Receive side scaling[1] is super handy at high volume, and it came from Windows. And Windows has better apis for it than I saw in FreeBSD or Linux when I needed it (I didn't look too closely at Linux though, so maybe it was there).
[1] https://learn.microsoft.com/en-us/windows-hardware/drivers/n...
edit.cmd was one of the first programs I ever used.
Now it's back rewritten as a Windows 10+ program in Rust?
Yet it looks and works just the same as 30 years ago!
I fondly remember the times of editing the explosion radius to "tactical nuclear banana".
AMD's 64-bit extensions explicitly forbade dropping to 16-bit code. Once you enter 64-bit mode you lose access to all the modes which NTVDM needs to run MS-DOS or 3.x apps.
AFAIK the virtualization extensions added in 64-bit (known as VT-x etc) do allow 16-bit code, but that would require rebuilding NTVDM as a Hyper-V client (ala WSL2) instead of using 32-bit protected mode as a way to virtualize 16-bit code. However, these extensions didn't exist until way later and they didn't get support for booting 16-bit guests until later than that.
You could software emulate x86 to do NTVDM stuff. In fact, there's a FOSS program that does this, called WineVDM[0]. The MIPS/Alpha/PPC ports of NT used software emulation in NTVDM, so it is feasible.
[0] https://github.com/otya128/winevdm
Interestingly, they also recommend using DOSBox for DOS apps.
[0] https://github.com/leecher1337/ntvdmx64
All the keys worked as you expect. You could select text with shift. It had find and a replace. That’s a lot more than most editors give you without config fiddling and arcane key commands.
Those simple things get almost everything I need for operating system maintenance.
Edit was the pure distilled essence of an editor.
It was a work of art really.
(Someone mentioned ssh, which leads me to believe this one is using ansi instead of the console API.)
Oh yeah, i will get some C# or C++ code !
> Rust
Fucked. Why Why Why ?
What I don't get is what people have against programs written in Rust from the bottom up. They are safer to use, introduce far fewer vulnerabilities, and you can even locally reason about the code much better than in typical 'unsafe' languages like C++.
Do you have an example of this? I'm just a TypeScript guy who never had a fair chance to use C++ or Rust for long, so I'd be curious how what you say is true.
Less memory overhead and no runtime dependencies?