Skip to content

indoorvivants/sbt-jextract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-jextract

sbt-jextract Scala version support

A SBT plugin that wraps jextract to generate FFM bindings from header files.

Plugin's API and behaviour is designed similarly to sn-bindgen, and the plugin can bootstrap jextract automatically.

Installation

project/plugins.sbt

addSbtPlugin("com.indoorvivants" % "sbt-jextract" % "<version>")

build.sbt

Add this to a Java/Scala project that needs some FFM bindings:

.enablePlugins(JextractPlugin)
.settings(
  jextractBindings += JextractBinding(
    (ThisBuild / baseDirectory).value / "interface.h",
    "myscalalib_bindings"
  ),
  jextractMode := JextractMode.ResourceGenerator, // default, only mentioned for documentation purposes
)

Adjust the location of the header and jextractMode value to your preference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages