Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Design

Which decisions are confirmed, which crates the application is built on, what the design costs, and the choices behind it.

What is settled

The format author settled the points below on 2026-11-21. Every other detail of this section is proposed, and listed under Settled and open questions where a choice is open.

DecisionStatus
The interface is built with gpui-kit on the gpui-fast engineConfirmed
The allocator is mimalloc3Confirmed
The application has a library of booksConfirmed
It opens every format mbook-converter convertsConfirmed
A book that is not mbook is converted when it is opened, and the result is kept in the libraryConfirmed
A book can be editedConfirmed
CPU-bound work runs on a pool of rayon with half the threads of the system, which the background executor awaitsConfirmed on 2026-11-24
The prototype is modelled on Apple Books for the MacConfirmed
The layout is responsive, so that desktop and mobile share itConfirmed
The directories of the application come from the dirs crateConfirmed
Updates are installed from GitHub releases with the self_update crateConfirmed
The crate is mbook-ui, and the application is called mbookConfirmed
An import leaves the original file where it is; the library gets a copyConfirmed
A book whose id is already in the library is not added again; the existing one is openedConfirmed
Pictures are decoded by avif-decode; the package requires Rust 1.100Confirmed
Literata is the default reading choice and the typeface is configurableConfirmed. Literata and Noto Sans are bundled.
The modules follow Feature-Sliced DesignConfirmed
A release is a tag on GitHub; its binaries are built by a workflow started by hand for that tagConfirmed
Releases are signed with keys generated for the project and kept as secrets of the repositoryConfirmed
The icon is an open book on the navy of the design documentsConfirmed
Saving an edit replaces the book in the libraryConfirmed
The editor accepts pictures that are not AVIF and encodes them with the image crateConfirmed
The catalogue is a redb databaseConfirmed
The application is built for Android; there it runs on gpui-pre with the platform of gpui-mobile, while the desktop stays on GPUI FastConfirmed on 2026-11-23
The release workflow builds an APKConfirmed on 2026-11-23

Dependencies

Checked on 2026-11-21 against crates.io. A crate only this package uses is declared in its own manifest; the manifest of the workspace keeps what several packages share.

CrateVersion, last releaseLicenseUsed for
gpui-kit, feature gpui-fast0.10.0, 2026-11-16Apache-2.0The interface; brings GPUI Fast 0.1
rfd0.17.2MITNative book and picture pickers with extension filters
robius-share, desktop only0.3.0, 2026-07-18; Project Robius, repository pushed 2026-11-13MITThe share sheet of the platform; Rust 1.77. On Windows it brings windows 0.56 beside the versions GPUI uses
mimalloc30.1.61, 2026-11-17MITThe allocator of the binary
dirs7.0.0, 2026-09-05MIT OR Apache-2.0The roots on desktop
self_update1.3.3, 2026-10-27MITUpdates; Rust 1.88
redb5.0.0, 2026-11-18MIT OR Apache-2.0The catalogue; Rust 1.90
avif-decode3.0.0, 2026-09-20BSD-3-ClauseDecoding pictures; Rust 1.98
imageThe version and features of the workspace, with nasm on ARM; GPUI brings the same crateMIT OR Apache-2.0Decoding and AVIF encoding of pictures added in the editor; scaling
futuresalready in the tree of GPUIMIT OR Apache-2.0The channel of the editing task; the future of work on the pool
rayonThe version of the workspace; already in the tree of image, ravif and rav1eMIT OR Apache-2.0The pool of CPU-bound work
tree-sitter-mermaid, codebook-tree-sitter-latex0.3.5 and 0.6.1MITSyntax highlighting in the Mermaid and KaTeX source dialogs
rust-i18n4.2.4, 2026-09-29; Longbridge, the authors of GPUI ComponentMITThe texts of locales/ and the language of the process; GPUI Component already uses it, so its controls and the application share one language
sys-locale0.3.2, 2024-11-01; 1PasswordMIT OR Apache-2.0The languages of the system in order of preference, on every platform including Android
icu_plurals, icu_locale_core2.4.0, 2026-10-22; ICU4X of Unicode; icu_locale_core already in the treeUnicode-3.0The plural category of a count
uuid, tempfile, thiserror, markdownThe versions of the workspaceKeys; files of imports; errors; block offsets
gpui-pre-mobile (gpui-mobile), Android onlyCommit d8945a8 of longbridge/gpui-mobile#56, opened 2026-11-11; repository pushed 2026-11-03GPL-3.0-or-later OR AGPL-3.0-or-later OR Apache-2.0, used under Apache-2.0The GPUI platform of Android: window, input, renderer, document picker and, with its clipboard feature, the clipboard of the system; its Java activities and emoji font go into the APK
android-activity, android_logger, log (in mbook-android)0.6, 0.15, 0.4MIT OR Apache-2.0NativeActivity glue that calls android_main; logcat
jni, log, Android only0.22, the version gpui-mobile uses; 0.4MIT OR Apache-2.0Asking the activity for the documents it received; logging a Java exception
windows-registry, Windows only0.6.1, of windows-rs; already in the tree of GPUIMIT OR Apache-2.0Registering the book formats for the current user; a safe API, so the crate keeps unsafe_code forbidden

