Skip to content

Commit b4b6c58

Browse files
authored
update: first mapping tutorial revamp (#4708)
1 parent 7b416a9 commit b4b6c58

7 files changed

+270
-252
lines changed

docs/topics/native/apple-framework.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ In this tutorial, you will:
2424
* [Use the framework from Swift](#use-code-from-swift)
2525

2626
You can use the command line to generate a Kotlin framework, either directly or with a script file (such as `.sh` or `.bat` file).
27-
However, this approach doesn't scale well for big projects that have hundreds of files and libraries.
27+
However, this approach doesn't scale well for larger projects that have hundreds of files and libraries.
2828
Using a build system simplifies the process by downloading and caching the Kotlin/Native
29-
compiler binaries and libraries with transitive dependencies and run the compiler and tests.
29+
compiler binaries and libraries with transitive dependencies, as well as by running the compiler and tests.
3030
Kotlin/Native can use the [Gradle](https://gradle.org) build system through the [Kotlin Multiplatform plugin](gradle-configure-project.md#targeting-multiple-platforms).
3131

3232
> If you use a Mac and want to create and run applications for iOS or other Apple targets, you also need to

docs/topics/native/mapping-function-pointers-from-c.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
[//]: # (title: Mapping function pointers from C – tutorial)
22

3+
<tldr>
4+
<p>This is the third part of the <strong>Mapping Kotlin and C</strong> tutorial series.</p>
5+
<p><img src="icon-1-done.svg" width="20" alt="First step"/> <a href="mapping-primitive-data-types-from-c.md">Mapping primitive data types from C</a><br/>
6+
<img src="icon-2-done.svg" width="20" alt="Second step"/> <a href="mapping-struct-union-types-from-c.md">Mapping struct and union types from C</a><br/>
7+
<img src="icon-3.svg" width="20" alt="Third step"/> <strong>Mapping function pointers</strong><br/>
8+
<img src="icon-4-todo.svg" width="20" alt="Fourth step"/> <a href="mapping-strings-from-c.md">Mapping strings from C</a><br/>
9+
</p>
10+
</tldr>
11+
312
> The C libraries import is [Experimental](components-stability.md#stability-levels-explained).
413
> All Kotlin declarations generated by the `cinterop` tool from C libraries
514
> should have the `@ExperimentalForeignApi` annotation.
@@ -9,12 +18,8 @@
918
>
1019
{style="warning"}
1120

12-
This is the third post in the series. The very first tutorial is
13-
[Mapping primitive data types from C](mapping-primitive-data-types-from-c.md). There are also
14-
[Mapping struct and union types from C](mapping-struct-union-types-from-c.md) and
15-
[Mapping strings from C](mapping-strings-from-c.md) tutorials.
21+
In this tutorial, you'll learn how to:
1622

17-
In this tutorial We will learn how to:
1823
- [Pass Kotlin function as C function pointer](#pass-kotlin-function-as-c-function-pointer)
1924
- [Use C function pointer from Kotlin](#use-the-c-function-pointer-from-kotlin)
2025

@@ -259,13 +264,12 @@ fun main() {
259264
}
260265
```
261266
262-
## Next Steps
267+
## Next step
268+
269+
In the next part of the series, you'll learn how strings are mapped between Kotlin and C:
270+
271+
**[Proceed to the next part](mapping-strings-from-c.md)**
263272

264-
Continue exploring more C language types and their representation in Kotlin/Native
265-
in next tutorials:
266-
- [Mapping primitive data types from C](mapping-primitive-data-types-from-c.md)
267-
- [Mapping struct and union types from C](mapping-struct-union-types-from-c.md)
268-
- [Mapping strings from C](mapping-strings-from-c.md)
273+
### See also
269274

270-
The [C Interop documentation](native-c-interop.md)
271-
covers more advanced scenarios of the interop.
275+
Learn more in the [Interoperability with C](native-c-interop.md) documentation that covers more advanced scenarios.

0 commit comments

Comments
 (0)