From bb60c0a15663364ae7ad6842c939473e83bb6860 Mon Sep 17 00:00:00 2001 From: Adrian Kumpf Date: Wed, 16 May 2018 21:58:18 +0200 Subject: [PATCH] Update `arb` to v0.2.1 --- Dockerfile | 4 ++-- README.md | 9 ++++++--- mix.exs | 2 +- native/arb/Cargo.lock | 32 ++++++++++++++++---------------- native/arb/Cargo.toml | 4 ++-- native/arb/src/lib.rs | 5 +---- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65ffd6e..ac7702b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM erlang:20.3 -ENV ELIXIR_VERSION="v1.6.4" \ - RUST_VERSION="1.25.0" \ +ENV ELIXIR_VERSION="v1.6.5" \ + RUST_VERSION="1.26.0" \ LANG="C.UTF-8" \ MIX_ENV="prod" \ HOME=/opt/app diff --git a/README.md b/README.md index 59f8709..72d9a8c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # arb-ex -An Elixir NIF for controlling the ABACOM CH341A relay board ([documentation](https://hexdocs.pm/arb)). +An Elixir NIF for controlling the ABACOM CH341A relay board +([documentation](https://hexdocs.pm/arb)). ## Getting started ### Requirements -In order to compile a recent version of `rust` must be installed (tested with 1.25). Also, the native [libusb](https://github.com/libusb/libusb) library is required. On Debian-based distributions install `libusb-1.0-0-dev`. +In order to compile at least version 1.26 of `rust` must be installed. Also, +the native [libusb](https://github.com/libusb/libusb) library is required (e.g +`libusb-1.0-0-dev` on Debian-based distributions). ### Installation @@ -15,7 +18,7 @@ Add `:arb` to your list of dependencies: ```elixir def deps do [ - {:arb, "~> 0.2.0"} + {:arb, "~> 0.2.1"} ] end ``` diff --git a/mix.exs b/mix.exs index b196ee1..5461a1e 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Arb.MixProject do def project do [ app: :arb, - version: "0.2.0", + version: "0.2.1", elixir: "~> 1.6", start_permanent: Mix.env() == :prod, compilers: [:rustler] ++ Mix.compilers(), diff --git a/native/arb/Cargo.lock b/native/arb/Cargo.lock index 7f434a3..95758f9 100644 --- a/native/arb/Cargo.lock +++ b/native/arb/Cargo.lock @@ -2,16 +2,16 @@ name = "arb" version = "0.1.0" dependencies = [ - "arb 0.2.0 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.0)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "arb 0.2.1 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.1)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustler 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustler_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arb" -version = "0.2.0" -source = "git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.0#78d4eb5b67a57067817270257bd91213e4ef04b5" +version = "0.2.1" +source = "git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.1#4f6a1190cd971cac6574432a6f4fa837a3575301" dependencies = [ "libusb 0.3.0 (git+https://github.com/adriankumpf/libusb-rs?branch=dev)", ] @@ -21,12 +21,12 @@ name = "bit-set" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-vec" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -42,7 +42,7 @@ name = "heck" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "0.2.11" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -76,12 +76,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -128,7 +128,7 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -150,23 +150,23 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum arb 0.2.0 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.0)" = "" +"checksum arb 0.2.1 (git+https://github.com/adriankumpf/abacom-relay-board?tag=v0.2.1)" = "" "checksum bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e6e1e6fb1c9e3d6fcdec57216a74eaa03e41f52a22f13a16438251d8e88b89da" -"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" +"checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" "checksum erlang_nif-sys 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2804cb6ae339787d993faafdd5e4af5a882128e44343a710d1061c487086eaa3" "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82" "checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" +"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" "checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" "checksum libusb 0.3.0 (git+https://github.com/adriankumpf/libusb-rs?branch=dev)" = "" "checksum libusb-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c53b6582563d64ad3e692f54ef95239c3ea8069e82c9eb70ca948869a7ad767" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +"checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum rustler 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "346b8e397f17bc25a7a2b2a394fe016547817fe17a7c6849d878f1c6f1e369a2" "checksum rustler_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b94e2cb016a43a5e269a5cf76523d00278347f985cf7fbf6062ef026236144d" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" +"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" diff --git a/native/arb/Cargo.toml b/native/arb/Cargo.toml index 392294a..3a0b2b5 100644 --- a/native/arb/Cargo.toml +++ b/native/arb/Cargo.toml @@ -11,5 +11,5 @@ crate-type = ["dylib"] [dependencies] rustler = "0.16.0" rustler_codegen = "0.16.0" -lazy_static = "0.2" -arb = { git = "https://github.com/adriankumpf/abacom-relay-board", tag = 'v0.2.0' } +lazy_static = "1.0.0" +arb = { git = "https://github.com/adriankumpf/abacom-relay-board", tag = 'v0.2.1' } diff --git a/native/arb/src/lib.rs b/native/arb/src/lib.rs index 7199746..88bcbf0 100644 --- a/native/arb/src/lib.rs +++ b/native/arb/src/lib.rs @@ -20,9 +20,6 @@ mod atoms { atom unsafe_read; atom bad_device; atom usb; - - //atom __true__ = "true"; - //atom __false__ = "false"; } } @@ -42,7 +39,7 @@ fn arb_error_to_term<'a>(env: NifEnv<'a>, err: arb::Error) -> NifTerm<'a> { Error::VerificationFailed => atoms::verification_failed().encode(env), Error::UnsafeRead => atoms::unsafe_read().encode(env), Error::BadDevice => atoms::bad_device().encode(env), - Error::Usb(ref libusb_error) => { + Error::Usb(libusb_error) => { (atoms::usb(), format!("{}", libusb_error).encode(env)).encode(env) } };