gpui-mobile is taken from its repository, pinned to a commit: its only release on crates.io, 0.1.0, is built for gpui-pre 0.3.5, and GPUI Kit 0.10 pins gpui-pre 0.3.12. The pull request moves it to 0.3.12 without changes to its code. Its default features bring about thirty platform modules (camera, contacts, location, notifications…); they are off. Its README calls it an experimental platform release: composition through the keyboard of the system and the lifecycle of an activity are incomplete.

avif-decode brings rav1d (BSD-2-Clause, a port of dav1d to Rust; last release 1.1.0 of 2025-05-07) and avif-parse (MPL-2.0). The assembly enabled by avif-decode for x86 and x86-64 requires NASM at build time. The font sources and notices are listed in Reading verification.

Ruled out:

CrateReason
image with avif-nativeNeeds the C library dav1d on the machine that builds and on the one that runs
zenavif, rav1d-safeAGPL-3.0, or a commercial license
rusqliteSee Rationale and alternatives
kael_share 0.4.1Calls a named sharing service directly instead of showing the picker, and shares no file on Windows
istmo-share 0.1.1-alphaAn alpha whose API changes between releases; needs the window registry and runtime of the istmo framework
gpui-mobile 0.1.0 on crates.io (itsbalamurali/gpui-mobile)Declares no dependency, not even on GPUI: it implements no platform for the GPUI of the Kit
cargo-apk, xbuildcargo-apk is deprecated in favour of xbuild and packs no Java code, which the activities of gpui-mobile are; xbuild packs it through Gradle. android.sh compiles them with the tools of the SDK
fluent-bundleA second system of translation beside the rust-i18n of GPUI Component, with a language of its own to keep in two places; its plurals are what icu_plurals gives
gettext-rsBinds the C library gettext, which a build for Windows and Android must bring
intl_pluralrules 7.0.2No release since 2022-10-19; ICU4X, which follows the CLDR, is already in the tree
cargo-ndkSets the same four variables android.sh sets; a tool to install on every machine for no other gain
A Gradle projectGradle and the Android Gradle plugin are downloaded on every clean build, for an APK of one activity without AndroidX

Drawbacks

  • A large dependency. GPUI and its component library are far larger than the rest of the workspace together, and the engine is young: GPUI Fast is at version 0.1.
  • The checks of the repository grow. Clippy, tests and documentation of the workspace now build GPUI, and continuous integration needs a display server's libraries on Linux.
  • An editing session holds the whole book decoded, as Book does. A comic of several hundred pages may not fit on a phone.
  • Accessibility depends on a young integration. What a screen reader hears is what GPUI and AccessKit pass on; a gap there is a gap here.
  • A running conversion cannot be stopped, only ignored. Neither can the encoding of a picture, which takes seconds for a large one.
  • Large blocks. A page boundary through an oversized code block, list or table is limited by the geometry the Markdown view exposes.
  • Two copies of a book after import: the original and the one in the library.
  • A stored place is approximate after an edit of its chapter.
  • A second minimum Rust version in the workspace.
  • Two engines. Android runs on gpui-pre, the desktop on GPUI Fast. The code is the same and the tests run on GPUI Fast only; a difference of the engines shows on a phone first.
  • A platform from a pull request. gpui-mobile is a pinned commit of an open pull request, an experimental release by its own account, mostly the work of one author. Its Java activities and emoji font are taken from its example application, whose layout may change.
  • Android limits listed under Android: arm64 only, a theme that does not work for API 36, a black screen after the activity is recreated.
  • A content provider of this repository lends shared files on Android: a small amount of Java to keep, because the FileProvider of AndroidX needs Gradle.

