SpacetimeDB
SpacetimeDB copied to clipboard
Allow building custom standalone servers
Description of Changes
Expands the spacetimedb-standalone crate to also serve as a library to build your own standalone servers with custom auth services and more. This is accomplished by:
- Publishing some structs/properties to allow reusing the existing
StandaloneEnvinstead of having to recreate it from scratch. - Make
StandaloneEnvabstract over anyJwtAuthProviderand not just the default (but still default toDefaultJwtAuthProvider, so no API changes for existing clients)
API and ABI breaking changes
I don't believe this includes any breaking changes, other than some of the crate's API now being public. Since the crate is currently marked as unstable, this should be fine.
Expected complexity level and risk
Changes are very simple.
Testing
I'm using this branch locally to develop a custom SpacetimeDB server with stricter authentication requirements.
@jdetter lmk how I can go about signing the CLA
@m1guelpf Could you send me an email to [email protected]? Thanks, we'll keep an eye out for it 🙂
@m1guelpf We're happy to move forward with this. Just a note: While we guarantee API/ABI stability for future 1.* versions of SpacetimeDB, we can't make the same guarantee for using SpacetimeDB as a library. Your code may get broken without notice!
(also it looks like we have some merge conflicts now - if you can get those fixed, we should be good to go!)
@bfops resolved the conflicts! crate stability is not an issue for me, I was planning to pin to a commit anyways 😁
Hey @m1guelpf - based on the test failures, it looks like some more crates need updating.