@@ -48,12 +48,22 @@ Write the Code
4848package main
4949
5050import (
51- " kcl-lang.io/lib/go/install"
51+ " fmt"
52+
53+ " kcl-lang.io/lib/go/api"
54+ " kcl-lang.io/lib/go/native"
5255)
5356
5457func 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 )
5767}
5868```
5969
@@ -85,7 +95,7 @@ This way you'll be able to import the above dependency to use the SDK.
8595<dependency >
8696 <groupId >com.kcl</groupId >
8797 <artifactId >kcl-lib</artifactId >
88- <version >0.10.0-rc.1- SNAPSHOT</version >
98+ <version >0.10.0-SNAPSHOT</version >
8999</dependency >
90100```
91101
@@ -187,7 +197,7 @@ This way you'll be able to import the above dependency to use the SDK.
187197<dependency >
188198 <groupId >com.kcl</groupId >
189199 <artifactId >kcl-lib</artifactId >
190- <version >0.10.0-rc.1- SNAPSHOT</version >
200+ <version >0.10.0-SNAPSHOT</version >
191201</dependency >
192202```
193203
@@ -221,7 +231,7 @@ For CMake, you can use FetchContent to add KCL C++ Lib to your project.
221231FetchContent_Declare(
222232 kcl-lib
223233 GIT_REPOSITORY https://github.com/kcl-lang/lib.git
224- GIT_TAG v0.10.0-rc.1
234+ GIT_TAG v0.10.0
225235 SOURCE_SUBDIR cpp
226236)
227237FetchContent_MakeAvailable(kcl-lib)
0 commit comments