Skip to content

Commit 461ab26

Browse files
committedNov 9, 2024··
Update ffi README files (lune-org#243)
1 parent 7a7ccf7 commit 461ab26

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed
 

‎crates/lune-std-ffi/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Define C-ABI type information and provide conversion and casting
4040
- [**Struct `CStructInfo`:**](./src/c/struct_info.rs) Represents C Struct type
4141
- [**Struct `CTypeInfo<T>`:**](./src/c/type_info.rs) Represents C type, extended in `/c/types`
4242

43-
<details><summary><a href="./src/c/helper.rs"><strong>Mod <code>helper.rs</code>: C ABI type helper</strong></a></summary>
43+
<details><summary><a href="./src/c/helper.rs"><strong>Mod <code>helper.rs</code>:</strong></a> C ABI type helper</summary>
4444

4545
- **Function `get_conv`, `get_conv_list`:**
4646
get `FfiConvert` from userdata (CStruct, CArr, CPtr, CTypes)
@@ -64,7 +64,7 @@ Define C-ABI type information and provide conversion and casting
6464
Export fixed-size source time known types and non-fixed compile time known types
6565
mod.rs implememts type-casting for all CTypes
6666

67-
<details><summary><a href="./src/c/types/mod.rs"><strong>Mod <code>ctype_helper</code>:</strong></a> c type helper</summary>
67+
<details><summary><a href="./src/c/types/mod.rs"><strong>Mod <code>ctype_helper</code>:</strong></a> CTypeInfo helper</summary>
6868

6969
- **Function `get_conv`:**
7070
get `FfiConvert` from ctype userdata, used for struct and array conversion

‎tests/ffi/README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- markdownlint-disable MD036 -->
2+
<!-- markdownlint-disable MD033 -->
23

34
# `tests/ffi`
45

@@ -24,6 +25,12 @@ gcc for library compiling (for external-\*)
2425
- [x] [read_boundary](./read_boundary.luau)
2526
- [x] [write_boundary](./write_boundary.luau)
2627

28+
**Types**
29+
30+
- [x] [arr](./types/arr.luau)
31+
- [x] [ptr](./types/ptr.luau)
32+
- [x] [struct](./types/struct.luau)
33+
2734
**Pretty Print**
2835

2936
- [x] [arr](./pretty_print/arr.luau)
@@ -39,7 +46,7 @@ gcc for library compiling (for external-\*)
3946

4047
> Note: LuaJit's os.clock function returns process CPU time (used) which much smaller then Luau's os.clock output. In this benchmark, luau uses 'time.h' instead of os.clock. See [utility/proc_clock](./utility/proc_clock/init.luau)
4148
42-
### [benchmark/external_call](./benchmark/external_call/init.luau)
49+
<details><summary><h3><a href="./benchmark/external_call/init.luau">benchmark/external_call</a></h3></summary>
4350

4451
**Target external c function**
4552

@@ -102,3 +109,5 @@ Command: `deno run --unstable-ffi --allow-ffi ./tests/ffi/benchmark/external_cal
102109
> MEM: 12250MiB 5600 MT/s
103110
> KERNEL: 10.0.22631 (Windows 11 x86_64)
104111
> HOST: QEMU Standard PC (Q35 + ICH9, 2009)
112+
113+
</details>

0 commit comments

Comments
 (0)
Please sign in to comment.