CLI to convert MIME messages into/from Emacs MIME Meta Language, based on mml-lib
- MML to MIME messages compilation (
mml compile --help
) - MIME to MML messages interpretation (
mml interpret --help
)
MML CLI is written in Rust, and relies on cargo features to enable or disable functionalities. Default features can be found in the features
section of the Cargo.toml
.
MML CLI can be installed with a pre-built binary from the latest GitHub release:
# As root:
$ curl -sSL https://raw.githubusercontent.com/pimalaya/mml/master/install.sh | sudo sh
# As a regular user:
$ curl -sSL https://raw.githubusercontent.com/pimalaya/mml/master/install.sh | PREFIX=~/.local sh
MML CLI can be installed with a pre-built binary from the pre-releases
GitHub workflow: take the latest build, find the Artifacts section, you should find a pre-built binary matching your OS.
This workflow is triggered everytime a new commit is pushed on master
. Such binary is usually more up-to-date than a release, but also less stable.
Pre-built binaries are built with default cargo features. If you want to enable or disable a feature, please use another installation method.
Cargo
MML CLI can be installed with cargo:
$ cargo install mml
# With only IMAP support:
$ cargo install mml --no-default-features --features imap
You can also use the git repository for a more up-to-date (but less stable) version:
$ cargo install --git https://github.com/pimalaya/mml.git mml
Nix
MML CLI can be installed with Nix:
$ nix-env -i mml
You can also use the git repository for a more up-to-date (but less stable) version:
$ nix-env -if https://github.com/pimalaya/mml/archive/master.tar.gz
# or, from within the source tree checkout
$ nix-env -if .
If you have the Flakes feature enabled:
$ nix profile install mml
# or, from within the source tree checkout
$ nix profile install
# you can also run MML directly without installing it:
$ nix run mml
Sources
MML CLI can be installed from sources.
First you need to install the Rust development environment (see the rust installation documentation):
$ curl https://sh.rustup.rs -sSf | sh
Then, you need to clone the repository and install dependencies:
$ git clone https://github.com/pimalaya/mml.git
$ cd mml
$ cargo check
Now, you can build MML:
$ cargo build --release
Binaries are available under the target/release
folder.
How to debug MML CLI?
The simplest way is to use --debug
and --trace
arguments.
The advanced way is based on environment variables:
RUST_LOG=<level>
: determines the log level filter, can be one ofoff
,error
,warn
,info
,debug
andtrace
.RUST_SPANTRACE=1
: enables the spantrace (a span represent periods of time in which a program was executing in a particular context).RUST_BACKTRACE=1
: enables the error backtrace.RUST_BACKTRACE=full
: enables the full error backtrace, which include source lines where the error originated from.
Logs are written to the stderr
, which means that you can redirect them easily to a file:
RUST_LOG=debug mml 2>/tmp/mml.log
Special thanks to the NLnet foundation and the European Commission that helped the project to receive financial support from various programs:
- NGI Assure in 2022
- NGI Zero Entrust in 2023
- NGI Zero Core in 2024 (still ongoing)
If you appreciate the project, feel free to donate using one of the following providers: