←back to thread

302 points Bogdanp | 1 comments | | HN request time: 0.001s | source
Show context
AndyKelley ◴[] No.44390865[source]
My homepage takes 73ms to rebuild: 17ms to recompile the static site generator, then 56ms to run it.

    andy@bark ~/d/andrewkelley.me (master)> zig build --watch -fincremental
    Build Summary: 3/3 steps succeeded
    install success
    └─ run exe compile success 57ms MaxRSS:3M
       └─ compile exe compile Debug native success 331ms
    Build Summary: 3/3 steps succeeded
    install success
    └─ run exe compile success 56ms MaxRSS:3M
       └─ compile exe compile Debug native success 17ms
    watching 75 directories, 1 processes
replies(8): >>44390894 #>>44390942 #>>44390948 #>>44391020 #>>44391060 #>>44391265 #>>44391881 #>>44393741 #
vlovich123 ◴[] No.44390948[source]
Zig isn’t memory safe though right?
replies(3): >>44391142 #>>44391516 #>>44391617 #
ummonk ◴[] No.44391516[source]
Zig is less memory safe than Rust, but more than C/C++. Neither Zig nor Rust is fundamentally memory safe.
replies(1): >>44391829 #
Ar-Curunir ◴[] No.44391829[source]
What? Zig is definitively not memory-safe, while safe Rust, is, by definition, memory-safe. Unsafe rust is not memory-safe, but you generally don't need to have a lot of it around.
replies(3): >>44392198 #>>44392909 #>>44395714 #
ummonk ◴[] No.44392198[source]
Safe Rust is demonstrably not memory-safe: https://github.com/Speykious/cve-rs/tree/main
replies(1): >>44392674 #
steveklabnik ◴[] No.44392674[source]
This is a compiler bug. This has no bearing on the language itself. Bugs happen, and they will be fixed, even this one.
replies(1): >>44393188 #
ummonk ◴[] No.44393188[source]
It's a 10 year old bug which will eventually be fixed but may require changes to how Rust handles type variance.

Until you guys write an actual formal specification, the compiler is the language.

replies(2): >>44393258 #>>44395048 #
1. ◴[] No.44395048{7}[source]