Skip to content

Commit

Permalink
deploy: 3909804
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol committed Oct 27, 2024
1 parent 66fa012 commit de65eed
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+7-d07cbe4f-SNAPSHOT
Version: 0.1.4+8-39098048-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/8353806559700203239header.h
* [bindgen] header: /tmp/12966999292146759308header.h
*/
def myThing(n : CInt, i : CLongInt): CLongInt


object functions extends ExportedFunctions:
/**
* [bindgen] header: /tmp/8353806559700203239header.h
* [bindgen] header: /tmp/12966999292146759308header.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/5535190465639782563header.h
* [bindgen] header: /tmp/7458060479274051206header.h
*/
opaque type MyStuff = CStruct2[CInt, CString]
object MyStuff:
Expand All @@ -124,15 +124,15 @@
trait ExportedFunctions:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/5535190465639782563header.h
* [bindgen] header: /tmp/7458060479274051206header.h
*/
def myThing(n : CInt, str : Ptr[MyStuff]): CLongInt


object functions extends ExportedFunctions:
import _root_.libtest.structs.*
/**
* [bindgen] header: /tmp/5535190465639782563header.h
* [bindgen] header: /tmp/7458060479274051206header.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+7-d07cbe4f-SNAPSHOT&quot;)
addSbtPlugin(&quot;com.indoorvivants&quot; % &quot;bindgen-sbt-plugin&quot; % &quot;0.1.4+8-39098048-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/12410774899354764518header.h
* [bindgen] header: /tmp/8129604403461775737header.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/12410774899354764518header.h
* [bindgen] header: /tmp/8129604403461775737header.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/7908062289396269402header.h
* [bindgen] header: /tmp/403748641965510629header.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/7908062289396269402header.h
* [bindgen] header: /tmp/403748641965510629header.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/17146668176257654289header.h
* [bindgen] header: /tmp/17483400836737280135header.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/17146668176257654289header.h
* [bindgen] header: /tmp/17483400836737280135header.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/13575702814688159049header.h
* [bindgen] header: /tmp/2342213156558056327header.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/13575702814688159049header.h
* [bindgen] header: /tmp/2342213156558056327header.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/7139142975981660663header.h
* [bindgen] header: /tmp/3781091825311605938header.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/7139142975981660663header.h
* [bindgen] header: /tmp/3781091825311605938header.h
*/
def simple(x : CInt, y : CString): CLongInt = extern

/**
* [bindgen] header: /tmp/7139142975981660663header.h
* [bindgen] header: /tmp/3781091825311605938header.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/18432761380041464683header.h
* [bindgen] header: /tmp/1305800801375850556header.h
*/
opaque type Small = CStruct1[CLongLong]
object Small:
Expand Down Expand Up @@ -373,7 +373,7 @@ <h2><a href="#problematic-functions-generate-c-forwarders" id="problematic-funct
export extern_functions.*

/**
* [bindgen] header: /tmp/18432761380041464683header.h
* [bindgen] header: /tmp/1305800801375850556header.h
*/
def bad_arguments(n : Small, n2 : Small)(using Zone): Unit =
val __ptr_0: Ptr[Small] = alloc[Small](2)
Expand All @@ -382,25 +382,25 @@ <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/18432761380041464683header.h
* [bindgen] header: /tmp/1305800801375850556header.h
*/
def bad_arguments(n : Ptr[Small], n2 : Ptr[Small]): Unit =
__sn_wrap_libtest_bad_arguments(n, n2)

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

/**
* [bindgen] header: /tmp/1305800801375850556header.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/18432761380041464683header.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/14982358365027487794header.h
* [bindgen] header: /tmp/845036570600503368header.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/14982358365027487794header.h
* [bindgen] header: /tmp/845036570600503368header.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/13114066648012406196header.h
* [bindgen] header: /tmp/3914145446423676255header.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/13114066648012406196header.h
* [bindgen] header: /tmp/3914145446423676255header.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/7403437372342069607header.h
* [bindgen] header: /tmp/16970646358124423820header.h
*/
opaque type Arr = CStruct1[Ptr[Byte]]
object Arr:
Expand Down

0 comments on commit de65eed

Please sign in to comment.