andreabergia/rjvm
View on GitHub ↗ ★ 1,582 Rust
A tiny JVM written in Rust. Learning project
5 mentions on Hacker News by 3 people: 0 stories, 5 comments · first 2023-07-21 · latest 2023-08-28
20082026
-
…& compiler is happy about it, even though ISTM that there could be a tighter bound on the lifetime? https://github.com/andreabergia/rjvm/blob/93e7e48db085e780b0...
comment by bialpio · 2023-08-28 · in A JVM in Rust part 5 – Executing instructions -
Your understanding of Rust is correct, but the code uses unsafe: https://github.com/andreabergia/rjvm/blob/93e7e48db085e780b0... As a result, when the VM gets dropped, the memory gets deallocated even if there are still objects that…
comment by skitter · 2023-08-28 · in A JVM in Rust part 5 – Executing instructions -
…means it is not constraining anything. What is the lifetime 'a doing here? Why not remove it? [1] https://github.com/andreabergia/rjvm/blob/be9c54066c64a82879... [2] https://github.com/andreabergia/rjvm/blob/be9c54066c64a82879... [3]…
comment by celeritascelery · 2023-07-21 · in I have written a JVM in Rust -
…but there is nothing stopping you from using `arg` again (and having an invalid reference). [1] https://github.com/andreabergia/rjvm/blob/main/vm/src/native... [2] https://github.com/andreabergia/rjvm/blob/be9c54066c64a82879... [3]…
comment by celeritascelery · 2023-07-21 · in I have written a JVM in Rust -
…to the classpath: InvalidEntry(".../vm/rt.jar")' vm/tests/integration/real_code_tests.rs:15:10 [1] https://github.com/andreabergia/rjvm/blob/be9c54066c64a82879... [2] https://manishearth.github.io/blog/2021/04/05/a-tour-of-safe... [3]…
comment by celeritascelery · 2023-07-21 · in I have written a JVM in Rust