Skip to content

Commit

Permalink
Update arb to v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adriankumpf committed May 16, 2018
1 parent c22a197 commit bb60c0a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -15,7 +18,7 @@ Add `:arb` to your list of dependencies:
```elixir
def deps do
[
{:arb, "~> 0.2.0"}
{:arb, "~> 0.2.1"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
32 changes: 16 additions & 16 deletions native/arb/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions native/arb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
5 changes: 1 addition & 4 deletions native/arb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ mod atoms {
atom unsafe_read;
atom bad_device;
atom usb;

//atom __true__ = "true";
//atom __false__ = "false";
}
}

Expand All @@ -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)
}
};
Expand Down

0 comments on commit bb60c0a

Please sign in to comment.