# How to use juliac.jl?

**URL:** <https://discourse.julialang.org/t/how-to-use-juliac-jl/123024>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 24, 2024, 7:31pm UTC](https://discourse.julialang.org/t/how-to-use-juliac-jl/123024 "2024-11-24T19:31:03Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![jbytecode](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbytecode/32/17719_2.png) [@jbytecode](https://discourse.julialang.org/u/jbytecode)\
**Post date:** [May 23, 2025, 9:33am UTC](https://discourse.julialang.org/t/how-to-use-juliac-jl/123024/21 "2025-05-23T09:33:28Z")

</div>

With the latest commit

> <https://github.com/JuliaLang/julia/commit/d9c8c42ad3fc54fa20f56886ad133a0c02729c7a>
>
> Use at-main mechanism in juliac executables. Also add support for command line a…rguments.
> 
> I changed \`Core.ARGS\` from a \`Vector{Any}\` to a \`Vector{String}\`. I
> don't know why we didn't do that years ago. Surely this is ok?

the simple hello world is

```julia
function (@main)(args::Vector{String})::Cint
	println(Core.stdout, "Hello, world!")
	return 0
end

```

In that use, no module is needed and the `args` argument is passed as a Vector of strings rather than a Vector of Any.

```shell
# julia +nightly juliac.jl --experimental --output-exe hello --trim hello.jl

```

is required to compile a `hello` executable.

Note: Required files should be install manually. This would help:

```shell
# wget -nc https://raw.githubusercontent.com/JuliaLang/julia/refs/heads/master/contrib/juliac.jl
# wget -nc https://raw.githubusercontent.com/JuliaLang/julia/refs/heads/master/contrib/juliac-buildscript.jl
# wget -nc https://raw.githubusercontent.com/JuliaLang/julia/refs/heads/master/contrib/julia-config.jl

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-use-juliac-jl/123024)._
