Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Rav1dPicAllocator fully safe #1009

Open
kkysen opened this issue Apr 30, 2024 · 4 comments
Open

Make Rav1dPicAllocator fully safe #1009

kkysen opened this issue Apr 30, 2024 · 4 comments
Assignees
Labels
low priority Issues that we would like to address at some point in the future refactoring Cleaning up transpiled code safety/correctness

Comments

@kkysen
Copy link
Collaborator

kkysen commented Apr 30, 2024

This should be possible, leaving the only unsafe in the Dav1dPicAllocator conversions, but it's fairly tricky, so we can save it for later.

@kkysen kkysen self-assigned this Apr 30, 2024
@kkysen kkysen added refactoring Cleaning up transpiled code low priority Issues that we would like to address at some point in the future safety/correctness labels May 3, 2024
@rinon
Copy link
Collaborator

rinon commented Jul 12, 2024

Is this done now?

@kkysen
Copy link
Collaborator Author

kkysen commented Jul 12, 2024

Is this done now?

No. I wasn't planning on doing this unless someone wanted it. The current API is unsafe, while what this issue suggested was a rewrite to make the API fully safe from Rust.

@rinon
Copy link
Collaborator

rinon commented Jul 12, 2024

Ah I see, I think that could go along with a safe Rust API, if you're only using the C API then would it even make sense to try to make this fully safe?

@kkysen
Copy link
Collaborator Author

kkysen commented Jul 12, 2024

Ah I see, I think that could go along with a safe Rust API, if you're only using the C API then would it even make sense to try to make this fully safe?

Yeah that would make sense to go together. You're right, the C API wouldn't get safer from this (though internally we'd use the Rust API for the default, and that's what usually used).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority Issues that we would like to address at some point in the future refactoring Cleaning up transpiled code safety/correctness
Projects
None yet
Development

No branches or pull requests

2 participants