Skip to content

0.9.53

Latest
Compare
Choose a tag to compare
@CharlieTap CharlieTap released this 08 Feb 16:48
· 68 commits to main since this release

APIs for reading and writing strings from memory

You'll now find three new api calls in chasms embedding api:

  • readUtf8String()
  • writeUtf8String()
  • readNullTerminatedUtf8String()

The latter of the three is useful when dealing with modules created by languages like C which use null terminating bytes to signal the end of a string. I've done what I can to optimise the algorithm which finds the null byte on native, which is powered by a wide SIMD search. The Java impl is more primitive but will be improved in the future when I start to specialise the JVM memory implementation.