Skip to content

Commit 487e0a6

Browse files
committed
Add Rust artifacts
1 parent ee8d2f3 commit 487e0a6

34 files changed

+1885
-0
lines changed

lib/rust_nif.ex

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmodule AdventOfCode.RustNif do
2+
@moduledoc """
3+
Module to list all NIFs used from Rust
4+
"""
5+
use Rustler,
6+
otp_app: :advent_of_code,
7+
crate: :aoc
8+
9+
def solve(_year, _day), do: :erlang.nif_error(:nif_not_loaded)
10+
end

native/aoc/.cargo/config.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[target.'cfg(target_os = "macos")']
2+
rustflags = [
3+
"-C", "link-arg=-undefined",
4+
"-C", "link-arg=dynamic_lookup",
5+
]

native/aoc/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

native/aoc/Cargo.lock

+353
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/aoc/Cargo.toml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "aoc"
3+
version = "0.1.0"
4+
authors = []
5+
edition = "2021"
6+
7+
[lib]
8+
name = "aoc"
9+
path = "src/lib.rs"
10+
crate-type = ["cdylib"]
11+
12+
[dependencies]
13+
rustler = "0.34.0"
14+
itertools = "0.13.0"
15+
clap = { version = "4.5.11", features = ["derive"] }

0 commit comments

Comments
 (0)