feat: getting-started guide with working examples and enhanced Makefile #8
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A developer picking up
hero_rpctoday cannot easily:maketargets to run and in what orderThe repo has examples buried in
crates/osis/examples/basic/andcrates/server/examples/recipe_server/but there is no clear "start here" path that ties them together.Deliverables
1.
GETTING_STARTED.mdat repo rootStep-by-step guide covering:
make buildto build the workspace.oschemafile (reference the recipe_server example)build.rswithOschemaBuildConfig+generate_server()main.rsusingOServer::new()+server.register()+server.run()~/hero/var/sockets/{context}/{domain}.sockcurl --unix-socketcallsdocs/)openrpc_client!macro docs (exists indocs/openrpc_client.md)openrpc_proxy!docs (exists indocs/openrpc_proxy.md)2. Working
example/at repo rootTake the existing
crates/server/examples/recipe_server/and make sure it:cd example/recipe_server && cargo buildMakefilewith targets:build,run,test,seed,cleanREADME.mdexplaining what it demonstrates~/hero/var/sockets/root/recipe_server.sock3. Enhanced root
MakefileAdd targets:
make example— build and run the recipe_server examplemake example-test— run curl smoke tests against the example server4. Socket convention documentation
Document clearly in GETTING_STARTED.md:
Acceptance Criteria
make examplebuilds and runs a working server~/hero/var/sockets/{context}/{domain}convention🚧 Starting implementation of this issue.
Plan:
GETTING_STARTED.mdat repo rootexample/recipe_server/with Makefile, README, curl testsMakefilewithexampleandexample-testtargetsWill post progress updates as I go.
Progress update:
GETTING_STARTED.mdcreated at repo root — covers prerequisites, building, creating a service from scratch, socket conventions, curl testing, and links to all existing docsexample/recipe_server/created as workspace member with:Cargo.toml(workspace deps)build.rs(OSchema code generation)Makefilewith targets:build,run,test,test-full,seed,cleanREADME.mdexplaining what the example demonstratesscripts/recipe_curl_test.shcurl smoke testscrates/server/examples/recipe_server/Makefileenhanced withexampleandexample-testtargetsCargo.tomlupdated to includeexample/recipe_serveras workspace memberNow building and testing...
Progress update: Build successful
Completed so far:
GETTING_STARTED.mdat repo root — step-by-step guide covering prerequisites, building, creating a service from scratch, socket conventions, CRUD methods, and project layout referenceexample/recipe_server/— standalone example with:Cargo.toml(workspace member, sharestarget/)build.rs(OSchema code generation)Makefilewith targets:build,run,test,test-full,seed,cleanREADME.mdexplaining what it demonstratesscripts/recipe_curl_test.sh— curl smoke tests for all CRUD methodscrates/server/examples/recipe_server/with seed dataMakefileenhanced withexampleandexample-testtargetsCargo.tomlupdated —recipe_serveradded as workspace membercargo build --release -p recipe_servercompiles successfully.Next: run the server and smoke tests, then commit and push.
Closing — the getting-started guide needs to be rewritten from scratch to align with the hero_sdk rethinking (#13). The socket conventions, workspace structure, and server API have all changed significantly. A new issue will be created for the updated guide once the rethinking stabilizes.