This commit is contained in:
2025-08-21 12:21:52 +02:00
parent febe87c55e
commit 40b3911781
4 changed files with 3 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ compile_cmd := if os.user_os() == 'macos' {
if prod_mode { if prod_mode {
'v -enable-globals -g -w -n -prod hero.v' 'v -enable-globals -g -w -n -prod hero.v'
} else { } else {
'v -n -g -w -cg -cc tcc -d use_openssl -enable-globals hero.v' 'v -n -g -w -cg -gc none -cc tcc -d use_openssl -enable-globals hero.v'
} }
} else { } else {
if prod_mode { if prod_mode {

View File

@@ -17,7 +17,7 @@ pub struct MyceliumRPC {
pub mut: pub mut:
name string = 'default' name string = 'default'
url string = default_url // RPC server URL url string = default_url // RPC server URL
rpc_client ?&jsonrpc.Client @[skip] // rpc_client ?&jsonrpc.Client @[skip]
} }
// your checking & initialization code if needed // your checking & initialization code if needed

View File

@@ -5,12 +5,8 @@ import freeflowuniverse.herolib.schemas.jsonrpcmodel
// Helper function to get or create the RPC client // Helper function to get or create the RPC client
fn (mut c ZinitRPC) client_() !&jsonrpc.Client { fn (mut c ZinitRPC) client_() !&jsonrpc.Client {
if client := c.rpc_client {
return client
}
// Create Unix socket client // Create Unix socket client
mut client := jsonrpc.new_unix_socket_client(c.socket_path) mut client := jsonrpc.new_unix_socket_client(c.socket_path)
c.rpc_client = client
return client return client
} }

View File

@@ -30,7 +30,7 @@ pub struct ZinitRPC {
pub mut: pub mut:
name string = 'default' name string = 'default'
socket_path string socket_path string
rpc_client ?&jsonrpc.Client @[skip] // rpc_client ?&jsonrpc.Client @[skip]
} }
// your checking & initialization code if needed // your checking & initialization code if needed