CraftUI’s iOS software package connects a Metal drawing surface and platform messages
The CraftUI iOS host packages a C ABI, a Metal surface hook and a MethodChannel backend in version 0.1.0.
Where the Rust component meets the phone UI
CraftUI’s craftui-platform-ios 0.1.0 arrived on crates.io on November 29. Its Docs.rs record contains a separate build. The package describes an iOS host exposing a C ABI, a Metal surface hook and a MethodChannel backend. A small counter illustrates the boundaries. A tap sends a request to the Rust component, which produces a value that the platform then renders. Confirm the message arrived and verify that the visible value changed. Those observations can differ if a stale surface remains attached to the screen.
Track which screen owns a message
Leaving a view need not cancel every outstanding response. Switch screens before a counter update returns. Tag the request with the originating view and check that the late response does not update the new screen. Fixed integer and string values are enough to test the expected message format. Exercise two taps in quick succession as a distinct case, observing the stored value, visible state and any error feedback.
Exercise surface recreation
Rotation or foregrounding may change a mobile drawing surface. A fixture with a solid background and one short line makes an improperly sized surface visible. Check the first frame after changing orientation, then repeat after backgrounding and returning. Record the detected dimensions, lifecycle events and one capture. Keep incorrect clipping distinct from lost application state. These checks belong to the actual iOS target even when the package compiles for documentation elsewhere.
Document ownership at the C interface
When components written in different languages exchange a buffer, document which side allocates and releases it. Test a short request and returned string using the public interface. Compare empty and Unicode strings and check what remains valid after the call returns. The important result is the ownership contract for both success and failure, alongside the observed value. The package build cannot establish that a specific application observes it.
Keep the documentation build separate from device behavior
The Docs.rs record identifies the build attached to 0.1.0. It does not show an iPhone lifecycle test. In a device trial, record the package and operating system versions, the device and the same fixture used in the simulator. Compare rendering and application state on both. Hardware surface handling and background behavior deserve their own observations, even when basic layout is correct in the simulator.
Define a small finish line
The counter should show the expected value, ignore a reply owned by a previous screen, and draw at the new size after rotation. Use the same provided inputs on every run. Keep an event trace beside the screenshot so an unexpected number can be connected to the interaction that produced it.
Photo · Calvin Smith from Madrid, Spain / Wikimedia Commons ↗ · CC BY 2.0
Sources and verification
- Primary sourcecrates.io ↗
- Technical documentDocs.rs sürüm belgeleri ↗
- Reporting / cross-checkDocs.rs derleme kaydı ↗
Reader discussion
Which bottleneck would you expect as this solution scales?
No comments yet. Be the first to contribute.
Write a comment