Skip to content

v0.2.0

Choose a tag to compare

@codybrom codybrom released this 10 Mar 04:45
· 32 commits to main since this release
76fc43e

Added

  • decodeAndFreeString() utility in bindings to safely decode C string pointers and free memory via FMFreeString
  • ESLint (flat config) and Prettier for code linting and formatting
  • tsx dev dependency for TypeScript execution

Changed

  • C function signatures for string-returning functions now declare return type as void * instead of str to retain the pointer for proper memory management
  • Tool callback error handling now wraps errors in ToolCallError with proper context

Fixed

  • Critical memory leak in all string-returning C functions — koffi's str return type was copying strings but discarding the original pointer before it could be freed

Removed

  • Unused FMLanguageModelSessionCreateDefault binding (sessions always route through CreateFromSystemLanguageModel)
  • Unused FMRetain binding (all Swift-to-JS transfers use passRetained, only FMRelease is needed)