Rationale and alternatives

DecisionChosenRejectedWhy
ToolkitGPUI Kit on GPUI FastDecided by the format author.
Engine on Androidgpui-pre, with the platform of gpui-mobileGPUI Fast with a platform of this repositoryGPUI Fast has no Android platform; for iOS its platform crate takes the iOS crate of gpui-pre. gpui-mobile is the only Android platform for GPUI and is written for gpui-pre; writing one is most of gpui-mobile again. The application compiles and its tests pass on gpui-pre unchanged.
The Android entry pointA crate of its own, mbook-android, with the lints of the workspace but unsafe_code denied, and one #[expect] on android_mainandroid_main in mbook-ui; the host-driven entry point of gpui-mobile#[unsafe(no_mangle)] is unsafe code, which mbook-ui forbids, and a forbidden lint cannot be expected. The host-driven entry point survives a recreated activity but needs JNI functions of this crate and an activity of its own.
Packing the APKandroid.sh: javac, d8, aapt2, zipalign and apksigner of the SDKGradle; cargo-apk; xbuildSee Ruled out under Dependencies.
System bars on AndroidOpt out of the edge-to-edge layout of API 35, and pad views by the bars gpui-mobile measurestargetSdkVersion 34; JNI code of this crate that reads WindowInsetsgpui-mobile reads the bars from the content view, which edge-to-edge makes the whole screen. API 34 leaves the current target of Google Play behind; JNI code needs a second Java activity.
Export on AndroidThe converted file goes to the share sheetprompt_for_new_path; the save picker of gpui-mobilegpui-mobile answers prompt_for_new_path with no path, and its save picker returns a content: URI, which std::fs cannot write.
Clipboard on AndroidThe clipboard feature of gpui-mobile, with its GpuiClipboard packed into the APK; the edit menu of GPUI Kitgpui-mobile without the feature; a clipboard class of this repository; the floating text toolbar of Android (ActionMode)Without the feature gpui-mobile keeps copied text in a string of the process, so Copy reached no other app. The class of gpui-mobile is the twenty lines a class of this repository would be. The toolbar of Android belongs to a View that owns the selection; GPUI draws the text itself, so it would need the bounds of the selection and every command passed through JNI, for the same four commands the menu of the Kit already offers on every platform.
Share on AndroidMbookActivity.share with MbookFiles, a read-only content provider of this repository, started on the thread of the activity without waitingrobius-share, as on the desktop; the share module of gpui-mobile; the FileProvider of AndroidXrobius-share showed no sheet on the phone it was tried on: it copied the file to Download/Robius Share/, left it there, and blocked the thread of the interface on a latch until the thread of the activity had run, which android-activity's handshakes can make wait for the interface. It also never clears a Java exception it causes. The share module of gpui-mobile shares text only, and the FileProvider of AndroidX needs Gradle.
A sideways swipe over a scrolling textSteps to the next or the previous chapter; one swipe steps once, and a movement mostly up or down never doesNothing; a tap at the edge as for a pageA phone reader expects a swipe to turn; the chapter is the page of a scrolling text. GPUI reports a pan as scrolling, so the same code serves a trackpad.
The footer of a scrolling textFixed over the text, which runs under it and fades into the paper behind the controlsIts room kept below the text; over the text only while the controls are shown; fully transparentOn a phone the kept room was a sixth of the screen with nothing in it, and a footer that hid left no way to the next chapter while scrolling. Fully transparent, its arrows and status were lost in the lines under them. The text view of the Kit cannot pad the end of its list, so the text is followed by an empty block as tall as the footer: scrolled to its end, the last line stops above the controls. A paged text keeps the room, since its pages are cut to the height above the footer.
Bringing the hidden controls back while scrollingScrolling back, and the end of a chapterOnly a tap or the pointerA reader who wants the controls scrolls back, as in other readers; at the end of a chapter the next one is what a reader wants.
A tap or a swipe on something over the textBelongs to what is on top: the reader checks the hitbox of its text at the pointThe bounds of the textA notification lies over the text; a tap on it turned the page and a swipe over it changed the chapter.
Dismissing an announcement on a touch screenA tap, or a sideways swipe over itIts close button; hiding it after a timeThe close button of the Kit shows on hover only, which a touch screen has not. A time limit would fail WCAG 2.2.1 for a message the user did not cause.
Registering the formats on WindowsThe application writes them to the registry of the current user at each startEntries of the installer; nothingThe installer of cargo-bundle cannot hold file types, and writing the WiX source of the installer by hand is a second build to keep. The price is that uninstalling leaves the entries, which then point at a missing program.
Registering the formats other than mbookOpen with and an alternative handler, never the defaultMaking mbook the default for EPUB, PDF and the restThe user chose a program for those; mbook converts them on the way in.
Documents handed to the Android activityCopied into the cache by an activity of this repository, and taken by the interface once a secondA JNI function the activity calls; the deep links of gpui-mobileA JNI function is a second unmangled entry point in mbook-android; the deep links of gpui-mobile go to its example activity and carry URLs, not readable files.
Where another app's document is received on AndroidOpenActivity, without a window or native code, which starts MbookActivity in its own taskThe intent filters on MbookActivityAn app that starts the receiver for a result, as Telegram does, gets a second MbookActivity in its own task, which cannot run the interface and closes; the document was imported, but mbook did not come up.
A destroyed activity on AndroidEnds the processKeeping the process, as Android doesGPUI cannot start again in a process on the thread of a new activity, and the window of that activity stays black. The price is a fresh start after the language of the system changes.
The sections of the editor in a compact windowA sheet from a menu button beside Back, as in a medium windowA screen of its own that Back returns toBack that first opened the list and only then left the editor read as a bug; a menu button says what it opens.
Translationsrust-i18n with a YAML file per part of the application, keys named by part and purpose; counts by the plural rules of the CLDRFluent; gettext; the English text as keyGPUI Component translates its controls with rust-i18n in a language of the process; a second system would need the language set twice. A key by purpose keeps a reworded English text from breaking its translations.
The language at startThe first language of the system the interface has, else EnglishThe first language of the system, else English; English alwaysA Russian speaker whose system lists German first still gets Russian; a language without a translation would be all fallback.
The language settingSystem language, then every language named in itself; stored by its code, no row while it follows the systemThe names in the current languageA person who cannot read the current language finds theirs. No row keeps a change of the system's language working, as for the page tone.
The language in testsNever set: the tests run in English and a test checks the language Appearance chooses, not the textSetting it per testThe language of rust-i18n belongs to the process, and the tests of a crate run on several threads at once.
File picker filtersNative dialogs through rfdGPUI file promptsGPUI Kit 0.10 cannot pass extension filters to its platform picker.
Sending a book to other peopleThe share sheet of the platform through robius-share, with the mbook fileShare links of social networks; code of this crate on AppKit and WinRTA share link carries text and a web address, and a library book has no address. Calling the platform directly needs unsafe, which the workspace forbids; robius-share keeps it in a maintained crate.
Export destinationNative save dialog and temporary file in the destination directoryConvert directly into the chosen fileThe completed file is published in one operation and an existing file cannot be overwritten.
Landmarks sectionThe start in a block of its own, then the other landmarks as a listOne row for every kind, filled or empty; one list with the start among the restThe start is the one landmark a reader meets without asking and a book has one. Twenty-two rows would bury the few places a book has.
Choosing the kind of a landmarkOne menu grouped by what a reader looks for, the places looked up while reading first, with a line that says what the choice givesAn alphabetical menu; the identifiers of the formatAuthors choose by purpose, and the line answers why a place is worth marking.
Landmarks in the readerListed under Go to above the entries in the contents panel, in the order of the bookA control of their own in the header; mixed among the entriesThe header already holds five controls; the order of the book is the order RFC 0001 asks an application to list them in, and mixed in they would read as chapters.
Where a new book opensThe start landmark, only while no place is storedAlways at start; at the first chapter as beforeA reader who has turned back to the title page expects to come back to it.
Position of a new landmarkIn the order of the book among the othersAt the end of the listRFC 0001 makes the stored order the order an application lists them in.
Where CPU-bound work runsThe global pool of rayon with half the threads of the system and a stack of 16 MiB, through compute::spawn, whose future the background executor awaits; files, the catalogue and the network stay on the executorEverything on the background executor of GPUI, the choice until 2026-11-24; a pool with every threadDecided by the format author on 2026-11-24. The converter and rav1e compute on the pool of rayon anyway, so the work of the application joins them there instead of competing with them from the threads of the executor; half the threads stay for the executor, drawing and the system, so a long import does not slow the interface. The stack is larger than the 2 MiB of a thread of the standard library because parsing nested Markdown, laying out a diagram and encoding a picture recurse; it is reserved, not used. The price: the pool has no priorities, cancelling reaches work only before it starts, and an import has half the cores (the EPUB of the record below: 4.3 s on four threads, 2.6 s on eight).
What decides a layoutThe width of the windowThe platformA narrow desktop window and a phone need the same layout; a platform test gives two code paths that drift apart.
Primary flowContinuous vertical scrolling per chapter, with saved pagination as an alternativePaged-only navigationScroll uses the native gesture path and leaves ordinary text free of page masks.
ReadingBookReader, lazilyBook for everythingA Book decodes every chapter and picture before the first line is shown.
Finding text in a bookScan chapter text on demandIndex the whole book at openOpening a book stays lazy. Search retains its current match and reads no pictures, with a chapter scan for each step.
Access to the readerA snapshot on the main thread; the source behind a mutex for background tasksTable lookups on the main threadA lookup would wait for a mutex that a read holds during I/O.
Rendering MarkdownThe Markdown view of GPUI KitA renderer of this crateIt virtualises, selects text, parses off the main thread, and is built on the same markdown crate as mbook.
Paginating a chapterBreak the chapter using the measured GPUI Kit blocksA custom Markdown renderer or a fixed max_lines valueMeasurements include proportional wrapping, headings and images while chapter-wide references stay with the Kit.
Whole-book page numbersCombine measured chapters and estimates for the current layoutA fixed count in the file or a full-book layout pass on openReflow changes the rendered count. Estimates let the book open lazily, and each measured chapter replaces its estimate.
Seeking within the bookUse the decoded chapter lengths and an offsetIndex every page before allowing a seekChapter lengths are already in the snapshot and locate a destination even before its chapter is measured.
Stored placeChapter path and byte offsetResource number and offsetNumbers change when a book is written again.
Creating a bookCreate a titled book with one empty chapter and open it in the editorAsk for chapter paths before opening the editorA writer can start with the title and go straight to writing. The title and chapter paths remain editable.
EditingOne background task owns the Book; commands in orderA Book behind a mutex, one task per changeSeparate tasks may run out of order: a save could miss the edit before it.
Visual chapter editingUse the GPUI Kit block editor and restore intact source blocks with similarExtend the inline Markdown projectionThe block editor provides table and list structure, selection and undo. Restoring unchanged blocks protects source spelling and heading anchors.
How a chapter is named in the editorIts number and the title of its first heading; the path beside itThe path aloneAn author knows a chapter by its title. The path stays in sight because links and problems name it.
Adding a chapterAsk for a title; propose the pathAsk for a pathThe title is what the author has in mind, and it becomes the heading the contents are built from. The path can be changed afterwards.
Putting a picture into a chapterOne dialog in the chapter: the pictures of the book, or a file that is added on the wayAdd the picture in Pictures first, then pick its path from a menu in the chapterThe second way takes three screens and needs the name of a file to be remembered.
Where chapter actions areA menu with words: Move up, Move down, Rename the file, Remove the chapterA row of icons beside the viewsArrows beside a title read as "previous" and "next". The actions are rare and one of them cannot be undone.
Where the contents are explainedA section of their own that shows themOnly the control that rebuilds them among the problemsAn author who asks how to change the contents finds neither a list nor a rule otherwise.
The order of a stored contents listThe editor keeps it: an entry sits where its place is in the bookControls that move an entry up and downThe format refuses a list that is not in reading order, so almost every move by hand would be a mistake to undo. A moved chapter takes its entries along, a removed one takes them away, and one control sorts a list that an edit of the text left out of order.
The level of a contents entryTwo menu items that move it in or out with the entries under itA level number in the dialogThe level that is allowed depends on the entries around it. Moving in and out, as an outliner does, cannot produce a list the format refuses.
The places a link can lead toCarried in the outline, from the anchors Book keepsA public call of mbook that lists the contentsThe API of mbook stays as it is. The price is that the rule which lists a heading is written here a second time, with a test.
Escaping the words the editor writes into MarkdownA function of this crate, tested by reading the result back with markdownmdast_util_to_markdown 0.0.2That crate is a pre-release without the GFM extensions. mbook-converter escapes with a function of its own for the same reason (Dependencies); it is not public, and the API of mbook-converter stays as it is. A link needs none of it: the block editor types and links the words.
Where an edit is savedOver the book in the library, by a renameAlways a new copyDecided by the format author. The library is the working copy; the original file was never touched.
CatalogueredbSQLite through rusqliteDecided by the format author. Pure Rust: nothing to cross-compile for a phone. The price is no SQL; a library is filtered in memory.
No catalogue; open every file at startReading places and settings need a store anyway, and a shelf of thousands should not wait for thousands of files.
Source of truth for metadataThe mbook filesThe catalogueAn edit changes the file; a lost catalogue then costs no book.
Key of a bookA UUID made at importThe id of the metadataThat id is any string and may be edited.
Directoriesdirs, handed in by the shellPaths built in the libraryDecided by the format author; handing them in keeps tests and mobile shells possible.
Installing updatesself_update, blocking transport on the backgroundIts asynchronous transportDecided by the format author to use the crate. The blocking transport needs no Tokio runtime beside GPUI.
Update banner placementBelow the title barAbove the whole pageNative macOS window controls stay at the top of the window when the banner appears.
AVIF decoderavif-decode on rav1ddav1d in CDecided by the format author. No C toolchain; the same reason as for the encoder of mbook-converter.
Minimum Rust version1.100 for this packageThe 1.89 of the workspaceDecided by the format author. avif-decode needs 1.98 and redb 1.90; an application is built by its maintainers, not by users of a library.
Typeface of booksBundled Literata and Noto Sans, plus System and installed choicesOnly installed familiesRendering is available offline on a fresh installation.
Building a releaseA workflow started by hand for a tagBuilding on every tagDecided by the format author. The workflow publishes the libraries for the tag before building the application.
Drawing diagrams and formulasRender source with the figure module of mbook-converter (merman and RaTeX), then give SVG to GPUIConvert sources to AVIF; render with a web viewSVG lets the reader choose its own page colours and sizes. The source remains editable and rendering stays local.
Encoding the pictures of an importmbook-converter with its rayon featureIts default, one picture after anotherDecided by the format author. An import of a 7 MB EPUB with 45 pictures took 2.6 s instead of 3.9 s on eight threads of an Apple M-series processor; the converter's own record has the details (Rationale).
Assembly of the AVIF encoderThe NEON assembly of rav1e on ARM (aarch64), through the nasm feature of image; pure Rust on x86Pure Rust everywhere; the assembly on x86 as wellProposed, not yet confirmed by the format author. Importing a 7 MB EPUB with 45 pictures took 10.5 s on four cores of an Apple M-series processor without it and 5.5 s with it; a phone took about a minute. On ARM the feature needs only the C compiler, which the Android build has for its C dependencies already; on x86 it needs NASM, which the release builds install for rav1d but a contributor may not have. The price is an assembler step in the ARM builds, beside the "no C toolchain" reason of the AVIF decoder. The library mbook-converter stays pure Rust.
Pictures added in the editorEncoded here, with imageA public encoder in mbook-converterDecided by the format author. The API of mbook-converter stays as it is; the price is that quality and speed are written in two crates.
Size class under a scaled interfaceWidth divided by the scaleWidth in pixelsAt 200% a desktop window has room for the compact layout only; clipping or a horizontal scroll bar fails WCAG 1.4.10.
Reordering chaptersA drag, and "Move up" and "Move down"A drag aloneWCAG 2.5.7: a drag needs an alternative.
ThumbnailsJPEG files in the cacheDecoding every cover at startThe shelf then needs no AVIF decoder to appear.
Making a picture of the text open largerA block plugin of the chapter view that draws a picture alone in its paragraph as the Kit does, and answers a clickWrapping each picture in a link of the text; a hit test over the whole textGPUI Kit 0.10 lets no click reach an image of its Markdown view. A link would change the text that offsets, search and copying use; a hit test would need the bounds of the images, which the Kit does not give. The price is that a picture in a line of text does not open.
The preview in the dialog of a diagram or a formulaThe drawing beside the source in a wide window, fitted into the room left by the source and enlarged up to twice, with Actual size to see a large one at its size in the text and scroll itA fixed dialog of 570 pixels with the drawing under the source, at most 180 pixels high; the full-window viewer of the readerA large diagram fitted into 180 pixels could not be read, and the source scrolled in a field of six lines. Beside the source, the drawing gets the height of the window while both stay in sight. A dialog cannot open the viewer of the reader over itself.
What the viewer shows of a pictureThe picture decoded again at its own size, up to 16,000,000 pixelsThe bitmap fitted to the column, scaled upThe point of the viewer is to see more than the column shows.
Where the viewer livesIn the reader pageIn widgetsOnly the reader opens it; a part of a screen moves to widgets when a second page needs it.
How often a figure is drawn for the viewerAt densities that are powers of twoAt every zoom; once at the largest zoomEvery step would rasterise and keep a new image; one large raster costs memory at every zoom and blurs when reduced far.

