mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-11 10:29:21 -04:00
98585e858d
# Description of Changes Modules are like programs, databases are like processes. Your client connects to a remote database, not a remote module. <!-- Please describe your change, mention any related tickets, and so on here. --> # API and ABI breaking changes Yep! # Expected complexity level and risk 2? I made this change with find + replace, and it's possible that I borked the edit, or missed some reference somehow. It seems unlikely, however, that this change will have deeper implications we haven't considered. # Testing N/a
SDK Test Procedure C++ - Rust Client
Rust client for testing the sdk-test-procedure-cpp module.
Setup
-
Build the C++ module:
cd .. .\compile.bat -
Start SpacetimeDB (if not already running):
spacetime start -
Publish the module:
cd build spacetime publish --project-path .. lib.wasm --clear-database -
Generate Rust bindings:
cd ../client spacetime generate --lang rust --out-dir src/module_bindings --project-path . -
Run the client:
cargo run
Environment Variables
SPACETIMEDB_HOST- SpacetimeDB host URL (default:http://localhost:3000)SPACETIMEDB_DB_NAME- Database name (default:sdk-test-procedure-cpp)
Procedure Tests
The client will test the following procedures:
return_primitive(lhs, rhs)- Returns sum of two uint32 valuesreturn_struct(a, b)- Returns struct with fieldsreturn_constant()- Returns constant 42will_fail(value)- Returns error when value=0
Notes
This is a standalone Rust project, not part of the root workspace.