Skip to content

Commit

Permalink
Merge pull request #145 from Juice-jl/f-precompile
Browse files Browse the repository at this point in the history
Enable package precompilation
  • Loading branch information
guyvdbroeck authored May 29, 2023
2 parents 3be585f + 96f74b3 commit d7f8f60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
IRTools = "7869d1d1-7146-5819-86e3-90919afe41df"
Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"

[compat]
CUDD = "0.3"
Expand All @@ -22,4 +23,5 @@ Graphs = "1"
IRTools = "0.4.7"
Jive = "0.2"
MacroTools = "0.5"
julia = "1.8"
PrecompileTools = "1"
julia = "1.8,1.9"
11 changes: 10 additions & 1 deletion src/Dice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module Dice
##################################

using MacroTools: prewalk, postwalk
using PrecompileTools

export @dice_ite

Expand Down Expand Up @@ -38,4 +39,12 @@ include("dsl.jl")
include("plot.jl")
include("util.jl")

end # module
# add precompile statements here - keep it lightweight for main features
@compile_workload begin
code = @dice begin
if flip(0.5) true else flip(0.1) end
end
pr(code)
end

end # module

0 comments on commit d7f8f60

Please sign in to comment.