Expand description
Trustfall
Trustfall is a query engine for querying any kind of data source, from APIs and databases to any kind of files on disk — and even AI models.
Try Trustfall in your browser
The Trustfall Playground supports running queries against public data sources such as:
- the HackerNews REST APIs: https://play.predr.ag/hackernews
- the rustdoc JSON of top Rust crates: https://play.predr.ag/rustdoc
For example, this link shows the results of the HackerNews query: “Which GitHub or Twitter users are commenting on stories about OpenAI?”
In the Playground, Trustfall is configured to run client-side as WASM, performing all aspects of query processing (parsing, compilation, and execution) within the browser. While this demo highlights Trustfall’s ability to be embedded within a target application, it is of course able to be used in a more traditional client-server context as well.
Examples of querying real-world data with Trustfall
- HackerNews APIs, including an overview of the query language and an example of querying REST APIs.
- RSS/Atom feeds, showing how to query structured data like RSS/Atom feeds.
- airport weather data (METAR), showing how to query CSV data from aviation weather reports.
Trustfall also powers the cargo-semver-checks
semantic versioning linter.
More details on the role Trustfall plays in that use case are available in
this blog post.
Modules
- Components needed to implement data providers.
Structs
- A Trustfall adapter for querying Trustfall schemas.
Enums
- Values of fields in Trustfall.
- Values of fields in GraphQL types.
Traits
- Deserialize Trustfall query results or edge parameters into a Rust struct.
Functions
- Run a Trustfall query over the data provider specified by the given schema and adapter.