-
Notifications
You must be signed in to change notification settings - Fork 152
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
Better scope prism's C API #2888
Comments
I'd be willing to champion this. I'm building a zig binding to prism so having a clear line in the sand on what is public would be great to have. Here's some questions about this
|
Hey @Cluster444 — thanks for the initiative here. Unfortunately I've experimented with this and it would mostly need to be done within the CRuby codebase first in order to fully determine the impact here. That's the main consumer of the C library. Additionally we would need to check that the rust and wasm bindings aren't impacted. I also don't think we can do the opaque pointer trick I was hoping for without sacrificing on performance unfortunately. That is to say, I think this is quite a bit task, so maybe I shouldn't have left it quite as open ended as I did. That being said, some answers to your questions:
|
Roger that. It sounds like for now then making a list of what is to be public vs private would be a good starting point to clean up the public API? |
Yes, and even documenting it in the API docs (i.e. inline in the code) would be super helpful. |
At the moment, prism exposes a lot of structs and functions in its C API. Overall, the shape is not clearly defined. We should take a couple of steps to resolve this:
pm_node_t
to be an opaque pointer. Because they are always heap-allocated, we should be able to get away with this.The text was updated successfully, but these errors were encountered: