Skip to content

Commit e104c3d

Browse files
committed
Support aarch64-unknown-linux-musl
1 parent f700143 commit e104c3d

File tree

11 files changed

+53
-67
lines changed

11 files changed

+53
-67
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ env:
66

77
on:
88
push:
9-
branches:
10-
- main
119
tags:
1210
- '*'
1311

@@ -24,25 +22,15 @@ jobs:
2422
matrix:
2523
nif: ["2.16", "2.15", "2.14"]
2624
job:
27-
- target: arm-unknown-linux-gnueabihf
28-
os: ubuntu-20.04
29-
use-cross: true
30-
- target: aarch64-unknown-linux-gnu
31-
os: ubuntu-20.04
32-
use-cross: true
33-
- target: aarch64-apple-darwin
34-
os: macos-11
35-
- target: x86_64-apple-darwin
36-
os: macos-11
37-
- target: x86_64-unknown-linux-gnu
38-
os: ubuntu-20.04
39-
- target: x86_64-unknown-linux-musl
40-
os: ubuntu-20.04
41-
use-cross: true
42-
- target: x86_64-pc-windows-gnu
43-
os: windows-2019
44-
- target: x86_64-pc-windows-msvc
45-
os: windows-2019
25+
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04 , use-cross: true }
26+
- { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04 , use-cross: true }
27+
- { target: aarch64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
28+
- { target: aarch64-apple-darwin , os: macos-11 }
29+
- { target: x86_64-apple-darwin , os: macos-11 }
30+
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 }
31+
- { target: x86_64-unknown-linux-musl , os: ubuntu-20.04 , use-cross: true }
32+
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
33+
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
4634

4735
env:
4836
RUSTLER_NIF_VERSION: ${{ matrix.nif }}
@@ -89,7 +77,7 @@ jobs:
8977
if: ${{ matrix.job.use-cross }}
9078
with:
9179
binary: "cross"
92-
version: "v0.2.2"
80+
version: "v0.2.4"
9381
download_url: "https://github.com/cross-rs/cross/releases/download/${version}/cross-x86_64-unknown-linux-gnu.tar.gz"
9482
tarball_binary_path: "${binary}"
9583
smoke_test: "${binary} --version"
@@ -154,4 +142,4 @@ jobs:
154142
with:
155143
files: |
156144
${{ steps.rename.outputs.LIB_FINAL_PATH }}
157-
if: startsWith(github.ref, 'refs/tags/')
145+
if: startsWith(github.ref, 'refs/tags/')

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ jsonrs-*.tar
2727
*.so
2828

