Skip to content

Commit

Permalink
deploy: 47620c8
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Oct 27, 2024
1 parent e344472 commit 16225da
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2><a href="#cli" id="cli">CLI</a></h2>
<pre><code class='hljs language-text'>Usage: bindgen --package &lt;string&gt; --header &lt;string&gt; [--scala] [--c] [--link-name &lt;string&gt;] [--c-import &lt;string&gt;]... [--clang-include &lt;string&gt;]... [--clang &lt;string&gt;]... [--quiet] [--trace | --info | --warning | --error] [--llvm-bin &lt;string&gt; | --clang-path &lt;string&gt; | --no-system] [--render.no-constructor &lt;string&gt;] [--render.opaque-structs &lt;string&gt;] [--render.no-comments] [--render.no-location] [--render.external-path &lt;string&gt;]... [--render.external-name &lt;string&gt;]... [--out &lt;string&gt;] [--multi-file] [--export] [--exclude-system-path &lt;string&gt;]... [--flavour &lt;string&gt;]

Generate Scala 3 native bindings from C header files
Version: 0.1.4+4-c23ab524-SNAPSHOT
Version: 0.1.4+5-47620c82-SNAPSHOT
Built using Scala 3.3.4 and Scala Native 0.4.17

Options and flags:
Expand Down
10 changes: 5 additions & 5 deletions exports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@

trait ExportedFunctions:
/**
* [bindgen] header: /tmp/10063323355011924349header.h
* [bindgen] header: /tmp/1043978920380993120header.h
*/
def myThing(n : CInt, i : CLongInt): CLongInt


object functions extends ExportedFunctions:
/**
* [bindgen] header: /tmp/10063323355011924349header.h
* [bindgen] header: /tmp/1043978920380993120header.h
*/
@exported
override def myThing(n : CInt, i : CLongInt): CLongInt = libtest.impl.Implementations.myThing(n, i)
Expand Down Expand Up @@ -104,7 +104,7 @@
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/8707108028968158468header.h
* [bindgen] header: /tmp/5434377951542987610header.h
*/
opaque type MyStuff = CStruct2[CInt, CString]
object MyStuff:
Expand All @@ -124,15 +124,15 @@
trait ExportedFunctions:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/8707108028968158468header.h
* [bindgen] header: /tmp/5434377951542987610header.h
*/
def myThing(n : CInt, str : Ptr[MyStuff]): CLongInt


object functions extends ExportedFunctions:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/8707108028968158468header.h
* [bindgen] header: /tmp/5434377951542987610header.h
*/
@exported
override def myThing(n : CInt, str : Ptr[MyStuff]): CLongInt = libtest.impl.Implementations.myThing(n, str)
Expand Down
6 changes: 3 additions & 3 deletions quickstart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3><a href="#sbt-plugin-stable" id="sbt-plugin-stable">SBT plugin (stable)</a><
<h3><a href="#sbt-plugin-latest" id="sbt-plugin-latest">SBT plugin (latest)</a></h3>
<p><strong>project/plugins.sbt</strong></p>
<pre><code class="language-scala">resolvers += Resolver.sonatypeRepo(&quot;snapshots&quot;)
addSbtPlugin(&quot;com.indoorvivants&quot; % &quot;bindgen-sbt-plugin&quot; % &quot;0.1.4+4-c23ab524-SNAPSHOT&quot;)
addSbtPlugin(&quot;com.indoorvivants&quot; % &quot;bindgen-sbt-plugin&quot; % &quot;0.1.4+5-47620c82-SNAPSHOT&quot;)
</code></pre>
<h2><a href="#usage" id="usage">Usage</a></h2>
<p>This covers usage as part of an SBT project</p>
Expand Down Expand Up @@ -157,7 +157,7 @@ <h2><a href="#usage" id="usage">Usage</a></h2>
object enumerations:
import predef.*
/**
* [bindgen] header: /tmp/13342190502054636522header.h
* [bindgen] header: /tmp/13841221840278078407header.h
*/
opaque type bla = CUnsignedInt
object bla extends CEnumU[bla]:
Expand All @@ -181,7 +181,7 @@ <h2><a href="#usage" id="usage">Usage</a></h2>
import _root_.libtest.enumerations.*
import _root_.libtest.predef.*
/**
* [bindgen] header: /tmp/13342190502054636522header.h
* [bindgen] header: /tmp/13841221840278078407header.h
*/
def sum(one : bla, two : bla): Unit = extern

