#expressions #bytecode #interpreter #json

macro expry_macros

Execute an expression on an encoded (binary) value, yielding another binary value (either in decoded or encoded form). Supports custom functions. Supports parsing the expression and converting the expression to bytecode.

5 unstable releases

0.3.0 Dec 10, 2023
0.2.1 Mar 25, 2023
0.1.2 Jun 18, 2022
0.1.1 May 29, 2022

#79 in #expressions

Download history 15/week @ 2023-12-18 11/week @ 2024-01-08 70/week @ 2024-01-15 83/week @ 2024-01-22 12/week @ 2024-01-29 5/week @ 2024-02-05 47/week @ 2024-02-12 37/week @ 2024-02-19 91/week @ 2024-02-26 13/week @ 2024-03-04 25/week @ 2024-03-11 14/week @ 2024-03-18 57/week @ 2024-03-25 140/week @ 2024-04-01

237 downloads per month
Used in hairy

Apache-2.0

455KB
10K SLoC

Indigo in Rust

This is the home of the following crates:

  • buildinfy: include build information in your executable, such as current GitLab CI pipeline.
  • commandy: small command line argument parser with small binary size.
  • expry: evaluates expressions, on binary JSON-like representations.
  • hairy: text templating system with error checking (missing values can be detected compile time).
  • libpep: implementation of polymorphic encryption and pseudonimisation.
  • markdowny: parser for Markdown to AST, so it can be easily converted to other formats.
  • searchy: small embedded in-memory search engine supporting evaluation expressions.
  • tmuxstatus: small utility that shows a CPU usage histogram and current memory usage.

Shared design goals

  1. Energy efficiency when running the code;
  2. Small memory footprint;
  3. Error handling.

We try to achieve this with:

  • event-driven programming;
  • shifting as much as possible to compile time, and avoid runtime costs;
  • use memory efficient data representations.

Dependencies

We distinguish 3 types of dependencies:

  1. development related dependencies, such as testing frameworks;
  2. loose coupled dependencies, such as a UUID generating framework;
  3. tightly coupled dependencies, such as an event framework.

We focus on minimizing the type 3 dependencies, as these are hard to change. Type 2 dependencies should be included in a wrapper function, so it easy to swap out alternative implementations (or implement it on our own in the future).

List of (some) external crates

  • image
  • qrcode
  • bcrypt
  • xxhash-rust (with xxh32)
  • tokio
  • hyper

Installation

For Debian, Ubuntu, and Raspbian, add the bitpowder repository. See the instructions on that repository page.

For macOS:

brew tap bitpowder/indigo-ng https://bitpowder.com:2443/bitpowder/indigo-ng.git
brew install --HEAD bitpowder/indigo-ng/tmuxstatus

Update with brew reinstall bitpowder/indigo-ng/tmuxstatus.

Dependencies

~255KB