Ingvar Stepanyan
Ingvar Stepanyan
Ha, reinvented the same wheel (deserializing with just one flat field without buffers) recently and only now discovered this thread. I suppose I should try to switch to serde-bufferless linked...
@Lucretiel Any chance you'd want to add a proc-macro to your repo and publish it to crates.io?
That was more or less my suggestion and see the open PR at #40 that basically does that. It needed a few minor final touches but fell off the radar...
Closed by #40.
Why was this never merged?
Closing this as it's unlikely to go anywhere for now.
> cbindgen will emit the wrong declaration: Why? There is nothing wrong with that declaration, except that it's a bit more verbose, but at least will explicitly match Rust's side.
They are. In C ```c void with_array(double foo[3]); ``` and ```c void with_array(double (*foo)[3]); ``` and ```c void with_array(double foo[]); ``` all translate to the exactly same memory layout. The...
But, either way, yes, there is no direct equivalent in C for Rust's pass-by-value arrays, and you need to use reference in Rust function definition if you want to interact...
@Luthaf It doesn't. as I said: > The difference is only in syntax sugar where in option without * you don't need to explicitly dereference the array before indexing. We're...