Skip to content

Commit 2cb2285

Browse files
committed
docs: add kotlin and swift API init version
Signed-off-by: peefy <[email protected]>
1 parent 060293c commit 2cb2285

File tree

20 files changed

+164
-12
lines changed

20 files changed

+164
-12
lines changed

docs/reference/xlang-api/c-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 8
2+
sidebar_position: 10
33
---
44

55
# C API

docs/reference/xlang-api/cpp-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 11
33
---
44

55
# C++ API
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 8
3+
---
4+
5+
# Kotlin API
6+
7+
The official [Kotlin KCL package](https://github.com/kcl-lang/lib/tree/main/kotlin) has not been released yet. Issues and PRs are welcome!
8+
9+
Of course, you can use the KCL Java package to call the KCL API in Kotlin.
10+
11+
## Quick Start
12+
13+
```kotlin
14+
import com.kcl.api.API
15+
import com.kcl.api.execProgramArgs
16+
17+
val args = execProgramArgs { kFilenameList += "schema.k" }
18+
val api = API()
19+
val result = api.execProgram(args)
20+
```

docs/reference/xlang-api/swift-api.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
sidebar_position: 9
3+
---
4+
5+
# Swift API
6+
7+
The official [Swift KCL package](https://github.com/kcl-lang/lib/tree/main/swift) has not been released yet. Issues and PRs are welcome!
8+
9+
## Quick Start
10+
11+
```swift
12+
import KclLib
13+
14+
let api = API()
15+
var execArgs = ExecProgram_Args()
16+
execArgs.kFilenameList.append("schema.k")
17+
let result = try api.execProgram(execArgs)
18+
```

docs/reference/xlang-api/wasm-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 10
2+
sidebar_position: 12
33
---
44

55
# WASM API

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/xlang-api/c-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 8
2+
sidebar_position: 10
33
---
44

55
# C API

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/xlang-api/cpp-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 11
33
---
44

55
# C++ API
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 8
3+
---
4+
5+
# Kotlin API
6+
7+
[Kotlin KCL API](https://github.com/kcl-lang/lib/tree/main/kotlin) 正在开发当中,尚未正式发布。欢迎提交 Issues 或者 PRs 参与共建!
8+
9+
当然,您也可以在 Kotlin 中直接调用 KCL Java API。
10+
11+
## 快速开始
12+
13+
```kotlin
14+
import com.kcl.api.API
15+
import com.kcl.api.execProgramArgs
16+
17+
val args = execProgramArgs { kFilenameList += "schema.k" }
18+
val api = API()
19+
val result = api.execProgram(args)
20+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
sidebar_position: 9
3+
---
4+
5+
# Swift API
6+
7+
[Swift KCL API](https://github.com/kcl-lang/lib/tree/main/swift) 正在开发当中,尚未正式发布。欢迎提交 Issues 或者 PRs 参与共建!
8+
9+
## 快速开始
10+
11+
```swift
12+
import KclLib
13+
14+
let api = API()
15+
var execArgs = ExecProgram_Args()
16+
execArgs.kFilenameList.append("schema.k")
17+
let result = try api.execProgram(execArgs)
18+
```

i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/xlang-api/wasm-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 10
2+
sidebar_position: 12
33
---
44

55
# WASM API

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/xlang-api/c-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 8
2+
sidebar_position: 10
33
---
44

55
# C API

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/xlang-api/cpp-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 11
33
---
44

55
# C++ API
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 8
3+
---
4+
5+
# Kotlin API
6+
7+
[Kotlin KCL API](https://github.com/kcl-lang/lib/tree/main/kotlin) 正在开发当中,尚未正式发布。欢迎提交 Issues 或者 PRs 参与共建!
8+
9+
当然,您也可以在 Kotlin 中直接调用 KCL Java API。
10+
11+
## 快速开始
12+
13+
```kotlin
14+
import com.kcl.api.API
15+
import com.kcl.api.execProgramArgs
16+
17+
val args = execProgramArgs { kFilenameList += "schema.k" }
18+
val api = API()
19+
val result = api.execProgram(args)
20+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
sidebar_position: 9
3+
---
4+
5+
# Swift API
6+
7+
[Swift KCL API](https://github.com/kcl-lang/lib/tree/main/swift) 正在开发当中,尚未正式发布。欢迎提交 Issues 或者 PRs 参与共建!
8+
9+
## 快速开始
10+
11+
```swift
12+
import KclLib
13+
14+
let api = API()
15+
var execArgs = ExecProgram_Args()
16+
execArgs.kFilenameList.append("schema.k")
17+
let result = try api.execProgram(execArgs)
18+
```

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/xlang-api/wasm-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 10
2+
sidebar_position: 12
33
---
44

55
# WASM API

versioned_docs/version-0.9/reference/xlang-api/c-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 8
2+
sidebar_position: 10
33
---
44

55
# C API

versioned_docs/version-0.9/reference/xlang-api/cpp-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 11
33
---
44

55
# C++ API
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 8
3+
---
4+
5+
# Kotlin API
6+
7+
The official [Kotlin KCL package](https://github.com/kcl-lang/lib/tree/main/kotlin) has not been released yet. Issues and PRs are welcome!
8+
9+
Of course, you can use the KCL Java package to call the KCL API in Kotlin.
10+
11+
## Quick Start
12+
13+
```kotlin
14+
import com.kcl.api.API
15+
import com.kcl.api.execProgramArgs
16+
17+
val args = execProgramArgs { kFilenameList += "schema.k" }
18+
val api = API()
19+
val result = api.execProgram(args)
20+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
sidebar_position: 9
3+
---
4+
5+
# Swift API
6+
7+
The official [Swift KCL package](https://github.com/kcl-lang/lib/tree/main/swift) has not been released yet. Issues and PRs are welcome!
8+
9+
## Quick Start
10+
11+
```swift
12+
import KclLib
13+
14+
let api = API()
15+
var execArgs = ExecProgram_Args()
16+
execArgs.kFilenameList.append("schema.k")
17+
let result = try api.execProgram(execArgs)
18+
```

versioned_docs/version-0.9/reference/xlang-api/wasm-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 10
2+
sidebar_position: 12
33
---
44

55
# WASM API

0 commit comments

Comments
 (0)