Nested HN Comments API with Rust

1 min read (189 words)

Why I Built It?

To deal with information overload, I planned to build my own newspaper. The first step was to find a way to browse Hacker News quickly. Since English is not my first language and many technical terms are unfamiliar, I need an AI summary. This meant finding a way to retrieve Hacker News comments for stories.

The Problem with the Official API

The official API doesn't support nested comments - you can only get a story or a comment one at a time.

My Solution

I used Rust and Cloudflare Workers to build an API that return nested comments.

You can see more at Github

Problem During Development

I faced several issues.

Issue: Cloudflare Workers Build Failure

Issue Description

I couldn't build successfully in cloudflare Workers(encountered this issue)

Solution

I built locally, then push to Cloudflare using the command npx wrangler deploy.

What's Next

I plan to use this API to build a program that Hacker News summaries and recommendations on whether to read the articles mentioned in comments.