Skip to main content
Import the Rollup module. Everything starts from the Rollup namespace and its shared client, Rollup.shared, which runs on the main actor.
If your app has a type with the same name as one of Rollup’s, such as its own Profile, write Rollup.Profile for Rollup’s. Every type below is also available under Rollup.. For SwiftUI previews and tests, build results yourself, such as SearchResults(query: "ramen", results: [SearchResult(id: "…", places: [.init(name: "Ichiran")])]), Answer(text:assetIdentifiers:declined:) or Profile(json:evidence:refused:).

Codable results

Every public value type is Codable and Sendable, with camelCase keys. Enums encode as tagged objects, such as {"type":"indexing","step":"indexing","indexed":10,"total":40,…}. Use Rollup.jsonEncoder and Rollup.jsonDecoder, which write and read ISO 8601 dates, to pass results to a web view or another layer as JSON.