Skip to content

Commit

Permalink
Merge branch 'rusterlium:master' into dynamic-load_data
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaboaye authored Dec 29, 2021
2 parents 4636a09 + 6fbaf63 commit 83bc935
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 38 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
- name: Install Erlang/Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: 22.1.3
elixir-version: 1.9.2
otp-version: "22.3.4"
elixir-version: "1.11.4"

- name: Check cargo fmt
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
- name: Install Erlang/Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: 22.x
elixir-version: 1.6
otp-version: "24.1.7"
elixir-version: 1.13

- name: Test rustler_mix
working-directory: rustler_mix
Expand Down Expand Up @@ -140,26 +140,13 @@ jobs:
strategy:
matrix:
pair:
- erlang: "24.0"
elixir: "1.12.2"
- erlang: "24.0"
elixir: "1.11.4"
- erlang: "23.3"
elixir: "1.11.4"

- erlang: "23.0.3"
elixir: "1.10.3"

- erlang: 22.x
elixir: "1.10.1"
- erlang: 22.x
elixir: 1.9
- erlang: 22.x
elixir: 1.8
- erlang: 22.x
elixir: 1.7
- erlang: 22.x
elixir: 1.6
- { erlang: "24.1.7", elixir: "1.13.0" }
- { erlang: "24.1.7", elixir: "1.12.3" }
- { erlang: "24.1.7", elixir: "1.11.4" }

- { erlang: "23.3.4", elixir: "1.11.4" }

- { erlang: "22.3.4", elixir: "1.11.4" }

rust:
- stable
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

See [`UPGRADE.md`](./UPGRADE.md) for additional help when upgrading to newer versions.

## [Unreleased]
## [0.23.0] - 2021-12-22

### Added

- `NifException` for using Elixir exception structs
- Hashing for term
- Hash and Equality for `Binary` and `OwnedBinary`

### Changed

- Rustler changed its supported range of OTP and Elixir versions. We aim to support the three newest versions of OTP and Elixir.
- The decoder for `Range` requires that `:step` equals `1`. The `:step` field was introduced with
Elixir v1.12 and cannot be represented with Rust's `RangeInclusive`.
- NIF API bindings are generated using Rust

## Fixed

- `mix rustler.new` with Elixir v1.13
- Template config for `macos`
- Crash if metadata cannot be retrieved while compiling (#398)

## [0.22.2] - 2021-10-07

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rustler::init!("Elixir.Math", [add]);

#### Supported OTP and Elixir Versions

Rustler aims to support the newest three OTP versions as well as Elixir versions capable of running the supported versions of OTP.
Rustler aims to support the newest three major OTP versions as well as newest three minor Elixir versions.

#### Supported NIF version

Expand Down
4 changes: 2 additions & 2 deletions rustler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustler"
description = "Safe Rust wrappers for creating Erlang NIF functions"
repository = "https://github.com/rusterlium/rustler"
version = "0.22.2" # rustler version
version = "0.23.0" # rustler version
authors = ["Hansihe <me@hansihe.com>"]
license = "MIT/Apache-2.0"
readme = "../README.md"
Expand All @@ -15,7 +15,7 @@ alternative_nif_init_name = []

[dependencies]
lazy_static = "1.4"
rustler_codegen = { path = "../rustler_codegen", version = "0.22.2", optional = true}
rustler_codegen = { path = "../rustler_codegen", version = "0.23.0", optional = true}
rustler_sys = { path = "../rustler_sys", version = "~2.1" }

[package.metadata.release]
Expand Down
2 changes: 1 addition & 1 deletion rustler_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustler_codegen"
description = "Compiler plugin for Rustler"
repository = "https://github.com/rusterlium/rustler/tree/master/rustler_codegen"
version = "0.22.2" # rustler_codegen version
version = "0.23.0" # rustler_codegen version
authors = ["Hansihe <hansihe@hansihe.com>"]
license = "MIT/Apache-2.0"
readme = "../README.md"
Expand Down
2 changes: 1 addition & 1 deletion rustler_mix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This package is available on [Hex.pm](https://hex.pm/packages/rustler). To insta
```elixir
def deps do
[
{:rustler, "~> 0.22.2"}
{:rustler, "~> 0.23.0"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion rustler_mix/lib/mix/tasks/rustler.new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defmodule Mix.Tasks.Rustler.New do
end
end

@switches [:module, :name, :otp_app]
@switches [module: :string, name: :string, otp_app: :string]

def run(argv) do
{opts, _argv, _} = OptionParser.parse(argv, switches: @switches)
Expand Down
2 changes: 1 addition & 1 deletion rustler_mix/lib/rustler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ defmodule Rustler do
end

@doc false
def rustler_version, do: "0.22.2"
def rustler_version, do: "0.23.0"

@doc """
Supported NIF API versions.
Expand Down
4 changes: 2 additions & 2 deletions rustler_mix/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ defmodule Rustler.Mixfile do
use Mix.Project

@source_url "https://github.com/rusterlium/rustler"
@version "0.22.2"
@version "0.23.0"

def project do
[
app: :rustler,
name: "Rustler",
version: @version,
elixir: "~> 1.6",
elixir: "~> 1.11",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down
2 changes: 1 addition & 1 deletion rustler_mix/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule TestRustlerMix.MixProject do
[
app: :test_rustler_mix,
version: "0.1.0",
elixir: "~> 1.6",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
2 changes: 1 addition & 1 deletion rustler_tests/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule RustlerTest.Mixfile do
[
app: :rustler_test,
version: "0.0.1",
elixir: "~> 1.2",
elixir: "~> 1.11",
compilers: [:rustler] ++ Mix.compilers(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
Expand Down
4 changes: 2 additions & 2 deletions rustler_tests/test/binary_example_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ defmodule BinaryExampleTest do
assert_exists(name, :os.type())
end

defp assert_exists(name, {:win32, _} = type) do
defp assert_exists(name, {:win32, _} = _type) do
assert File.exists?("priv/native/#{name}.exe")
end

defp assert_exists(name, type) do
defp assert_exists(name, _type) do
assert File.exists?("priv/native/#{name}")
end
end

0 comments on commit 83bc935

Please sign in to comment.