Skip Navigation

Crossing the Impossible FFI Boundary, and My Gradual Descent Into Madness (Vale)

verdagon.dev

Crossing the Impossible FFI Boundary, and My Gradual Descent Into Madness

Adding Rust FFI into Vale, in particular the part where the Vale compiler determines the signature and proper overload of a Rust function.

Our ultimate goal is to write this Vale code:

 vale
    
import rust.std.vec.Vec;

exported func main() {
  vec = Vec<int>.with_capacity(42);
  println("Length: " + vec.capacity());
}


  
 stdout
    
Length: 42

  

...which would successfully make a Rust Vec and call capacity on it.

Previous

Hacker News @lemmy.smeargle.fans

Crossing the impossible FFI boundary, and my gradual descent into madness

0 comments

No comments