-
Notifications
You must be signed in to change notification settings - Fork 220
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
Refactor Resources #617
base: master
Are you sure you want to change the base?
Refactor Resources #617
Conversation
0941bde
to
ae70d92
Compare
- Move storage of "Type->NIF Resource Type Handle" to a OnceLock map to allow implementing resource types without resorting to dynamic trait implementations - Implement resource types as a `derive` macro - Add direct access methods to get an immutable reference to the wrapped objects - Add corresponding converters
Another option, instead of a If we like the /edit: This is how it is implemented now: |
Note to self: #84 is also a very interesting approach (completely doing away with the necessary pre-registration for resource types!), I'm just not quite sure how to incorporate monitors into it. |
derive
macroThis allows us to eventually deprecate the existing
resource!
macro to fix #606.TODO (or follow-up):