Skip to content

Implement java.nio.ByteBuffers backed by unsafe.Ptr #3532

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

Merged

Conversation

WojciechMazur
Copy link
Contributor

Resolves #2614

  • Adds new java.nio.PointerByteBuffer implementing java.nio.ByteBuffer backed by Ptr[Byte]
  • Adds new javalib-intf project used to define extended javalib API (based on Scala.js approach) providing compile time (Classfile) access to Scala Native specific parts of Java Standard Library
  • Adds scala.scalanative.memory.PointerBuffer - a user facing API, allowing to wrap Ptr[Byte] and to extract underlying Ptr[_] (to allow for memory management)
  • Repeating implementations of multiple buffers and buffer views are now code generated form .gyb template

@WojciechMazur WojciechMazur merged commit 640028d into scala-native:main Oct 6, 2023
@WojciechMazur WojciechMazur deleted the feature/wrapper-ptr-bytebuffer branch October 6, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add methods to wrap a Ptr[Byte] as a ByteBuffer
1 participant