@@ -48,12 +48,22 @@ Write the Code
48
48
package main
49
49
50
50
import (
51
- " kcl-lang.io/lib/go/install"
51
+ " fmt"
52
+
53
+ " kcl-lang.io/lib/go/api"
54
+ " kcl-lang.io/lib/go/native"
52
55
)
53
56
54
57
func main () {
55
- path = " path/to/install/lib"
56
- _ := install.InstallKclvm (path)
58
+ client := native.NewNativeServiceClient ()
59
+ result , err := client.ExecProgram (&api.ExecProgram_Args {
60
+ KFilenameList: []string {" main.k" },
61
+ KCodeList: []string {" a = 1" },
62
+ })
63
+ if err != nil {
64
+ t.Fatal (err)
65
+ }
66
+ fmt.Println (result.YamlResult )
57
67
}
58
68
```
59
69
@@ -85,7 +95,7 @@ This way you'll be able to import the above dependency to use the SDK.
85
95
<dependency >
86
96
<groupId >com.kcl</groupId >
87
97
<artifactId >kcl-lib</artifactId >
88
- <version >0.10.0-rc.1- SNAPSHOT</version >
98
+ <version >0.10.0-SNAPSHOT</version >
89
99
</dependency >
90
100
```
91
101
@@ -187,7 +197,7 @@ This way you'll be able to import the above dependency to use the SDK.
187
197
<dependency >
188
198
<groupId >com.kcl</groupId >
189
199
<artifactId >kcl-lib</artifactId >
190
- <version >0.10.0-rc.1- SNAPSHOT</version >
200
+ <version >0.10.0-SNAPSHOT</version >
191
201
</dependency >
192
202
```
193
203
@@ -221,7 +231,7 @@ For CMake, you can use FetchContent to add KCL C++ Lib to your project.
221
231
FetchContent_Declare(
222
232
kcl-lib
223
233
GIT_REPOSITORY https://github.com/kcl-lang/lib.git
224
- GIT_TAG v0.10.0-rc.1
234
+ GIT_TAG v0.10.0
225
235
SOURCE_SUBDIR cpp
226
236
)
227
237
FetchContent_MakeAvailable(kcl-lib)
0 commit comments