scala-native-bindgen
                                
                                
                                
                                    scala-native-bindgen copied to clipboard
                            
                            
                            
                        Fix: #194 Align scala-native-bindgen with Scala Native 0.4.x API
@kornilova203 or @jonas - if either of you have time to look at this and give me some pointers it would be great. Everything compiles and runs but the generation doesn't match quite - there are some weird things that don't seem consistent like a struct inside a struct has different assignment/lookup which means you would need to have that context.
Hello @ekrich, Thank you for the PR and sorry for not responding I'll take a look in couple days :)
@kornilova203 Hope you are doing well. The Scala Center is working on a few things before the 0.4.0 release so we should have a bit of time. I finally realized that without a bunch of study I wasn't going to make it to the finish line.
I got the new Nat / Digit generation - pretty happy with that as it was C++.
The strange thing to me is the differences in pointer dereference in Scala that is different for primitives, structs, and arrays. You have methods for these so I tried to do the right thing for generation. The test errors when running the tests that compare the generation are a bit hard to understand because then you have to find where in the code that in generated.
I have most of normal tests passing.
The StructSpec has a few failing but it seems that a Struct inside a Struct is different now. There could be a problem in Scala Native too so it would be great if figured out that one before the release in case there is a bug.
The second test failing is the FunctionSpec with varadic args as Scala Native only supports va_list, See https://github.com/scala-native/scala-native/pull/1426 This needs to be figured out still. See the CVarArgList in https://github.com/scala-native/scala-native/blob/master/clib/src/main/scala/scala/scalanative/libc/stdio.scala
@ekrich, I spent couple of hours trying to understand what should be done and realized that I don't have enough energy and motivation to complete the task, sorry.
@kornilova203 I totally understand. I was hoping you could look and give me some pointers but the interopt changed quite a bit so it is not obvious so it would take a commitment. I think I can get some help from the people working on Scala Native now.