upvote
no. let me be clearer; it is possible to intercept zigs ir from the compiler NOW (well, 15.2 proven) and have a third party package do borrow checking from the data that flow through, without changing zig (think "how miri works without changing rust"). this is not currently directly possible without changing the compiler (~ 50 loc), however the core team has indicated that exporting ir, the only change needed, will be a supported feature once the language stabilizes.
reply
How do you get the information to check properly without lifetimes in the signature?
reply
lifetimes are not the only way to check safety. you just need to detect conflicts in the data dependency graph, lifetimes are in some way an overspecification (for safety, there are autoaliasing advantages). i suspect agnostic conflict detection is probably more expensive, too, but 1) borrow checking was not the slow step in rust compilation and 2) maybe you dont have to check for memory safety on every compile. on commit or on ci is probably fine
reply
Gotcha! Well this sounds like a cool project, I look forward to seeing how it turns out.
reply