# Julia script.jl arg1 arg2... =\> script.exe arg1, arg2...?

**URL:** <https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193>\
**Category:** General Usage\
**Tags:** embedding\
**Created:** [July 23, 2021, 4:46pm UTC](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193 "2021-07-23T16:46:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bardo/32/21601_2.png) [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Post date:** [July 23, 2021, 4:46pm UTC](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193/1 "2021-07-23T16:46:42Z")

</div>

I wonder if the the command-line call

> julia script.jl arg1 arg2…

can be done with a compiled C-code:

> script.exe arg1 arg2…

Would this reduce start-up time/TTFP?

Looking at [Embedding Julia](https://docs.julialang.org/en/v1/manual/embedding/index.html) there is only a small example

```julia
/* run Julia commands */
jl_eval_string("print(sqrt(2.0))");

```

How to proceed? Another gap to fill.  
Google finds jl\_eval\_strings in [**jl\_exported\_funcs.inc**](https://github.com/JuliaLang/julia/blob/800aefcbc4c7f4f218816e99e36daadfefcc5f24/src/jl_exported_funcs.inc).

Is this the C-API? But where are the docs?

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [July 23, 2021, 5:32pm UTC](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193/2 "2021-07-23T17:32:37Z")

</div>

The answer is most likely no. But if you want to reduce precompilation time there is a [package compiler](https://github.com/JuliaLang/PackageCompiler.jl).

---

<div class="post-metadata">

**Author:** ![Bardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bardo/32/21601_2.png) [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Post date:** [July 23, 2021, 7:43pm UTC](https://discourse.julialang.org/t/julia-script-jl-arg1-arg2-script-exe-arg1-arg2/65193/3 "2021-07-23T19:43:11Z")

</div>

Thx @dlakelan, interesting [package](https://github.com/JuliaLang/PackageCompiler.jl) with detailed description also of its principal limitations due to how Julia works. Apparently there are two modes:

1. Creating sysimages, would be needed for every new script.jl.  
Compile time amortizes depending on actual runtime and total number of runs.

2. Creating “apps”, packing all necessary, type specialized functions into a runtime lib.  
Possibly allowing to run scripts with different code, but same data types and operations,  
would be very helpful.

> Note that to use PackageCompiler.jl effectively some knowledge on how packages and [“environments”](https://julialang.github.io/Pkg.jl/v1/environments/) work is required. If you are just starting out with Julia, it is unlikely that you would want to use PackageCompiler.jl

Definitively deserves a closer look!
