Skip to content

Instantly share code, notes, and snippets.

@fguevaravas
fguevaravas / MinimalBuild.jl
Created November 28, 2017 14:44
Minimal Julia Compilation
## Better way for creating standalone EXE files using Julia,
## Taken from: https://github.com/JuliaComputing/static-julia
## Assumptions:
## 1. g++ / x86_64-w64-mingw32-gcc is available and is in path
## 2. patchelf is in the path
module MinimalBuild
# Assumption: the application main module is in MyApplication.jl
# this module must export a function called julia_main that is ccallable
appname = "MyApplication"
@fguevaravas
fguevaravas / MyModule.jl
Created June 28, 2017 16:35
How to improve ArgParse.jl launch speed
__precompile__()
module MyModule
using ArgParse
export main
s = ArgParseSettings()
@add_arg_table s begin # this takes 1.5s!
"--areamin", "-n"
help = "Minimum area (km^2)"
default = 0.0