- Apply consistent alignment for struct fields and parameters - Standardize string literal delimiters to single quotes - Refactor module import strategy in `models` package - Enhance asset formatting for precise decimal display - Remove unused imports and redundant `+}` syntax artifacts
24 lines
652 B
GLSL
Executable File
24 lines
652 B
GLSL
Executable File
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
|
|
|
import freeflowuniverse.herolib.hero.heromodels.openrpc
|
|
import freeflowuniverse.herolib.hero.heromodels
|
|
import freeflowuniverse.herolib.ui.console
|
|
import time
|
|
import os
|
|
|
|
console.print_header('HeroModels OpenRPC Server Example')
|
|
|
|
// Create and start the server
|
|
mut server := openrpc.new_rpc_server(socket_path: '/tmp/heromodels')!
|
|
|
|
// Start server in a separate thread
|
|
spawn server.start()
|
|
|
|
console.print_item('Server started on /tmp/heromodels')
|
|
console.print_item('Press Ctrl+C to stop the server')
|
|
|
|
// Keep the main thread alive
|
|
for {
|
|
time.sleep(1 * time.second)
|
|
}
|