<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/callgraph-analysis-eufsryslz" -->

---
title: Callgraph analysis | daily.dev
description: Ferrous Systems explores multiple approaches to statically verifying that certain functions are never called in a Rust program, motivated by Ferrocene&#x27;s need...
canonical: https://daily.dev/posts/callgraph-analysis-eufsryslz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Callgraph analysis | daily.dev
og:description: Ferrous Systems explores multiple approaches to statically verifying that certain functions are never called in a Rust program, motivated by Ferrocene&#x27;s need...
og:url: https://daily.dev/posts/callgraph-analysis-eufsryslz
og:image: https://api.daily.dev/og/posts/EUFsryslz.png
og:image:alt: Callgraph analysis
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Callgraph analysis

**[Ferrous Systems](https://daily.dev/sources/ferroussystems)** · 14 min read · 2 upvotes · 0 comments

## Summary

Ferrous Systems explores multiple approaches to statically verifying that certain functions are never called in a Rust program, motivated by Ferrocene's need to certify a subset of `core` to IEC 61508 (SIL-2). Approaches covered include Clippy lints, effect type systems, linker-based tricks (no-panic), cfg hacks, and ultimately a custom rustc compiler driver. The chosen solution implements a callgraph analysis with two passes: a pre-monomorphization THIR pass for fast `cargo check` feedback, and a post-monomorphization MIR pass for reliable certification-grade analysis. The tool catches panics, unvalidated function calls, function pointer coercions, and dynamic trait object casts, even across crate boundaries and through generics.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ferrous-systems.com/blog/callgraph-analysis/>

## Similar posts on daily.dev

- [Rust core library partly polished for industrial safety spec](https://daily.dev/posts/rust-core-library-partly-polished-for-industrial-safety-spec-kvgfypftu) · The Register · 8 upvotes · 1 comments
- [Ferrous Systems Achieves IEC 61508 \(SIL 2\) Certification for Rust Core Library Subset](https://daily.dev/posts/ferrous-systems-achieves-iec-61508-sil-2-certification-for-rust-core-library-subset-cwr2ymfeu) · Ferrous Systems · 1 upvotes · 0 comments
- [Ferrocene 26.05.0 now available\!](https://daily.dev/posts/ferrocene-26-05-0-now-available--ylnkb994l) · Ferrous Systems · 5 upvotes · 0 comments
- [Ferrocene 25.11.0 now available\!](https://daily.dev/posts/ferrocene-25-11-0-now-available--ikreqgece) · Ferrous Systems · 10 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/callgraph-analysis-eufsryslz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Callgraph analysis","url":"https://daily.dev/posts/callgraph-analysis-eufsryslz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/callgraph-analysis-eufsryslz"},"datePublished":"2026-04-01T14:22:38.906Z","dateModified":"2026-04-01T14:23:08.973Z","description":"Ferrous Systems explores multiple approaches to statically verifying that certain functions are never called in a Rust program, motivated by Ferrocene's need...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Ferrous Systems","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ferrous Systems","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a8f63dc0f52b4b6ba115812403e31ce6","url":"https://daily.dev/sources/ferroussystems"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/callgraph-analysis-eufsryslz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ferrous Systems","item":"https://daily.dev/sources/ferroussystems"},{"@type":"ListItem","position":3,"name":"Callgraph analysis"}]}
```

