Skip to content

Commit 5fa5f10

Browse files
authored
Merge pull request #121 from mischov/chore/update-meeseeks-html5ever
Precompile NIFs
2 parents 74f8401 + abd3b4d commit 5fa5f10

File tree

6 files changed

+67
-72
lines changed

6 files changed

+67
-72
lines changed

.github/workflows/tests.yml renamed to .github/workflows/ci.yml

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
name: tests
1+
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: ["**"]
48

59
jobs:
6-
check-elixir-formatting:
7-
name: Check Elixir formatting
10+
check-formatting:
11+
name: Check formatting
812
runs-on: ubuntu-latest
913
steps:
10-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1115

1216
- name: Set up Elixir
1317
uses: erlef/setup-beam@v1
1418
with:
15-
otp-version: '24.0'
16-
elixir-version: '1.12.0'
19+
otp-version: 25.0
20+
elixir-version: 1.14
1721

18-
- name: Check formatting
22+
- name: Check Elixir formatting
1923
run: mix format --check-formatted
2024

2125
test-elixir:
22-
name: Test with OTP ${{ matrix.otp }} and Elixir ${{ matrix.elixir }}
23-
runs-on: ubuntu-latest
26+
name: Test Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}
2427

2528
env:
2629
MIX_ENV: test
@@ -29,49 +32,29 @@ jobs:
2932
fail-fast: false
3033
matrix:
3134
include:
32-
- otp: '21.0'
33-
elixir: '1.7.0'
34-
- otp: '21.0'
35-
elixir: '1.11.0'
36-
- otp: '22.0'
37-
elixir: '1.7.0'
38-
- otp: '22.0'
39-
elixir: '1.11.0'
40-
- otp: '23.0'
41-
elixir: '1.10.3'
42-
- otp: '23.0'
43-
elixir: '1.12.0'
44-
- otp: '24.0'
45-
elixir: '1.11.4'
46-
- otp: '24.0'
47-
elixir: '1.12.0'
35+
- elixir: 1.12
36+
otp: 23
37+
- elixir: 1.13
38+
otp: 24
39+
- elixir: 1.14
40+
otp: 25
41+
42+
# TODO change this to ubuntu-latest after OTP 23 is deprecated, see
43+
# https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
44+
# for compatibility
45+
runs-on: ubuntu-20.04
4846

4947
steps:
50-
- uses: actions/checkout@v2
51-
52-
- name: Set up Rust
53-
uses: actions-rs/toolchain@v1
54-
with:
55-
toolchain: stable
56-
override: true
48+
- uses: actions/checkout@v3
5749

5850
- name: Set up Elixir
5951
uses: erlef/setup-beam@v1
6052
with:
6153
otp-version: ${{ matrix.otp }}
6254
elixir-version: ${{ matrix.elixir }}
6355

64-
- name: Retrieve cached Rust dependencies
65-
uses: actions/cache@v2
66-
id: cargo-cache
67-
with:
68-
path: ~/.cargo
69-
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-cargo-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
70-
restore-keys: |
71-
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-cargo-
72-
7356
- name: Retrieve cached Elixir dependencies
74-
uses: actions/cache@v2
57+
uses: actions/cache@v3
7558
id: mix-cache
7659
with:
7760
path: deps
@@ -80,7 +63,7 @@ jobs:
8063
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
8164
8265
- name: Retrieve cached Elixir build
83-
uses: actions/cache@v2
66+
uses: actions/cache@v3
8467
id: build-cache
8568
with:
8669
path: _build

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Unreleased
44

5+
### Compatibility
6+
7+
* No longer support Elixir versions under 1.12 or Erlang/OTP versions under 23.0
8+
* Support Elixir 1.13 and 1.14 and Erlang/OTP 25.0
9+
10+
### Enhancements
11+
12+
* Update to `meeseeks_html5ever v0.14.3`, which supports NIF precompilation
13+
514
## v0.16.1 (2021-10-20)
615

716
### Compatibility

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ end
3535

3636
## Compatibility
3737

38-
Meeseeks requires a minimum combination of Elixir 1.7.0 and Erlang/OTP 21, and has been tested with a maximum combination of Elixir 1.12.0 and Erlang/OTP 24.0.
38+
Meeseeks requires a minimum combination of Elixir 1.12.0 and Erlang/OTP 23.0, and is tested with a maximum combination of Elixir 1.14.0 and Erlang/OTP 25.0.
3939

4040
## Installation
4141

