This commit is contained in:
2025-02-10 13:21:57 +03:00
parent e997946c56
commit abe81190e6
10 changed files with 31 additions and 48 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env -S v -w -n -enable-globals run
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.baobab.generator
import freeflowuniverse.herolib.baobab.specification

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env -S v -w -n -enable-globals run
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.baobab.generator
import freeflowuniverse.herolib.baobab.specification

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env -S v -w -n -enable-globals run
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.baobab.generator
import freeflowuniverse.herolib.baobab.specification

View File

@@ -1,2 +1,3 @@
methods.v
meeting_scheduler_actor
meeting_scheduler_actor
generate_actor_module

View File

@@ -1,26 +1,30 @@
#!/usr/bin/env -S v -w -n -enable-globals run
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.baobab.generator
import freeflowuniverse.herolib.baobab.specification
import freeflowuniverse.herolib.schemas.openapi
import os
const example_dir = os.dir(@FILE)
const openapi_spec_path = os.join_path(example_dir, 'openapi.json')
// the actor specification obtained from the OpenRPC Specification
openapi_spec := openapi.new(path: openapi_spec_path)!
actor_spec := specification.from_openapi(openapi_spec)!
println(actor_spec)
actor_module := generator.generate_actor_module(
actor_spec,
interfaces: [.openapi, .http]
)!
actor_module.write(example_dir,
format: true
format: false
overwrite: true
compile: true
compile: false
)!
os.execvp('bash', ['${example_dir}/meeting_scheduler_actor/scripts/run.sh'])!