Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 18 Mar 23:07
208ce44

Added

  • fs module: Metadata, DirEntry, ReadDir, FileType types mirroring std::fs. read_dir() returns an iterator, metadata() returns a typed struct with .len(), .is_dir(), .is_file(), .modified(). (astrid-sdk)
  • http module: typed Request builder (get/post/put/delete/header/body/json) and Response with .bytes()/.text()/.json(). send() and stream_start() take &Request. (astrid-sdk)
  • net module: recv/try_recv/send/try_accept with RecvError/TryRecvError/SendError mirroring std::sync::mpsc. NetReadStatus wire format with status-byte prefix replaces sentinel hack. (astrid-sdk)
  • impl std::error::Error for RecvError, TryRecvError, SendError. (astrid-sdk)
  • #[capsule(state)] attribute for explicit stateful opt-in alongside &mut self auto-detection. (astrid-sdk-macros)

Changed

  • time::now_ms() -> Result<u64> replaced by time::now() -> Result<SystemTime> using std::time::SystemTime directly. (astrid-sdk)
  • log functions take impl Display instead of impl AsRef<[u8]> for messages, &str for level. (astrid-sdk)
  • fs module 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() from net module — replaced by recv/send/try_accept. (astrid-sdk)
  • request_bytes() from http module — replaced by send(&Request). (astrid-sdk)
  • now_ms() from time module — replaced by now(). (astrid-sdk)

Fixed

  • SysError conversion in macro-generated dispatch code — ? on method calls now maps SysError explicitly instead of relying on unimplemented From<SysError> for WithReturnCode<Error>. (astrid-sdk-macros)
  • net::read no longer traps on peer disconnect — uses NetReadStatus wire format instead of WASM trap. (astrid-sdk)

With many thanks from the following Astrinauts 🚀

  • Joshua J. Bouw