HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Monnoroch
RustJni
Rust2014–2015
Monnoroch / RustJni

RustJni

Jni lib for Rust.

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

What to know before exploring

What it is

Jni lib for 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 week3 dated mentions

Observed mentions: 2014-12-31 18:48:26 UTC to 2015-06-21 07:14:21 UTC. Weeks start Monday, UTC.

0122014-12-29 00:00:00 UTC to 2015-01-05 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 292015-01-05 00:00:00 UTC to 2015-01-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-12 00:00:00 UTC to 2015-01-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-19 00:00:00 UTC to 2015-01-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-26 00:00:00 UTC to 2015-02-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-02 00:00:00 UTC to 2015-02-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-09 00:00:00 UTC to 2015-02-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-16 00:00:00 UTC to 2015-02-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-23 00:00:00 UTC to 2015-03-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-02 00:00:00 UTC to 2015-03-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-09 00:00:00 UTC to 2015-03-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-16 00:00:00 UTC to 2015-03-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-23 00:00:00 UTC to 2015-03-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMar 232015-03-30 00:00:00 UTC to 2015-04-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-06 00:00:00 UTC to 2015-04-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-13 00:00:00 UTC to 2015-04-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-20 00:00:00 UTC to 2015-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-27 00:00:00 UTC to 2015-05-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-04 00:00:00 UTC to 2015-05-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-11 00:00:00 UTC to 2015-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-18 00:00:00 UTC to 2015-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-25 00:00:00 UTC to 2015-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-01 00:00:00 UTC to 2015-06-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-08 00:00:00 UTC to 2015-06-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-15 00:00:00 UTC to 2015-06-22 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJun 15

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
Dec 292014-12-29 00:00:00 UTC2015-01-05 00:00:00 UTC101
Jan 52015-01-05 00:00:00 UTC2015-01-12 00:00:00 UTC000
Jan 122015-01-12 00:00:00 UTC2015-01-19 00:00:00 UTC000
Jan 192015-01-19 00:00:00 UTC2015-01-26 00:00:00 UTC000
Jan 262015-01-26 00:00:00 UTC2015-02-02 00:00:00 UTC000
Feb 22015-02-02 00:00:00 UTC2015-02-09 00:00:00 UTC000
Feb 92015-02-09 00:00:00 UTC2015-02-16 00:00:00 UTC000
Feb 162015-02-16 00:00:00 UTC2015-02-23 00:00:00 UTC000
Feb 232015-02-23 00:00:00 UTC2015-03-02 00:00:00 UTC000
Mar 22015-03-02 00:00:00 UTC2015-03-09 00:00:00 UTC000
Mar 92015-03-09 00:00:00 UTC2015-03-16 00:00:00 UTC000
Mar 162015-03-16 00:00:00 UTC2015-03-23 00:00:00 UTC000
Mar 232015-03-23 00:00:00 UTC2015-03-30 00:00:00 UTC000
Mar 302015-03-30 00:00:00 UTC2015-04-06 00:00:00 UTC000
Apr 62015-04-06 00:00:00 UTC2015-04-13 00:00:00 UTC000
Apr 132015-04-13 00:00:00 UTC2015-04-20 00:00:00 UTC000
Apr 202015-04-20 00:00:00 UTC2015-04-27 00:00:00 UTC000
Apr 272015-04-27 00:00:00 UTC2015-05-04 00:00:00 UTC000
May 42015-05-04 00:00:00 UTC2015-05-11 00:00:00 UTC000
May 112015-05-11 00:00:00 UTC2015-05-18 00:00:00 UTC000
May 182015-05-18 00:00:00 UTC2015-05-25 00:00:00 UTC000
May 252015-05-25 00:00:00 UTC2015-06-01 00:00:00 UTC000
Jun 12015-06-01 00:00:00 UTC2015-06-08 00:00:00 UTC000
Jun 82015-06-08 00:00:00 UTC2015-06-15 00:00:00 UTC000
Jun 152015-06-15 00:00:00 UTC2015-06-22 00:00:00 UTC202

What Hacker News says