Prior art

ApplicationTaken from itLeft behind
Apple Books for the MacCover-first shelves, single-page reading with quiet controls, an always-visible page number, a reading position slider, and page tonesStore, two-page spreads, collections, and annotations
CalibreA library that owns copies of the books; converting on import; an editor with source and previewA database as the source of truth; a window per tool
ZedEntities as models; tasks owned by their entity; nothing blocking on the main thread

Settled and open questions

Proposed and not confirmed by the format author:

QuestionProposed
How a row of the catalogue is encodedThe value types of redb, without a serialisation crate
Notarising the macOS build, and a certificate of an authority for WindowsNot done: the certificate is self-signed
A release for LinuxNot built
The limits of conversion and of the picture cache on a compact deviceNot chosen
The Android package nameio.github.m_compressors.mbook: the identifier of the bundle, with _, since a package name has no -
The oldest AndroidAPI 26, where Vulkan is part of the platform, as gpui-mobile chose
The architectures of the APKarm64-v8a only
The keystore of the APKA PKCS #12 keystore generated for the project, kept as the secret ANDROID_KEYSTORE; not yet generated
A pre-release on AndroidGets the versionCode of its release, so the release does not replace it; releases are tagged vX.Y.Z only
The formats registeredAll of BOOK_FILE_EXTENSIONS, .zip and .txt among them; mbook owns .mbook only