Expand Down
48 changes: 24 additions & 24 deletions semantics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/14976750234687623538header.h
* [bindgen] header: /tmp/5875602828171906486header.h
*/
opaque type Big = CStruct3[CInt, CString, Small]
object Big:
Expand All @@ -51,7 +51,7 @@
def sm_=(value: Small): Unit = !struct.at3 = value

/**
* [bindgen] header: /tmp/14976750234687623538header.h
* [bindgen] header: /tmp/5875602828171906486header.h
*/
opaque type Small = CStruct1[CLongLong]
object Small:
Expand Down Expand Up @@ -111,7 +111,7 @@ <h3><a href="#you-can-disable-constructor-generation" id="you-can-disable-constr
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/11909653434153251943header.h
* [bindgen] header: /tmp/5407102160883346733header.h
*/
opaque type Disabled = CStruct2[CInt, CString]
object Disabled:
Expand All @@ -124,7 +124,7 @@ <h3><a href="#you-can-disable-constructor-generation" id="you-can-disable-constr
def hello_=(value: CString): Unit = !struct.at2 = value

/**
* [bindgen] header: /tmp/11909653434153251943header.h
* [bindgen] header: /tmp/5407102160883346733header.h
*/
opaque type Enabled = CStruct2[CInt, CString]
object Enabled:
Expand Down Expand Up @@ -182,7 +182,7 @@ <h2><a href="#unions-are-converted-to-opaque-types" id="unions-are-converted-to-
import _root_.libtest.structs.*
import _root_.libtest.unions.*
/**
* [bindgen] header: /tmp/15031302402254261891header.h
* [bindgen] header: /tmp/4844212227435613958header.h
*/
opaque type Small = CStruct1[CLongLong]
object Small:
Expand All @@ -200,7 +200,7 @@ <h2><a href="#unions-are-converted-to-opaque-types" id="unions-are-converted-to-
import _root_.libtest.structs.*
import _root_.libtest.unions.*
/**
* [bindgen] header: /tmp/15031302402254261891header.h
* [bindgen] header: /tmp/4844212227435613958header.h
*/
opaque type Big = CArray[Byte, Nat._8]
object Big:
Expand Down Expand Up @@ -271,7 +271,7 @@ <h3><a href="#simple-functions-are-converted-to-direct-extern-functions" id="sim
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/17566268932030793958header.h
* [bindgen] header: /tmp/6115770943627714088header.h
*/
opaque type Small = CStruct1[CLongLong]
object Small:
Expand All @@ -290,12 +290,12 @@ <h3><a href="#simple-functions-are-converted-to-direct-extern-functions" id="sim
private[libtest] object extern_functions:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/17566268932030793958header.h
* [bindgen] header: /tmp/6115770943627714088header.h
*/
def simple(x : CInt, y : CString): CLongInt = extern

/**
* [bindgen] header: /tmp/17566268932030793958header.h
* [bindgen] header: /tmp/6115770943627714088header.h
*/
def with_pointers(x : Ptr[Small], y : CInt): Ptr[Small] = extern

Expand Down Expand Up @@ -344,7 +344,7 @@ <h2><a href="#problematic-functions-generate-c-forwarders" id="problematic-funct
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/12649637828850304626header.h
* [bindgen] header: /tmp/13387167773265028707header.h
*/
opaque type Small = CStruct1[CLongLong]
object Small:
Expand Down Expand Up @@ -373,13 +373,13 @@ <h2><a href="#problematic-functions-generate-c-forwarders" id="problematic-funct
export extern_functions.*

