# PackageCompiler - reduce system image

**URL:** <https://discourse.julialang.org/t/packagecompiler-reduce-system-image/97952>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [April 26, 2023, 2:48pm UTC](https://discourse.julialang.org/t/packagecompiler-reduce-system-image/97952 "2023-04-26T14:48:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [April 26, 2023, 3:23pm UTC](https://discourse.julialang.org/t/packagecompiler-reduce-system-image/97952/2 "2023-04-26T15:23:15Z")

</div>

Strip metadata/ir: see

> [@Code obfuscation | Using the \`--strip-ir\` option in PackageCompiler.jl](https://discourse.julialang.org/t/code-obfuscation-using-the-strip-ir-option-in-packagecompiler-jl/91426):
>
> I would like to distribute my package while hiding the source code. I came across PackageCompiler.jl and julia’s --strip-ir option to help, but when I load a sysimage generated using that option, I get an error that some source code is not available. Here is an example on a simple package with detailed steps: I have a module SimplePkg: module SimplePkg export nodoc nodoc(x) = sin(sqrt(x)) """ Returns sin(sqrt(x)) """ withdoc(x) = nodoc(x) end # module and a script “scratch.jl” that uses t…

strip standard libraries: see PackageCompiler docs here:

> **[References · PackageCompiler](https://julialang.github.io/PackageCompiler.jl/dev/refs.html#PackageCompiler.create_sysimage)**
>
> Documentation for PackageCompiler.

(in particular:

> `filter_stdlibs::Bool`: If `true`, only include stdlibs that are in the project file. Defaults to `false`, only set to `true` if you know the potential pitfalls.

)

---

_[View the full topic](https://discourse.julialang.org/t/packagecompiler-reduce-system-image/97952)._
