HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
janestreet
hardcaml
OCaml2018–2025
janestreet / hardcaml

hardcaml

Hardcaml is an OCaml library for designing hardware.

9Distinct people
9Mentions
1Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Hardcaml is an OCaml library for designing hardware.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

Sorry hardcaml and amaranth were my examples of things with baked in sim features. Also great work with spade. I love to hate, but the hardware industry needs folks like you…

polalavik used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2018-09-30 16:41:17 UTC to 2025-05-12 21:56:43 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202

What Hacker News says

9 sources
polalavik·May 12, 2025Recommendation phrase
Sorry hardcaml and amaranth were my examples of things with baked in sim features. Also great work with spade. I love to hate, but the hardware industry needs folks like you pushing it forward. I just fear most people are making toys or focusing a ton of effort on the wrong issues (how to write HDL in a different way) instead of solving industry issues like verification, wrangling hand written modules with enormous I/O, stitching IP together, targeting real FPGAs, auto generating memory maps, etc. some of that is a tough solve because it’s proprietary. [1] https://github.com/janestreet/hardcaml/blob/master/docs/wave...
In Spade Hardware Description Language
title: Accelerating zk-SNARKs - MSM and NTT algorithms on FPGAs with Hardcaml Any reason the title deviates so much from original? Is it because of all the cool acronyms and code words? Here's a decoder: zk-SNARK: zero-knowledge Succinct Non-Interactive Argument of Knowledge MSM: Multi-Scalar Multiplication Hardcaml: OCaml lib for hardware: https://github.com/janestreet/hardcaml NTT: Number Theoretic Transform
In Accelerating zk-SNARKs - MSM and NTT algorithms on FPGAs with Hardcaml
Hi, blog post author here. Thank you so much for your insights and responses to my Verilog critiques! I should note that my impressions of Verilog come from one semester of an intro course taught using the Vivado toolchain, so there's a fair bit I don't know. My post is not an expert analysis of Verilog as much as a summary of beginner impressions from basic coursework and online research. I'm sure that enterprise setups probably have better tooling and systems in place to ease development. A few things in response to specific comments: >> Oh, and there's no syntax error highlighting in VSCode's Verilog extensions either. > This is not true. From what I recall, the ones I tried didn't catch all errors, and the errors they displayed were limited to basic syntax stuff, not any implementation issues / warnings. > Synthesis is notorious for b
Read the rest
arfing out thousands of warnings even on simple designs. That's a very good point. Our development process was mostly a code-simulate loop, with synthesis only run when submitting each phase of the project. > Did they misspell it such that it looked like another declared signal? That would be less embarrassing. This one was just a minor typo, but because we didn't see any warnings during simulation, it took a while to track down the root cause. > You might expect that to be an error, but it's called a "wired-OR." That makes sense, but it feels like something that should be done by the synthesis process as an optimization, or annotated with a special operator if the engineer needs direct control over it. > But the semantics get clunky. I would think that is where OCaml or Chisel or others would be interesting. > You can put all the functions/tasks you want in that module. Coming from a software background, the testing strategies available in Verilog seem very clunky and overly verbose. In comparison, Hardcaml's ASCII waveform expect-test solution feels extremely elegant and simple: https://blog.janestreet.com/using-ascii-waveforms-to-test-ha.... > And all of my development and that of my team happens through gitlab-CI. That's probably more of a gap in my education than a fault of the ecosystem then. --- Among other qualities, I prefer languages that let fewer mistakes slip through, and allow the developer to focus on the system they intend to build rather than avoiding bugs/misunderstandings that would be easy to catch otherwise. You bring up a lot of really good points, and I suspect that if we were doing Verilog "the right way", we would have probably run into fewer issues. But at the end of the day, developing in Hardcaml was a much more ergonomic experience: testing was straightforward, most "stupid mistakes" were impossible, setup was pretty easy, and the library provided a lot of really useful abstractions. For example, Hardcaml interfaces make it easy to represent practically any data structure that can be serialized to/from a bit vector, and the Always API allows for some pretty interesting non-trivial functional logic. https://github.com/janestreet/hardcaml/blob/master/docs/hard... https://github.com/janestreet/hardcaml/blob/master/docs/enum... https://github.com/janestreet/hardcaml/blob/master/docs/stat...
In Designing a MIPS CPU in Hardcaml

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.