42-
Meeseeks depends on [html5ever](https://github.com/servo/html5ever) via [meeseeks_html5ever](https://github.com/mischov/meeseeks_html5ever).
42+
Meeseeks depends on the Rust library [`html5ever`](https://github.com/servo/html5ever) via [`meeseeks_html5ever`](https://github.com/mischov/meeseeks_html5ever), but because `meeseeks_html5ever` provides pre-compiled NIFs via [`rustler_precompiled`](https://github.com/philss/rustler_precompiled) **you do not need to have Rust installed** to use Meeseeks.
4343

44-
Because html5ever is a Rust library, you will need to have the Rust compiler [installed](https://www.rust-lang.org/tools/install) wherever Meeseeks is compiled.
45-
46-
Ensure Rust is installed, then add Meeseeks to your `mix.exs`:
44+
To install Meeseeks, add it to your `mix.exs`:
4745

4846
```elixir
4947
defp deps do
@@ -53,7 +51,11 @@ defp deps do
5351
end
5452
```
5553

56-
Finally, run `mix deps.get`.
54+
Then run `mix deps.get`.
55+
56+
### Force Compilation
57+
58+
If you need to force compilation of the Rust NIF for some reason, see the instructions [here](https://github.com/mischov/meeseeks_html5ever#dependencies).
5759

5860
## Getting Started
5961

config/config.exs

Lines changed: 0 additions & 1 deletion
This file was deleted.

mix.exs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,16 @@ defmodule Meeseeks.Mixfile do
3232

3333
defp deps do
3434
[
35-
{:meeseeks_html5ever, "~> 0.13.1"},
35+
{:meeseeks_html5ever, "~> 0.14.3"},
3636

37-
# dev
37+
# Dev
3838
{:dialyxir, "~> 0.5", only: :dev, runtime: false},
3939

40-
# docs
40+
# Docs
4141
{:ex_doc, "~> 0.24.0", only: :docs, runtime: false}
4242
]
4343
end
4444

45-
defp package do
46-
[
47-
maintainers: ["Mischov"],
48-
licenses: ["MIT"],
49-
files: [
50-
"lib",
51-
"src/*.xrl",
52-
"src/*.yrl",
53-
"mix.exs",
54-
"README.md",
55-
"LICENSE",
56-
"LICENSE-APACHE"
57-
],
58-
links: %{"GitHub" => @source_url}
59-
]
60-
end
61-
6245
defp docs do
6346
[
6447
markdown_processor: ExDoc.Markdown.Meeseeks,
@@ -81,4 +64,21 @@ defmodule Meeseeks.Mixfile do
8164
]
8265
]
8366
end
67+
68+
defp package do
69+
[
70+
maintainers: ["Mischov"],
71+
licenses: ["MIT"],
72+
files: [
73+
"lib",
74+
"src/*.xrl",
75+
"src/*.yrl",
76+
"mix.exs",
77+
"README.md",
78+
"LICENSE",
79+
"LICENSE-APACHE"
80+
],
81+
links: %{"GitHub" => @source_url}
82+
]
83+
end
8484
end

mix.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
%{
22
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"},
3+
"castore": {:hex, :castore, "1.0.1", "240b9edb4e9e94f8f56ab39d8d2d0a57f49e46c56aced8f873892df8ff64ff5a", [:mix], [], "hexpm", "b4951de93c224d44fac71614beabd88b71932d0b1dea80d2f80fb9044e01bbb3"},
34
"credo": {:hex, :credo, "0.6.1", "a941e2591bd2bd2055dc92b810c174650b40b8290459c89a835af9d59ac4a5f8", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm"},
45
"dialyxir": {:hex, :dialyxir, "0.5.0", "5bc543f9c28ecd51b99cc1a685a3c2a1a93216990347f259406a910cf048d1d7", [:mix], [], "hexpm", "7c5c6c1eceb93e26a06c36148cb6f8021ae6f4f9a07bb1ae95f588e0a01ea8e1"},
56
"earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm", "8cf8a291ebf1c7b9539e3cddb19e9cef066c2441b1640f13c34c1d3cfc825fec"},
@@ -11,8 +12,9 @@
1112
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
1213
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
1314
"markdown": {:git, "https://github.com/devinus/markdown.git", "d065dbcc4e242a85ca2516fdadd0082712871fd8", []},
14-
"meeseeks_html5ever": {:hex, :meeseeks_html5ever, "0.13.1", "31f6b743b3dd15587a5f74804a14737fa3297ac57cb366bfeda507e003f6b61f", [:mix], [{:rustler, "~> 0.22.0", [hex: :rustler, repo: "hexpm", optional: false]}], "hexpm", "c2689ff90d0a5b345e85a163c20110545978e22aa66348e178fb0cce0efa16d7"},
15+
"meeseeks_html5ever": {:hex, :meeseeks_html5ever, "0.14.3", "7827c6ce393d9f99dd0220c356fd66ee7101718037ec6f7f18d4bcba84ef1798", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.6.1", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "6b69573b97120fcc6e97045178ad085fd3ee10a5b49c1e9ebb8a28bd4a9c538b"},
1516
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
1617
"rustler": {:hex, :rustler, "0.22.2", "f92d6dba71bef6fe5f0d955649cb071127adc92f32a78890e8fa9939e59a1b41", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.5.2", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "56b129141e86d60a2d670af9a2b55a9071e10933ef593034565af77e84655118"},
18+
"rustler_precompiled": {:hex, :rustler_precompiled, "0.6.1", "160b545bce8bf9a3f1b436b2c10f53574036a0db628e40f393328cbbe593602f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "0dd269fa261c4e3df290b12031c575fff07a542749f7b0e8b744d72d66c43600"},
1719
"toml": {:hex, :toml, "0.5.2", "e471388a8726d1ce51a6b32f864b8228a1eb8edc907a0edf2bb50eab9321b526", [:mix], [], "hexpm", "f1e3dabef71fb510d015fad18c0e05e7c57281001141504c6b69d94e99750a07"},
1820
}

0 commit comments

Comments
 (0)