Typink is a scientific notebook app combining Typst typesetting with handwriting and diagramming, built with a Rust core and a Flutter frontend.
- Drawing Pad: Fixed 1333×1000 coordinate space keeps diagrams consistent across edits.
- Typst Preview: Live side-by-side preview with syntax highlighting and inline error diagnostics.
- Persistence: Autosaves
.typsource and stroke data (JSON + SVG) on edit; flushes on app lifecycle pause. - Multi-file sidebar: Manage multiple
.typfiles in one workspace directory. - PDF Export: One-tap PDF generation via the Typst engine.
Typink uses a hybrid architecture:
- Frontend: Flutter (Riverpod for state, custom headless editor with Vim keybindings).
- Engine: Rust (Typst engine via
flutter_rust_bridge).
Notebook/
main.typ # Main Typst document
figures/ # Auto-managed directory
fig1.svg # Image for Typst rendering
fig1.json # Stroke data for re-editing
Typink uses a hybrid architecture with a Rust core. Nix is required to manage the toolchain (Flutter SDK, Rust, Android NDK).
Use the Makefile at the project root — it wraps every command in the correct nix develop environment automatically.
make help # list all targets
make run # build Rust (debug) + run on Linux
make build-linux # build Rust (release) + package for Linux
make dev-android # cross-compile Rust (arm64) + run on device
make build-apk # cross-compile Rust (arm64) + build release APK
make bridge # regenerate Flutter↔Rust bridge
make test # run all tests
make clean # clean Flutter build artefactsThe optimized APK will be at flutter_app/build/app/outputs/flutter-apk/app-release.apk.
Tip
If you encounter "file INSTALL cannot find" or other directory errors, run make clean.
The flake ships a ready-to-run package (packages.default) and app (apps.default).
Run without installing:
nix run github:m-tky/TypinkInstall to your user profile:
nix profile install github:m-tky/TypinkAdd to a NixOS system flake (/etc/nixos/flake.nix):
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
typink.url = "github:m-tky/Typink";
};
outputs = { nixpkgs, typink, ... }: {
nixosConfigurations.my-machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
({ pkgs, ... }: {
environment.systemPackages = [
typink.packages.x86_64-linux.default
];
})
];
};
};
}home-manager:
home.packages = [ inputs.typink.packages.${pkgs.system}.default ];Build locally from source:
nix build . # output → ./result/bin/typink
nix run . # build and launch immediatelyDownload the pre-built bundle from the Releases page and extract it, or build from source with make build-linux.
Install:
sudo cp -r typink-bundle /opt/typink
sudo ln -sf /opt/typink/typink /usr/local/bin/typinkAdd a desktop launcher:
cat > ~/.local/share/applications/typink.desktop << 'EOF'
[Desktop Entry]
Name=Typink
Comment=Scientific notebook with Typst and handwriting
Exec=/opt/typink/typink
Icon=/opt/typink/data/flutter_assets/icon.png
Type=Application
Categories=Office;Education;
EOFIf the app fails to start, install the required GTK 3 libraries:
| Distro | Command |
|---|---|
| Ubuntu / Debian | sudo apt install libgtk-3-0 libglib2.0-0 libpango-1.0-0 libharfbuzz0b libatk1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libfontconfig1 libfreetype6 |
| Arch Linux | sudo pacman -S gtk3 glib2 pango harfbuzz atk cairo gdk-pixbuf2 fontconfig freetype2 |
| Fedora / RHEL | sudo dnf install gtk3 glib2 pango harfbuzz atk cairo gdk-pixbuf2 fontconfig freetype |
Note
Any GNOME, KDE, or Xfce desktop already has these. They're only missing on minimal/server installs.
- Click the "Insert Drawing" icon in the toolbar.
- The Drawing Pad modal opens. Sketch your diagram.
- Click "Save & Close".
- Typink automatically calculates the content density and suggests a width (40% / 70% / 100%) for the
#figuretag in Typst.
Click the PDF icon in the top right.
- Linux: Saved to
~/Documents/Typink/ - Android: Saved to your
Downloadsdirectory.
Typink is designed to work with Syncthing. Files are saved in a clean .typ + figures/ directory structure, making conflict resolution and cross-device sync straightforward.