2929
native/jsonrs/target/
30+
31+
checksum-*.exs

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
## [0.2.1] - 2022-11-06
10+
### Added
11+
- Precompiled binary support for `aarch64-unknown-linux-musl`
12+
13+
### Fixed
14+
- Bump `rustler_precompiled` to 0.5.4 to avoid https://github.com/philss/rustler_precompiled/issues/38
15+
716
## [0.2.0] - 2022-08-14
817
### Added
918
- Precompiled binaries via [rustler_precompiled](https://github.com/philss/rustler_precompiled)
@@ -32,6 +41,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3241
### Changed
3342
- Support decoding strings with a nesting depth over 128
3443

35-
## [0.1.0] - 2019-11-03
44+
## 0.1.0 - 2019-11-03
3645
### Added
3746
- Initial release
47+
48+
49+
[Unreleased]: https://github.com/benhaney/Jsonrs/compare/v0.2.1...HEAD
50+
[0.2.1]: https://github.com/benhaney/Jsonrs/compare/v0.2.0...v0.2.1
51+
[0.2.0]: https://github.com/benhaney/Jsonrs/compare/v0.1.6...v0.2.0
52+
[0.1.6]: https://github.com/benhaney/Jsonrs/compare/v0.1.5...v0.1.6
53+
[0.1.5]: https://github.com/benhaney/Jsonrs/compare/v0.1.4...v0.1.5
54+
[0.1.4]: https://github.com/benhaney/Jsonrs/compare/v0.1.3...v0.1.4
55+
[0.1.3]: https://github.com/benhaney/Jsonrs/compare/v0.1.2...v0.1.3
56+
[0.1.2]: https://github.com/benhaney/Jsonrs/compare/v0.1.1...v0.1.2
57+
[0.1.1]: https://github.com/benhaney/Jsonrs/compare/v0.1.0...v0.1.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Add Jsonrs as a dependency in your `mix.exs` file.
88

99
```elixir
1010
def deps do
11-
[{:jsonrs, "~> 0.2.0"}]
11+
[{:jsonrs, "~> 0.2.1"}]
1212
end
1313
```
1414

checksum-Elixir.Jsonrs.exs

Lines changed: 0 additions & 26 deletions
This file was deleted.

lib/jsonrs.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ defmodule Jsonrs do
99
use RustlerPrecompiled, otp_app: :jsonrs,
1010
base_url: "#{source_url}/releases/download/v#{version}",
1111
force_build: System.get_env("FORCE_JSONRS_BUILD") in ["1", "true"],
12+
targets: RustlerPrecompiled.Config.default_targets() ++ ["aarch64-unknown-linux-musl"],
1213
version: version
1314

1415
@spec nif_encode!(term) :: String.t()

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Jsonrs.MixProject do
22
use Mix.Project
33

4-
@version "0.2.0"
4+
@version "0.2.1"
55

66
def project do
77
[
@@ -28,7 +28,7 @@ defmodule Jsonrs.MixProject do
2828
# Run "mix help deps" to learn about dependencies.
2929
defp deps do
3030
[
31-
{:rustler_precompiled, "~> 0.5"},
31+
{:rustler_precompiled, "~> 0.5.4"},
3232
{:rustler, "~> 0.25.0", optional: true},
3333
{:ex_doc, "~> 0.27", only: :dev, runtime: false},
3434
]

mix.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"earmark": {:hex, :earmark, "1.4.2", "3aa0bd23bc4c61cf2f1e5d752d1bb470560a6f8539974f767a38923bb20e1d7f", [:mix], [], "hexpm"},
44
"earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"},
55
"ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"},
6-
"jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"},
6+
"jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"},
77
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
88
"makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"},
99
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
1010
"nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"},
1111
"rustler": {:hex, :rustler, "0.25.0", "32526b51af7e58a740f61941bf923486ce6415a91c3934cc16c281aa201a2240", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "6b43a11a37fe79c6234d88c4102ab5dfede7a6a764dc5c7b539956cfa02f3cf4"},
12-
"rustler_precompiled": {:hex, :rustler_precompiled, "0.5.1", "93df423bd7b14b67dcacf994443d132d300623f80756974cac4febeab40af74a", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "3f8cbc8e92eef4e1a71bf441b568b868b16a3730f63f5b803c68073017e30b13"},
13-
"toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"},
12+
"rustler_precompiled": {:hex, :rustler_precompiled, "0.5.4", "34f79a8bdeeb094590b6d88a03469c90d2192c45ac10afcae2acf4f1b925b2dc", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "c5a078315c5f450281f75c0953b14535fbaaad737b85a97a2b72983f45cc30d2"},
13+
"toml": {:hex, :toml, "0.7.0", "fbcd773caa937d0c7a02c301a1feea25612720ac3fa1ccb8bfd9d30d822911de", [:mix], [], "hexpm", "0690246a2478c1defd100b0c9b89b4ea280a22be9a7b313a8a058a2408a2fa70"},
1414
}

native/jsonrs/.cargo/config

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
[target.x86_64-apple-darwin]
1+
[target.'cfg(target_os = "macos")']
22
rustflags = [
3-
"-C", "link-arg=-undefined",
4-
"-C", "link-arg=dynamic_lookup",
3+
"-C", "link-arg=-undefined",
4+
"-C", "link-arg=dynamic_lookup",
55
]
66

7-
[target.aarch64-apple-darwin]
7+
# See https://github.com/rust-lang/rust/issues/59302
8+
[target.x86_64-unknown-linux-musl]
89
rustflags = [
9-
"-C", "link-arg=-undefined",
10-
"-C", "link-arg=dynamic_lookup",
10+
"-C", "target-feature=-crt-static"
1111
]
1212

13-
# See https://github.com/rust-lang/rust/issues/59302
14-
[target.x86_64-unknown-linux-musl]
13+
[target.aarch64-unknown-linux-musl]
1514
rustflags = [
1615
"-C", "target-feature=-crt-static"
1716
]
1817

1918
[profile.release]
20-
lto = true
19+
lto = true

native/jsonrs/Cargo.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)