#bytecode-interpreter #json #expression #bytecode #interpreter

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.

7 unstable releases

0.4.1 Nov 11, 2024
0.4.0 May 3, 2024
0.3.0 Dec 10, 2023
0.2.1 Mar 25, 2023
0.1.1 May 29, 2022

#26 in #bytecode-interpreter

Download history 13/week @ 2025-10-10 7/week @ 2025-10-17

1,088 downloads per month
Used in hairy

Apache-2.0

500KB
11K SLoC

Indigo in Rust

This is the home of the following crates published on crates.io:

  • buildinfy: include build information in your executable, such as current GitLab CI pipeline.
  • commandy: small command line argument parser with small binary size.
  • crashy: small crash reporter that prints more info than the default crash reporter and has support for Sentry.io.
  • 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.
  • sshboard: a clipboard for SSH.
  • tmuxstatus: small utility that shows a CPU usage histogram and current memory usage.
  • tweetnacly: Bindings for TweetNaCl, with a couple of additions: flexible SHA2-512 hash, detached mode.

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 used by multiple crates in indigo-ng:

  • image
  • fast_qr
  • bcrypt
  • xxhash-rust (with xxh32)
  • tokio
  • hyper
  • TLS related based on rustls (including rustls-native-certs and tokio-rustls)

Installation

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

For macOS (for tmuxstatus, genny, butlery, libpep-rust, nanoproxy, sshboard):

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

~260KB