Skip to content

Commit

Permalink
Specify targets in RustlerPrecompiled config (#5)
Browse files Browse the repository at this point in the history
* specify targets

* syntax
  • Loading branch information
Primebrook authored Feb 7, 2025
1 parent 0dfd799 commit 128ffdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions lib/exstatic/native.ex
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
defmodule Exstatic.Native do
@moduledoc false
version = Mix.Project.config()[:version]
config = Mix.Project.config()

use RustlerPrecompiled,
otp_app: :exstatic,
crate: "exstatic",
base_url: "https://github.com/intellection/exstatic/releases/download/v#{version}",
base_url: "#{config[:source_url]}/releases/download/v#{config[:version]}",
force_build: System.get_env("EXSTATIC_BUILD") == "true",
nif_versions: ["2.16"],
version: version
version: config[:version],
targets: ~w(
aarch64-apple-darwin
x86_64-apple-darwin
aarch64-unknown-linux-gnu
x86_64-unknown-linux-gnu
)

@spec normal_pdf(float(), float(), float()) :: float()
def normal_pdf(_mean, _std_dev, _x), do: :erlang.nif_error(:nif_not_loaded)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Exstatic.MixProject do
use Mix.Project

@version "0.1.0"
@version "0.1.1"
@source_url "https://github.com/intellection/exstatic"

def project do
Expand Down

0 comments on commit 128ffdf

Please sign in to comment.