-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
4 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
//go:build !rpc | ||
// +build !rpc | ||
//go:build rpc | ||
// +build rpc | ||
|
||
package kcl | ||
|
||
import ( | ||
"kcl-lang.io/kcl-go/pkg/native" | ||
"kcl-lang.io/kcl-go/pkg/service" | ||
) | ||
import "kcl-lang.io/kcl-go/pkg/service" | ||
|
||
// Service returns the interaction interface between KCL Go SDK and KCL Rust core. | ||
// When `go build tags=native` is opened, use CGO and dynamic libraries to interact. | ||
// When closed, use the default RPC interaction logic to avoid CGO usage. | ||
func Service() service.KclvmService { | ||
return native.NewNativeServiceClient() | ||
return service.NewKclvmServiceClient() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
//go:build rpc | ||
// +build rpc | ||
//go:build !rpc | ||
// +build !rpc | ||
|
||
package kcl | ||
|
||
import "kcl-lang.io/kcl-go/pkg/service" | ||
import ( | ||
"kcl-lang.io/kcl-go/pkg/native" | ||
"kcl-lang.io/kcl-go/pkg/service" | ||
) | ||
|
||
// Service returns the interaction interface between KCL Go SDK and KCL Rust core. | ||
// When `go build tags=native` is opened, use CGO and dynamic libraries to interact. | ||
// When closed, use the default RPC interaction logic to avoid CGO usage. | ||
func Service() service.KclvmService { | ||
return service.NewKclvmServiceClient() | ||
return native.NewNativeServiceClient() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters