# rusty-things

> Node Wrapper around rusty-things

Latest version **0.1.0** (published 2019-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install rusty-things
pnpm add rusty-things
yarn add rusty-things
bun add rusty-things
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-06-25 |
| First published | 2019-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 132.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Felix Fichte |
| Maintainers | spruce |

## Links

- npm: https://www.npmjs.com/package/rusty-things
- npm.io page: https://npm.io/package/rusty-things

## Dependencies (2)

- [dotenv](https://npm.io/package/dotenv.md) ^8.0.0
- [neon-cli](https://npm.io/package/neon-cli.md) ^0.2.0

## Recent versions

- 0.1.0 (latest) — 2019-06-25

## README

# MMM-rusty-things

MagicMirror module to access your todo-entries from Things and display them in MM.
It was a learning project for me where I learnt about how to interact between Rust and Node.

# Screenshot

The module looks like this:



![Example of MMM-rusty-things publishing todos](img/MMM-rusty-things-screenshot.png)

# Installation

```
git clone https://github.com/piceaTech/MMM-rusty-things.git
cd MMM-rusty-things.git
npm install
mv example.env .env
```
Edit the `.env` and insert your hist_id. 

After that either compile the native module locally on the pi or cross-compile from your desktop.

## No cross-compilation

In the folder rust-things execute:
```neon build --release```

(This runs for approximately 30 minutes.)

## Cross-compilation (e.g. from x64 to arm)
1. Build the build-Container
  1. `git clone https://github.com/piceaTech/rust-on-raspberry-docker`
  1. `cd rust-on-raspberry-docker`
  1. `git checkout neon`
  1. If you need another node version than the current LTS-Version: Edit the Dockerfile and switch to correct BaseImage.
  1. `docker build --tag "neon-pi-cross:latest" .`
1. Copy the following dependencies as `.deb`s into `native/pi_deps`
  1. ssl: http://ftp.debian.org/debian/pool/main/o/openssl1.0/libssl1.0-dev_1.0.2r-1~deb9u1_armhf.deb
  1. sqlite: http://ftp.debian.org/debian/pool/main/s/sqlite3/libsqlite3-dev_3.16.2-5+deb9u1_armhf.deb
1. Inside your neon-folder run `native/build.sh`. This should create a `native/index.node` which should be compatible with arm.
  - Currently there is an error in neon-serde which requires that the following patch be applied manually inside https://github.com/GabrielCastro/neon-serde/pull/29 inside your `~/.cargo/registry`
  - Currently neon does not support cross-compilation. it requires you add the following patch in the `node_modules` folder youreself: `https://github.com/neon-bindings/neon/pull/411`
    - Best insert it into the js code in the lib folder and not the Typescript code as then you would need to recompile the code
1. Deploy this artifact to the pi!
1. Done

---
_Source: https://npm.io/package/rusty-things · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
