Overview
Explore the development of Slinc, a library designed to enhance Scala to C interoperability, in this Scala Days 2023 Seattle conference talk. Delve into the challenges of machine learning and high-performance computing applications, and discover how Slinc leverages Scala 3's type system, metaprogramming, runtime multi-stage programming, and Java 17's Panama project to provide easy-to-write and use C bindings for the Scala ecosystem. Learn about the limitations of existing Java-based C interop options like JNI, JNA, and JNR, and understand how Slinc aims to make C libraries more accessible to Scala programmers. Follow along as the speaker covers topics such as native interoperability, memory management, C strings, argument passing, and performance comparisons, providing insights into Slinc's potential to revolutionize Scala's interaction with C libraries.
Syllabus
Intro
Platforms
The problem
Native Interoperability for Java
Slinc's niche
Slinc is Scala 3 exclusive
rand binding
Memory
Ptr Mutation
C Strings
Passing args
sprintf binding
Java 19
Multiplatform
Foreign mem writer
Jit Compilation
JIT generated writer
Performance comparison
Singleshot comparison
Taught by
Scala Days Conferences