Zig’s features don’t map 1:1 to Rust’s features, so translating line-by-line (or file-by-file) doesn’t even make much sense. What are you supposed to do with a crazy comptime function full of reflection when translating that? What about custom pointer types (which Bun had to create for Rust), lifetimes, differences in ecosystem library APIs, etc?
The author actually mentions the challenges they ran into due to breaking the code up across multiple crates. They needed to break cyclic dependencies for it all to compile.
Zig’s features don’t map 1:1 to Rust’s features, so translating line-by-line (or file-by-file) doesn’t even make much sense. What are you supposed to do with a crazy comptime function full of reflection when translating that? What about custom pointer types (which Bun had to create for Rust), lifetimes, differences in ecosystem library APIs, etc?
The author actually mentions the challenges they ran into due to breaking the code up across multiple crates. They needed to break cyclic dependencies for it all to compile.
I agree. 1 year is an underestimate.