HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
tshort
StaticCompiler.jl
Julia2021–2025
tshort / StaticCompiler.jl

StaticCompiler.jl

Compiles Julia code to a standalone library (experimental)

12Distinct people
19Mentions
0Explicit recommenders
560GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Compiles Julia code to a standalone library (experimental)

GitHub

Where it is used

No documented product use was verified in the last source check.

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

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 6:36:16 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 year19 dated mentions

Observed mentions: 2021-03-25 21:35:42 UTC to 2025-11-27 06:00:44 UTC.

02462021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20232024-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
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC707
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
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

5 sources
Yeah, not frowned upon at all. StaticCompiler.jl [1] has made huge strides in the past few weeks actually thanks to Mason and Valentin (swapping in GPUCompiler as the backend); you can even compile to a tiny standalone binary without linking to the runtime if you're willing to use some tricks e.g. [2] to avoid GC allocations (stack allocations and manual heap allocations are both fine): # This is all StaticCompiler-friendly using StaticTools function print_args(argc::Int, argv::Ptr{Ptr{UInt8}}) # c"..." lets you construct statically-sized, stack allocated `StaticString`s # We also have m"..." and MallocString if you want the same thing but on the heap printf(c"Argument count is %d:\n", argc) for i=1:argc # iᵗʰ input argument string pᵢ = unsafe_load(argv, i) # Get pointer
Read the rest
strᵢ = MallocString(pᵢ) # Can wrap to get high-level interface println(strᵢ) # No need to `free` since we didn't allocate this memory end println(c"That was fun, see you next time!") return 0 end # Compile executable using StaticCompiler # `] add https://github.com/tshort/StaticCompiler.jl` to get latest master filepath = compile_executable(print_args, (Int64, Ptr{Ptr{UInt8}}), "./") yielding: shell> ./print_args 1 2 3 4 5.0 foo Argument count is 7: ./print_args 1 2 3 4 5.0 foo That was fun, see you next time! shell> hyperfine './print_args hello there' Benchmark 1: ./print_args hello there Time (mean ± σ): 2.2 ms ± 0.5 ms [User: 0.8 ms, System: 0.0 ms] Range (min … max): 1.5 ms … 5.5 ms 564 runs Warning: Command took less than 5 ms to complete. Results might be inaccurate. shell> ls -lh print_args -rwxr-xr-x 1 user staff 8.5K Feb 10 02:36 print_args GC allocations are allowed if you use instead the approach in this PR [3], but we haven't wrangled that approach to produce standalone binaries yet. [1] https://github.com/tshort/StaticCompiler.jl [2] https://github.com/brenhinkeller/StaticTools.jl [3] https://github.com/tshort/StaticCompiler.jl/pull/58
In Why We Use Julia, 10 Years Later
And the "how" behind Octavian.jl is basically LoopVectorization.jl [1], which helps make optimal use of your CPU's SIMD instructions. Currently there can some nontrivial compilation latency with this approach, but since LV ultimately emits custom LLVM it's actually perfectly compatible with StaticCompiler.jl [2] following Mason's rewrite, so stay tuned on that front. [1] https://github.com/JuliaSIMD/LoopVectorization.jl [2] https://github.com/tshort/StaticCompiler.jl
In Why We Use Julia, 10 Years Later
Yeah, it's definitely in the early stages still, but this time I think there's much more infrastructure, and more people around with the right knowledge to advise on StaticCompiler's development, that I'm currently feeling pretty good about it's future. Here's the feature roadmap https://github.com/tshort/StaticCompiler.jl/issues/59 that should help people understand what currently works and what I think I can reasonably accomplish eventually
In Why We Use Julia, 10 Years Later

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.