Skip to content

Introducing gql-rs: Sovereign Open-Source Rust Parser for the ISO GQL

Today, we are thrilled to announce the public release of gql-rs, an open-source library written in Rust designed for parsing, validating, and syntactically analyzing the ISO/IEC 39075:20254 GQL graph query language.

This marks the first building block of a broader, modular architecture designed to bring reliable, high-performance, and standards-compliant tools to the graph database ecosystem.

Alongside our documentation page, this post synthesises the engineering philosophy, components, and vision behind the framework.

What is ISO GQL?

For years, the graph database landscape has suffered from fragmentation across proprietary dialects and vendor-specific solutions (such as Cypher, PGQL, or Gremlin). The ISO addressed this gap by formally publishing the ISO/IEC 39075: Graph Query Language (GQL).

This is the first time in over thirty years—since the standardization of SQL—that an international standard query language has been formally established for data management. GQL combines the power of the Property Graph model with rich type systems, expressive pattern matching syntax, and rigorous formal semantics.

However, implementing such a comprehensive standard requires robust parsing tools capable of handling complex grammars without sacrificing formal correctness.

Why Another GQL Parser?

With various parser projects already existing in the broader database landscape, you might ask: why build a new one from scratch? 

We faced three fundamental challenges that led us to develop gql-rs:

  • 100% ISO GQL Grammar Compliance: Existing tools and community parsers often cover only partial subsets or make compromises with the specification. We decided to embark on a fresh implementation to ensure full, strict adherence to 100% of the formal ISO GQL grammar, leaving no room for syntactic ambiguity. 
  • Extending for Custom UDFs (User-Defined Functions): In real-world workloads, standard procedures can become a bottleneck. We needed the ability to customise query execution dynamically, which led us to extend the original grammar with native support for User-Defined Functions (UDFs). This allows developers to embed custom logic directly into the query execution flow beyond basic out-of-the-box routines. 
  • A Pure, Native Rust Ecosystem: Many reference parsers for complex formal grammars rely on Java (ANTLR’s primary target) or C++. We wanted a modern, memory-safe, and zero-cost abstraction toolchain native to Rust. By delivering a crate that integrates seamlessly with Cargo—free from JVM overhead and heavy external runtimes—we provide a foundational building block for high-performance query engines and distributed graph systems.

Seeing gql-rs go from a whiteboard sketch to a public crate has been one of the most rewarding experiences of my career so far. I’m proud to give something back to the Rust Open-Source Community, and I hope this parser saves other developers the time we spent wrestling with the ISO grammar. I can’t wait to see issues, pull requests, and ideas from the community: that’s how gql-rs will grow into something much bigger than what Nicola and I did so far

MATTEO BOSCOLO, CORE ENGINEERing @ NTUR LAB

Technical Approach: Rust and ANTLR

For gql-rs, Rust was the natural language of choice: its compile-time memory safety, predictable low-level performance, and first-class modularity make it ideal for foundational infrastructure components.

For grammar analysis, we integrated ANTLR (ANother Tool for Language Recognition)::

  1. Strict Standard Compliance: ANTLR is one of the most mature and accurate parser generators available. Given the scale and complexity of the ISO GQL grammar, leveraging ANTLR allowed us to derive lexers and parsers while maintaining absolute fidelity to the formal ISO specification.
  2. From Grammar to Rust AST: Following the lexing and parsing phase handled by the ANTLR runtime, gql-rs transforms the raw parse tree into a strongly typed, idiomatic Rust AST (Abstract Syntax Tree).

Architecture and Core Features of gql-rs

The crate handles the end-to-end pipeline that converts a raw query string into a verified semantic representation:

  • Lexing and Parsing: Lexical and syntactic analysis strictly driven by the formal ISO GQL grammar.
  • AST Construction: Mapping into native Rust data structures (enum, struct), optimized for pattern matching and downstream static analysis.
  • Semantic AST Validation: A rule-based pipeline that verifies the internal consistency of the query prior to planning or execution (binding scopes, pattern validity, and baseline type checking).
  • Diagnostic Error Reporting: Clear, actionable error messages to streamline troubleshooting syntax errors and specification violations.

Working with the ISO GQL specification via ANTLR was an exciting challenge: mapping such an extensive formal grammar into a clean, strongly typed, and ergonomic AST in Rust requires meticulous attention to semantic detail. This release is just the beginning: we are excited to share this work with the community and, alongside NTUR LAB, lay the foundational brick for an open data infrastructure based on open standards and the EUPL license.

NICOLA MIOTTO, CORE ENGINEERing @ NTUR LAB

The First Milestone Toward Digital Sovereignty

gql-rs is not intended to exist in isolation; it serves as the foundational cornerstone for an upcoming suite of execution engines, query processors, and interoperable data federation layers.

We are currently laying the foundations and rolling out the first milestones of the AUREA architecture. To give you an immediate, high-level overview of our vision, components, and progress, we have launched a dedicated landing page.

Today, we are proud to see our first open-source component released under the EUPL (European Union Public Licence), marking the moment the NTUR LAB digital sovereignty project lays its very first brick..

Resources & Contributing

The codebase is open to contributions, bug reports, and feedback from the broader open-source community:

Get involved

Building a truly sovereign and resilient data stack isn’t a solo journey—it’s a collaborative ecosystem effort. Whether you are a system architect looking to benchmark our performance, an enterprise leader seeking compliance-first infrastructure, or a developer eager to contribute to zero-dependency components like gql.rs, there are several ways to get involved:

  • Explore the Architecture: Take a closer look at our decoupled design, component specs, and sovereign principles directly on our landing page.
  • Test & Feedback: Join our early partner network to evaluate real-world use cases, stress-test streaming pipelines, and shape our technical roadmap.
  • Connect with the Team: Reach out to discuss technical integrations, compliance requirements, or custom architectural fits for your enterprise.

Whether you are an engineer, architect, or technology leader interested in sovereign infrastructure, we invite you to explore what we are building and join us as we shape the platform.

Author