HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Jaysmito101
rusty.hpp
C++2024–2024
Jaysmito101 / rusty.hpp

rusty.hpp

Rust-like Traits & A Borrow Checker and Memory Ownership System for C++20 (heavily inspired from Rust)

2Distinct people
2Mentions
0Explicit recommenders
247GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Rust-like Traits & A Borrow Checker and Memory Ownership System for C++20 (heavily inspired from Rust)

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

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, 3:56:07 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 month2 dated mentions

Observed mentions: 2024-05-05 07:38:47 UTC to 2024-12-11 18:47:52 UTC.

012024-05-01 00:00:00 UTC to 2024-06-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsMay 20242024-06-01 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-01 00:00:00 UTC to 2024-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-01 00:00:00 UTC to 2024-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 20242024-09-01 00:00:00 UTC to 2024-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-01 00:00:00 UTC to 2024-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsDec 2024

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
May 20242024-05-01 00:00:00 UTC2024-06-01 00:00:00 UTC110
Jun 20242024-06-01 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 20242024-07-01 00:00:00 UTC2024-08-01 00:00:00 UTC000
Aug 20242024-08-01 00:00:00 UTC2024-09-01 00:00:00 UTC000
Sep 20242024-09-01 00:00:00 UTC2024-10-01 00:00:00 UTC000
Oct 20242024-10-01 00:00:00 UTC2024-11-01 00:00:00 UTC000
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC000
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC110

What Hacker News says

2 sources
jmax01·Dec 11, 2024Submission

Implementing Rust-like traits for C++ 20 (with no runtime overhead)

Example Code: struct Shape { void draw(); int area(int x, int y); }; make_trait(Shape, draw, area); int main() { auto circle = Circle(); auto square = Square(); // NOTE: all of this is strictly checked, so if you are creating // a trait out of a Object, the object MUST implement all the trait functions auto t0 = trait<Shape>::make(&circle); t0.draw(); auto t1 = trait<Shape>::make(&square); t1.draw(); // Another thing to be kept in mind is trait<T> is just like a View // It DOES NOT OWN anything, so you are the one making sure the data // pointer is valid auto array = std::array{t1, t0}; for (auto& shape : array) { std::cout << shape.area(2, 3) << std::endl; } } Repository: github.com/Jaysmito101/rusty.hpp?tab=readme-ov-file#traits-in-c
3 points · Open discussion

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.