This is a small, windows-only dynamic library that can be used to translate Windows MAPI calls to command line arguments.
It handles calls to the functions defined in the mapi.h header, which is not available directly from Microsoft anymore. You can get it from https://github.com/stephenegriffin/MAPIStubLibrary/blob/master/include/MAPI.h
The main purpose is to enable Tutanota Desktop on Windows to handle requests to send files via mail, like they can be issued via the File Explorer context menu or in programs like MS Office and LibreOffice.
The project is set up to compile for the x86_64-pc-windows-gnu
target by default, so if you're developing on windows,
you'll have to override .cargo/config.toml
as shown in the "Commands" section below.
- Microsoft Visual C++ 2019 build tools
- cargo
cargo build --target "x86_64-pc-windows-msvc"
or
cargo build --release --target "x86_64-pc-windows-msvc"
the dll will be placed in ./target/x86_64-pc-windows-msvc/{release,debug}/mapirs.dll
The project is set up so "cargo build" will use the x86_64-pc-windows-gnu
target. Running tests requires wine to be
installed.
- package gcc-mingw-w64
- cargo
- wine
cargo build
or
cargo build --release
the dll will be placed in ./target/x86_64-pc-windows-gnu/{release,debug}/mapirs.dll
- To get the IntelliJ IDEA Rust Plugin to ignore/check code that is inactive due to attributes like
#[cfg(target_os = "windows")]
, openCtrl + Shift + A -> Registry...
and toggleorg.rust.lang.cfg.attributes
- licenses.html has been generated with https://github.com/EmbarkStudios/cargo-about :
cargo-about init
and thencargo-about generate about.hbs > licenses.html
- the CI script uses clippy and rustfmt to check the code, so run
cargo clippy
andcargo fmt
before committing (in that order)