Needs a change outside this crate:

The first version answered the questions a spike was to answer:

QuestionAnswer
Do the macros of GPUI compile under the lints of the workspace?Yes, with unsafe_code = "forbid" and Clippy's pedantic denied.
Does the Markdown view of GPUI Kit tell which block is at the top?It lays out one item per top-level block, in the order of the source, but does not give its offset. The application keeps the offsets markdown finds and maps one to the other.
Does it reserve the size of a picture that is loading?No: a pending picture is measured as a small square. The application hands it a transparent picture of the final size first.
Can GPUI announce a message, and give an element a language?It has no live regions and no language. See Accessibility and What is implemented.
Is there a GPUI backend for Android?Not for GPUI Fast. gpui-mobile is one for gpui-pre, and the application runs on it: checked on 2026-11-23 on a phone with Android 16.

Not answered: how the Markdown view behaves with one chapter of several megabytes, and whether the system's setting for more contrast reaches the application.

Future possibilities

  • Two-page spreads, which need two independently positioned columns.
  • Scrolling from one chapter into the next.
  • A shell for iOS. gpui-mobile has an iOS platform too; it needs an Xcode project and the scenes the iOS 27 SDK requires (longbridge/gpui-mobile#44).
  • The insets of the system from gpui-mobile, which would lift the API 35 limit of the theme, and its host-driven entry point, which survives a recreated activity.
  • Highlights, notes and bookmarks, stored beside the reading place.
  • Collections in the library.
  • A journal of unsaved edits, replayed after a crash.
  • Undo for changes of structure.
  • Links that follow a renamed chapter: the links of other chapters into it would be rewritten.
  • Turning automatic contents into a list, for an author who wants to leave headings out of the contents.
  • Showing where a picture is used, and offering to remove the ones no chapter refers to.
  • Conversion progress and cancellation, when mbook-converter has them.