You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make specta_serde errors good. Include path to procedure where it broke and which type it broke on.
Remove BigInt warnings
Core:
rspc_procedure
Split out of rspc_core
Allow downcasting (DynOutput::value) a non from_*_stream type?
Handle invariants of DynInput::new_value. Option::None will reach havoc.
Make serde/related crates an optional depedency (cause Binario doesn't need it)
ResolverError::new forces usage of Serde for value. Can we allow dyn Any?
Error should have a variant for a custom error by middleware (Eg. Zer). I'm not sure we can make it generate a type but it should be able to serialize any data so a JS package could throw types back onto it later.
Should DynOutput have a variant for ProcedureError? We can allow manually grabbing it but it would make the serialization code in userspace much cleaner.
Simplify ProcedureStream's constructor code
ProcedureStream::from_error is broken with flushing logic. The todo!() in ProcedureStream::poll_inner
Make flush work
trait impls of ProcedureStream::map related types
type_name on DynOutput make it useful or remove it
Rename DynInput and DynOutput?
Drop all Any bounds cause they are implied
Rename - require_manual_stream -> block_streaming, stream -> unblock_streaming, etc.
Procedures::new
impl Fn() -> TCtx or TCtx: Clone. rspc_invalidation makes this annoying.
wait_util function similar to the Cloudflare Workers/Vercel feature. How would a CDN implement it properly?
Should we call it State or Data?
Finish Debug impls + clippy run
Documentation
Audit for erased_serde in public API
Ecosystem:
rspc_devtools
fix it
Should we provide a way to set CORS header. If we leave it on the user the URL being the same is a problem?
rspc_tracing:
Drop `rspc_core::Procedure::with_logger``
Add Logger in rspc_core
Allow Router::setup to inject a Logger instance for rspc-tracing
Logger hook should create span with procedure metadata (ensure that span is tracked for the future somehow)
Middleware should only add input/result to existing span.
Features
Zer::from_request errors handled as an rspc_core::ProcedureError??
rspc - cleanup module structure cause it's a mess
SFM's
What if a SFM tries to call .invalidate?? We can't queue it again without conflicting keys
What if a SFM calls flush?? Cause we are well past that point.
stream.resolved() || stream.flushable() is bad
Delay executing SFM queries until the batch resolves
Deduplicating SFM keys for rspc_invalidation
Prevent calling .invalidate after streaming has started. What should happen?
rspc_invalidation can we skip serde_json::Value?
rspc_invalidateInvalidate::Any
rspc_invalidateInvalidate::Many
Wire protocol
Allow extensions to add extra data
Custom streaming response format. Differentiate errors vs values and reference to which query/mutation the result is referring to.
Poll the runtime while waiting for the next FormData item in the input.
Support WebSocket upgrades too
Are we going to keep rspc-axum/rspc-actix-web/rspc-http. Heavily dependant on how out of control the code in userspace ends up as.
File will bridge AsyncWrite/AsyncBufWrite to Stream<Item = Vec<u8>> so it can reuse the existing streaming machinery. This will allow interleaving multiple file downloads in one response.
In pratice this is how Hyper works so as much as I hate the overhead of buffering it's gonna happen anyway.
Yield AsBuffer(Vec<u8>) and then we can know to set the Content-Type in the transport layer correctly.
New syntax
If TError is fixed maybe we put it on the Router cause it's a bit wierd with BaseProcedure?
ResolverError takes two args which should both be self and anyhow::Error is not Clone. I think we can do smart stuff with constructors to solve this.
rspc::Error2 is super unsafe! It lets you choose to use #[error(...)] for the repr which is a string not TError.
Drop rspc::Error2 in favor of Into?
Manual flushing option build on the ProcedureStream flushing stuff
ProcedureBuilder::subscription implemented
Type exporting (right now they are hardcoded to DataType::Unknown)
Minor:
specta_serdeerrors good. Include path to procedure where it broke and which type it broke on.Core:
rspc_procedurerspc_coreDynOutput::value) a nonfrom_*_streamtype?DynInput::new_value.Option::Nonewill reach havoc.serde/related crates an optional depedency (cause Binario doesn't need it)ResolverError::newforces usage of Serde forvalue. Can we allowdyn Any?Errorshould have a variant for a custom error by middleware (Eg. Zer). I'm not sure we can make it generate a type but it should be able to serialize any data so a JS package could throw types back onto it later.DynOutputhave a variant forProcedureError? We can allow manually grabbing it but it would make the serialization code in userspace much cleaner.ProcedureStream's constructor codeProcedureStream::from_erroris broken with flushing logic. Thetodo!()inProcedureStream::poll_innerflushworkProcedureStream::maprelated typestype_nameonDynOutputmake it useful or remove itDynInputandDynOutput?Anybounds cause they are impliedrequire_manual_stream->block_streaming,stream->unblock_streaming, etc.Procedures::newimpl Fn() -> TCtxorTCtx: Clone.rspc_invalidationmakes this annoying.wait_utilfunction similar to the Cloudflare Workers/Vercel feature. How would a CDN implement it properly?StateorData?Debugimpls + clippy runerased_serdein public APIEcosystem:
rspc_devtoolsrspc_tracing:Loggerinrspc_coreRouter::setupto inject aLoggerinstance forrspc-tracinginput/resultto existing span.Features
Zer::from_requesterrors handled as anrspc_core::ProcedureError??rspc- cleanup module structure cause it's a mess.invalidate?? We can't queue it again without conflicting keysflush?? Cause we are well past that point.stream.resolved() || stream.flushable()is badrspc_invalidation.invalidateafter streaming has started. What should happen?rspc_invalidationcan we skipserde_json::Value?rspc_invalidateInvalidate::Anyrspc_invalidateInvalidate::ManyFormDataitem in the input.rspc-axum/rspc-actix-web/rspc-http. Heavily dependant on how out of control the code in userspace ends up as.Filewill bridgeAsyncWrite/AsyncBufWritetoStream<Item = Vec<u8>>so it can reuse the existing streaming machinery. This will allow interleaving multiple file downloads in one response.Hyperworks so as much as I hate the overhead of buffering it's gonna happen anyway.AsBuffer(Vec<u8>)and then we can know to set theContent-Typein the transport layer correctly.TErroris fixed maybe we put it on theRoutercause it's a bit wierd withBaseProcedure?ResolverErrortakes two args which should both beselfandanyhow::Erroris notClone. I think we can do smart stuff with constructors to solve this.rspc::Error2is super unsafe! It lets you choose to use#[error(...)]for the repr which is astringnotTError.rspc::Error2in favor ofInto?ProcedureStreamflushing stuffProcedureBuilder::subscriptionimplementedDataType::Unknown)ProcedureMeta::statecalled within aMiddleware::setupshould panic when accessed as it can't be valid.keyinProcedure2::builder.specta_serdeintegration prototypeIntoResponse: !future compat warningProcedure2intomodern::procedureor keep in root?Middleware::setupandExtension::setupare overriding which is major cringe alert.Extensionmap function working. Might needTErrorgeneric?rspc_middleware-ResolverInput,ResolverOutput,Middleware,Extensionand related stuffrspcand instead userspc_middlewarerspc-invalidationto mutations and subscriptions. Should we make it typesafe?ProcedureStreamMaperror handlingProcedureError::Serializeror not? If not clear out commented out stuff.rspc_taurishould handle first-level serializer errors through rspc instead of throwing into Tauri.@rspc/tauriwith legacy systemFilefromrspc_http? Idk if their IPC can handle it but I suppose supporting it anyway would be worthwhile.WithDateSerialize?thread_localto enable the special rspc encoding so the type doesn't mess with users other stuff.Accept: text/x-rspcfor it to use the special encoding.TypeMap+TypeCollectionspecta#294 &Languagein practice specta#297 & releasingspecta-rust.Breaking Changes:
rspc_axum/rspc_tauri. Userspace maybe?rspc_legacy+ old bindings formatUnsorted:
Procedure'sArcing.Procedure2::errorbeingOption<DataType>or not?Serializeon error. Similar to the regularOktype.rspc.