top | item 40930507

(no title)

secondary_op | 1 year ago

I'm never using this editor unless it can install itself and work completely offline, without going for downloads and making web requests , it is crucial, especially after totally not related xz fiasco and the white house praise for rust.

discuss

order

llmblockchain|1 year ago

I only use editors written in C, as God intended.

daghamm|1 year ago

Correction: written in C plus some LISP, as God intended.

tarruda|1 year ago

This might seem funny until you read Ken Thompson's "trusting trust" paper and realize that bootstrapping Rust is a so overwhelming task that someone implemented a Rust compiler in C++ for this purpose: https://github.com/dtolnay/bootstrap

I mean, who knows what kind of malware is transparently being injected in all Rust programs out there.

Gormo|1 year ago

If you want a fast, low-memory-footprint editor with no spurious network connectivity and a conventional desktop UI, check out Geany: https://geany.org/

colinsane|1 year ago

`unshare --user --net zed ~/file-to-edit.txt` seems to work fine. it just shows an "auto update failed" warning in the bottom, but seems otherwise functional. does that work for you?

arthur-st|1 year ago

> especially after ... the white house praise for rust

What's the threat model here, that Rust is a trojan language from the feds?

tarruda|1 year ago

I recommend reading this paper, as it gives some understanding of the things that are possible with an infected toolchain: https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_Ref...

Some modern compiled languages such as Zig and Go can be officially bootstrapped from a C toolchain. And a C toolchain can be bootstrapped with Guix using only a 357-byte blob. This gives some good confidence that you can bootstrap a malware free toolchain using auditable source artifacts.

Rust however, does not have an official way to be bootstrapped from a C compiler, which means developers must use a previous version of the compiler to build a new version. In this situation, you can never be sure a malware was not injected in a previous version of the compiler (see the Ken Thompson paper for an example). There's no way to know because you are using a unauditable blob to create another blob.

This is why someone created mrustc, a Rust compiler implemented in pure C++, so that Rust can be bootstrapped from a C toolchain (see also: https://users.rust-lang.org/t/understanding-how-the-rust-com...).

The mrustc solution is not good because there are essentially 2 implementations of the same compiler that have to be kept in sync. It would be much better if Rust used a solution like Zig's: https://ziglang.org/news/goodbye-cpp/