Skip to content

Harden public API for 0.6.0 release #31

Description

@joshuajbouw

Summary

Break all deprecated APIs and harden the public contract before the 0.6.0 release. Since every capsule needs a rebuild (Component Model ABI change from #29), ship all breaking changes in one version.

Breaking changes

Removed

  • ipc::publish_bytes, ipc::publish_msgpack, ipc::poll_bytes, ipc::recv_bytes — use ipc::publish, ipc::publish_json, ipc::poll, ipc::recv
  • uplink::send_bytes — use uplink::send
  • net::bind_unix(path) — use net::bind_unix() (no path arg, kernel pre-binds)
  • hooks::trigger(&[u8]) — now trigger(&str) -> String
  • process::ProcessRequest struct (dead code)
  • SubscriptionHandle::as_bytes() — use .id()
  • approval::RiskLevel, approval::ApprovalDecision, approval::ApprovalResult — approval simplified to request(action, resource) -> bool
  • rmp-serde dependency (only user was publish_msgpack)
  • bytes_to_str helper (all APIs now take &str)

New typed APIs

  • ipc::poll() / ipc::recv() return typed PollResult { messages: Vec<Message>, dropped, lagged }
  • http::Response exposes status(), headers(), is_success()
  • approval::request(action, resource) -> Result<bool> (2 params, returns bool)
  • log::trace() added

Simplified

  • All log functions return () (was Result — never fails)
  • http::Response fields all via methods (consistent encapsulation)
  • All handle types standardized: private inner u64, public id() method
  • interceptors::poll handler receives typed &ipc::PollResult

Companion PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions