# How to build closed-source julia package?

**URL:** <https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985>\
**Category:** General Usage\
**Tags:** question, package, sysimage\
**Created:** [February 23, 2022, 5:31pm UTC](https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985 "2022-02-23T17:31:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carol](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carol/32/8140_2.png) [@Carol](https://discourse.julialang.org/u/Carol)\
**Post date:** [February 23, 2022, 5:31pm UTC](https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985/1 "2022-02-23T17:31:54Z")

</div>

Hi all,

I developed a Julia package locally, and I want to make it closed-source to protect the source code.

I’m new to creating a closed-source package, and I want to ask whether creating a sysimage by [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/stable/index.html) is the correct way to make closed-source package? It seems the advantage of sysimage is to reduce the latency, not sure whether the sysimage can protect the source code.

Sorry I really have no experience on it, please feel free to share experience with me!

Thank you so much!  
Carol

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 23, 2022, 5:58pm UTC](https://discourse.julialang.org/t/how-to-build-closed-source-julia-package/76985/2 "2022-02-23T17:58:00Z")

</div>

See

> [@Julia program obfuscation for commercial code](https://discourse.julialang.org/t/julia-program-obfuscation-for-commercial-code/75174):
>
> Hi there, I thought I rather not revive the 2 year old thread [here](https://discourse.julialang.org/t/commercial-codes-using-julia-code-obfuscation/12429/2) on the topic. I just wanted to share the solution which works for us. In our case, the julia code is called from a C/C++ program, so the simplest way I found to obfuscate the code is to simply encrypt the file. Basically the process goes a bit like this (I could share sample code if people are interested): Writing your software Write your julia program or module like you normally would and save the file as “.jl” Encrypt the …

and this older discussion

> [@Commercial codes using Julia - code obfuscation?](https://discourse.julialang.org/t/commercial-codes-using-julia-code-obfuscation/12429):
>
> Forking from the discussion on static compilation in Julia. One of the arguments for static compilation seems to be the commercial code and obfuscation argument. When shipping a commerical and paid for code the company does not want its work to be easily pirated. But that has changed with open source. I am familar with systems installation, systems management and installing both open source and commercial compiled codes. I worked for one company who had venture capital, and I was told they …
