# PackageCompiler.jl how to specify ARGS for create\_app?

**URL:** <https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405>\
**Category:** General Usage\
**Created:** [July 24, 2024, 4:23am UTC](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405 "2024-07-24T04:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Post date:** [July 24, 2024, 4:23am UTC](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405/1 "2024-07-24T04:23:23Z")

</div>

Method type signatures generally depend on command ARGS which get passed to entry point eg julia\_main(). Shouldn’t create\_app let us specify a list of example ARGS that it can execute and compile against?

---

<div class="post-metadata">

**Author:** ![jsjie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jsjie/32/22477_2.png) [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Post date:** [July 24, 2024, 6:16am UTC](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405/2 "2024-07-24T06:16:04Z")

</div>

Not quite sure what do you mean, but what I do in my project is like the following.  
We know that `create_app` accept an argument `precompile_execution_file`, and I write the file like that:

```julia
old_ARGS = copy(ARGS)
empty!(ARGS)

# set some ARGS
julia_main()

# set another ARGS
julia_main()

# and so on

empty!(ARGS)
for i = 1 : length(old_ARGS)
    push!(ARGS, old_ARGS[i])
end
```

---

<div class="post-metadata">

**Author:** ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)\
**Post date:** [July 25, 2024, 3:52am UTC](https://discourse.julialang.org/t/packagecompiler-jl-how-to-specify-args-for-create-app/117405/3 "2024-07-25T03:52:04Z")

</div>

Thanks for your help! Made me look at the PackageCompiler example folder which uses similar technique