/**
* [bindgen] header: /tmp/12649637828850304626header.h
* [bindgen] header: /tmp/13387167773265028707header.h
*/
def bad_arguments(n : Ptr[Small], n2 : Ptr[Small]): Unit =
__sn_wrap_libtest_bad_arguments(n, n2)

/**
* [bindgen] header: /tmp/12649637828850304626header.h
* [bindgen] header: /tmp/13387167773265028707header.h
*/
def bad_arguments(n : Small, n2 : Small)(using Zone): Unit =
val __ptr_0: Ptr[Small] = alloc[Small](2)
Expand All @@ -388,19 +388,19 @@ <h2><a href="#problematic-functions-generate-c-forwarders" id="problematic-funct
__sn_wrap_libtest_bad_arguments((__ptr_0 + 0), (__ptr_0 + 1))

/**
* [bindgen] header: /tmp/12649637828850304626header.h
* [bindgen] header: /tmp/13387167773265028707header.h
*/
def bad_return_type()(__return : Ptr[Small]): Unit =
__sn_wrap_libtest_bad_return_type(__return)

/**
* [bindgen] header: /tmp/13387167773265028707header.h
*/
def bad_return_type()(using Zone): Small =
val __ptr_0: Ptr[Small] = alloc[Small](1)
__sn_wrap_libtest_bad_return_type((__ptr_0 + 0))
!(__ptr_0 + 0)

/**
* [bindgen] header: /tmp/12649637828850304626header.h
*/
def bad_return_type()(__return : Ptr[Small]): Unit =
__sn_wrap_libtest_bad_return_type(__return)

object types:
export _root_.libtest.structs.*

Expand Down Expand Up @@ -477,7 +477,7 @@ <h2><a href="#enums-are-generated-for-specific-c-type" id="enums-are-generated-f
object enumerations:
import predef.*
/**
* [bindgen] header: /tmp/14126961968675580259header.h
* [bindgen] header: /tmp/1523245029739613255header.h
*/
opaque type MySigned = CInt
object MySigned extends CEnum[MySigned]:
Expand All @@ -498,7 +498,7 @@ <h2><a href="#enums-are-generated-for-specific-c-type" id="enums-are-generated-f
inline def is(b: MySigned): Boolean = (a &amp; b) == b

/**
* [bindgen] header: /tmp/14126961968675580259header.h
* [bindgen] header: /tmp/1523245029739613255header.h
*/
opaque type MyUnsigned = CUnsignedInt
object MyUnsigned extends CEnumU[MyUnsigned]:
Expand Down Expand Up @@ -551,7 +551,7 @@ <h2><a href="#function-pointers-are-defined-as-opaque-types" id="function-pointe
object aliases:
import _root_.libtest.aliases.*
/**
* [bindgen] header: /tmp/3311296572705885689header.h
* [bindgen] header: /tmp/16256586414856992510header.h
*/
opaque type Cursor = Ptr[Byte]
object Cursor:
Expand All @@ -561,7 +561,7 @@ <h2><a href="#function-pointers-are-defined-as-opaque-types" id="function-pointe
inline def value: Ptr[Byte] = v

/**
* [bindgen] header: /tmp/3311296572705885689header.h
* [bindgen] header: /tmp/16256586414856992510header.h
*/
opaque type Visitor = CFuncPtr1[Ptr[Cursor], CInt]
object Visitor:
Expand Down Expand Up @@ -609,7 +609,7 @@ <h2><a href="#recursive-structs-are-rewritten-with-opaque-pointers" id="recursiv
object structs:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/8026759498579399231header.h
* [bindgen] header: /tmp/8767757494736964101header.h
*/
opaque type Arr = CStruct1[Ptr[Byte]]
object Arr:
Expand Down

0 comments on commit 16225da

Please sign in to comment.