How to use juliac.jl?

With the latest commit

the simple hello world is

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.

# 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:

# 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
7 Likes

(post deleted by author)

Thanks, this works!

ufechner@ufryzen:~/repos/juliac$ ls -lah
total 1,6M
drwxrwxr-x   2 ufechner ufechner 4,0K mei 23 11:59 .
drwxrwxr-x 118 ufechner ufechner 4,0K mei 23 11:50 ..
-rwxrwxr-x   1 ufechner ufechner 1,6M mei 23 11:59 hello
-rw-rw-r--   1 ufechner ufechner   97 mei 23 11:57 hello.jl
-rw-rw-r--   1 ufechner ufechner  12K mei 23 11:59 juliac-buildscript.jl
-rw-rw-r--   1 ufechner ufechner 5,5K mei 23 11:59 juliac.jl
-rw-rw-r--   1 ufechner ufechner 4,0K mei 23 11:59 julia-config.jl
2 Likes