3 sources
> you would get a simple almost pauseless parallel GC I don't see why you think you'd do any better than HotSpot's GCs in terms of pauses. You haven't described anything any of the current three production-quality HotSpot GCs don't already do (except for concurrent copying, which Shenandoah does). They also don't use write barriers -- unless you mutate references -- and you'd need those barriers when you mutate in Clojure anyway. I just don't see where the GC you've described differs from Clojure's current GCs. Also, I'm not sure why you think Clojure data structures contain no loops except when relying on mutable references. Clojure sequences are just an interface, and it's easy to construct a lazy seq that contains loops. > my point isn't that Clojure on Rust would be faster than Clojure on JVM, it's that Rust code allows much more dete
Read the rest
rministic performance, better tools for manual optimizations But Clojure would take away from that deterministic performance and from your ability to manually optimize! Rust is a language designed to achieve good performance -- with safety -- in resource-constrained environments. You then want to take away that advantage by compiling a language that is both too wasteful for such environments and not deterministic. The JVM has its use-cases and Rust has its own, and Clojure is by far more appropriate for the JVM use-case, so I still don't see the point. For performance sensitive code in Clojure today, you drop down to Java (or Kotlin). Also, it is extremely hypothetical that you could get a higher-level, less hand-optimized language than Rust to enjoy Rust's benefits (that are bought precisely by paying for them with a more complicated language). I don't see how that could be possible with Clojure. You could, of course, create a more Lispy syntax for Rust -- with Rust semantics and a GC -- but how useful that language would be over, say, Common Lisp is unclear to me. Think of Rust as a language that makes C++ safer, not as one that makes Java faster/cheaper. Rust can't offer the same abstractions Java/JVM provide for the same low cost -- it offers the same abstractions C++ does, with much better safety. I think that mixing the two will just reduce their advantages. > which JNI isn't RustJNI is very nice[1]. Again, I don't see how you think to do better than the current Clojure runtime, which is written in C++. Sure, it might be easier to write in Rust, but the C++ code already exists, and man-centuries of effort have been put into it. Clojure's heavy reliance on interface polymorphism and garbage collection takes advantage of pretty much every optimization provided by that runtime (and more are coming! see later). > Because of Rust type system you could even isolate threads that have no access to the shared heap and not collect/pause on those - so no chance at pauses at all. If that's so important, you can do the same with real-time JVMs (RTSJ). They have zero-pause non-heap threads (in fact, they're called NoHeapRealtimeThread[2]), and they access scoped arenas (not that arenas are a good choice for Clojure, a language that tends to produce a lot of garbage even in intermediate computations). A type system is just one way of achieving this isolation, and probably the wrong way to achieve it in Clojure. Plus, Rust's arena's are either type-specific or rely on reflection. P.S. IMO, the coolest thing regarding compiling Clojure is now Truffle/Graal -- HotSpot's next-gen JIT and language-compilation platform -- that will be available for stock OpenJDK builds in Java 9. It will allow much more aggressive optimizations for Clojure code. It will also let you write the Clojure machine-code generation logic in Clojure! [1]: https://github.com/Monnoroch/RustJni/blob/master/tests/main.... [2]: http://docs.oracle.com/javase/realtime/doc_2.1/release/rtsj-...
In Rust for Clojurists
> this means you never need to scan old generation to collect the new generation Even in HotSpot you don't need to scan the old generation if references in it don't change. You only scan (roughly) those old objects who hold references that have been mutated since the last collection. > data is immutable which means copying can be done in parallel This is also possible when mutation is allowed (see Red Hat's Shenandoah[1][2], A new GC for HotSpot), and immutability doesn't make the challenge significantly easier (there is added overhead for mutation only). > mutable references are explicitly marked and isolated which means you could have a very minimal pause to update references... No need to sprinkle write barriers all over the place Again, mutating reference fields has a special barrier in HotSpot's GCs, but they're not "sprinkled all ov
Read the rest
er the place" -- they're as good as being specially marked. To summarize, current (and future) HotSpot GCs punish you for mutation, but not for the possibility of mutation; you get all the benefits of immutability automatically when you simply don't mutate references. Immutability -- as you note -- might indeed simplify the GC (though not in the case of Clojure, which does allow quite a lot of mutability -- not everywhere, but enough that you have to account for it not as an outlier), but it doesn't make it faster. ---- > for example Clojure is pretty static for a dynamically typed language and protocols map nicely to traits I wonder if you could somehow remove the dynamic typing and just have compile time type inference figure out the types (requiring explicit types when the system can't infer the types) - this would allow you to send Clojure down to LLVM along with Rust. A good JIT (like HotSpot) does this a lot better. It is true that Clojure is nowhere near as crazily-dispatched as, say Ruby, but it does rely a lot on Java-like interface-based dynamic dispatch. If your type inference is really, really good, you might be able to identify a great deal of the monomorphic call-sites, but a good JIT finds all of them and makes those calls virtually free, something an AOT compiler can never hope to achieve. Besides, HotSpot's optimizing JIT is a state-of-the-art compiler. You won't do any better with LLVM. There are approaches that are good for some languages, and others that are good for others. Language's that rely on dynamic dispatch are better off using a JIT than an AOT compiler (actually, pretty much every language would get better code generation with a JIT -- except C which hardly does any dynamic dispatch -- but a JIT has some runtime overheads in warmup, RAM and energy, and languages that don't do too much dynamic dispatch can get excellent machine code generated by an AOT compiler, so that a JIT isn't worth it). ---- In short, while you could (maybe) compile Clojure down to Rust, you'll see no benefit, and probably quite a few disadvantages to that approach. If you want Clojure-Rust interoperability, you can get it today with RustJNI[3]. [1]: http://openjdk.java.net/jeps/189 [2]: http://www.jclarity.com/2014/02/19/shenandoah-a-new-low-paus... [3]: https://github.com/Monnoroch/RustJni
In Rust for Clojurists

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.