v0.4.0
Added
fsmodule:Metadata,DirEntry,ReadDir,FileTypetypes mirroringstd::fs.read_dir()returns an iterator,metadata()returns a typed struct with.len(),.is_dir(),.is_file(),.modified(). (astrid-sdk)httpmodule: typedRequestbuilder (get/post/put/delete/header/body/json) andResponsewith.bytes()/.text()/.json().send()andstream_start()take&Request. (astrid-sdk)netmodule:recv/try_recv/send/try_acceptwithRecvError/TryRecvError/SendErrormirroringstd::sync::mpsc.NetReadStatuswire format with status-byte prefix replaces sentinel hack. (astrid-sdk)impl std::error::ErrorforRecvError,TryRecvError,SendError. (astrid-sdk)#[capsule(state)]attribute for explicit stateful opt-in alongside&mut selfauto-detection. (astrid-sdk-macros)
Changed
time::now_ms() -> Result<u64>replaced bytime::now() -> Result<SystemTime>usingstd::time::SystemTimedirectly. (astrid-sdk)logfunctions takeimpl Displayinstead ofimpl AsRef<[u8]>for messages,&strfor level. (astrid-sdk)fsmodule extracted to its own file (fs.rs). (astrid-sdk)- Handle types (
ListenerHandle,StreamHandle,BackgroundProcessHandle) inner fields are now private. (astrid-sdk)
Removed
read(),write(),poll_accept()fromnetmodule — replaced byrecv/send/try_accept. (astrid-sdk)request_bytes()fromhttpmodule — replaced bysend(&Request). (astrid-sdk)now_ms()fromtimemodule — replaced bynow(). (astrid-sdk)
Fixed
SysErrorconversion in macro-generated dispatch code —?on method calls now mapsSysErrorexplicitly instead of relying on unimplementedFrom<SysError> for WithReturnCode<Error>. (astrid-sdk-macros)net::readno longer traps on peer disconnect — usesNetReadStatuswire format instead of WASM trap. (astrid-sdk)
With many thanks from the following Astrinauts 🚀
- Joshua J. Bouw