Repository navigation
Conversation
emmatyping
left a comment
There was a problem hiding this comment.
Thank you for working on this! I think this is a great start, we just need to wait on #52 for the c_api module.
|
|
||
| impl BorrowedBuffer { | ||
| fn from_object(obj: &PyObject) -> Result<Self, ()> { | ||
| fn from_object(obj: *mut PyObject) -> Result<Self, ()> { |
There was a problem hiding this comment.
Thanks for updating this! We should probably remove the _base64 module eventually, but I guess for now it's a nice test that the build still works.
There was a problem hiding this comment.
I was actually going to ask you about the _base64 module, this was just something I found when starting to do the work that was going to break otherwise.
There was a problem hiding this comment.
Yeah we originally added it to get the build working. I think it would be fine if you removed it here if you'd prefer.
emmatyping
left a comment
There was a problem hiding this comment.
One minor suggestion but otherwise looks great, thank you!
| [lints.rust] | ||
| unsafe_op_in_unsafe_fn = "deny" | ||
|
|
||
| [lints.clippy] | ||
| undocumented_unsafe_blocks = "deny" | ||
| missing_safety_doc = "deny" |
There was a problem hiding this comment.
Do we want the same policy across all Rust crates: unsafe operations must be explicit, unsafe blocks documented, and unsafe public APIs must explain their safety requirements?
There was a problem hiding this comment.
Yes, I think so, with the possible exception of cpython-sys since that is all bindings.
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Adds in the scaffolding for the cpython-api crate. This is the first PR for #51 as groundwork.