Replace SEXPREC with something truly opaque#212
Conversation
ced9225 to
485dce4
Compare
|
My comment stays the same as #205 (comment); I believe there's no need to expose |
|
I see. I can now see the subtle difference in what you said and what I did here. I honestly like this. I followed what was presented in the issue I created over at bindgen repo. |
|
I get you. But, my understanding is that, the comments on rust-lang/rust-bindgen#2685 is probably under the assumption that other APIs use struct Foo; /* Foo is a structure, but its contents are not part of the public interface */
struct Bar;
void foo(struct Foo *arg);
void bar(struct Bar *arg);In this case, the Rust bindings should provide |
|
The Generally, I would suggest defining every single part as close as possible to the C version, including making |
|
Just curious. Why do you think it's better? I agree "defining every single part as close as possible to the C version" sounds good as a general rule, but I don't see any actual benefits in this case. |
|
Users needing example code, and/or needing to talk to others about the lib (usage, bug reports, etc), will generally need to be able to talk about it in terms of C code. Then they'll have to convert that discussion about C mentally back into Rust code before they can actually write Rust. Having the most minimal difference possible, ideally none at all, reduces the mental load of the whole cycle. |
|
I see. Then, I personally think this crate is not the case as I haven't seen anyone talk about |
Update maintainer guide hopefully, a GHA commit shouldn't follow maybe it needs to be an expression? what's happening... please xplain. right sha.. hopefully, a GHA commit shouldn't follow hopefully, a GHA commit shouldn't follow no generating of anything
from the book rust for rustaceans
* Added `[generate bindings]` command for CI Update maintainer guide * Update bindings [skip ci] * Update MAINTAINERS_GUIDE.md Co-authored-by: Ilia Kosenkov <ilia.kosenkov@outlook.com> --------- Co-authored-by: CGMossa <CGMossa@users.noreply.github.com> Co-authored-by: Ilia Kosenkov <ilia.kosenkov@outlook.com>
1421f61 to
09198c9
Compare
Replacement for #205, with a pattern from Rust for Rustacean book, see https://rust-for-rustaceans.com/#errata
This is a far more complete approach
CopyorClonefor something we cannot construct, so how would we copy/clone it?c_voidto indicate that we don't know anything at all about it, but still have a typedSEXP.SEXPREC, in the defining module, we cannot construct it in this definition, while the zero-sized arrays could potentially be constructed.@yutannihilation What do you think?
Depends on