[neomutt-devel] Latest Development
rich at flatcap.org
Tue Jul 17 12:55:39 CEST 2018
If you've been following out git repo, you're probably in a state of shock.
It's been a busy fortnight, dealing with some serious bugs (UPGRADE NOW)
and doing some major rearranging of the code.
Ages back we started moving all the shared utility code into a separate
library (libmutt). The rules were simple. The code had to be:
- Self-contained -- only dependent on system libraries
- Independently testable -- we have some unit tests (acutest)
- Fully documented -- doxygen: https://neomutt.org/code/mutt.html
- Robust -- check pointers, etc
After that came:
- libhcache -- Header cache
- libncrypt -- Encryption code (gpg,smime)
- libconn -- Low-level socket code
These libraries depend on libmutt, but they aren't as independent;
they still contain references to NeoMutt and curses, etc.
Recently, we've added libemail for all the structs that represent an
email: Header, Body, Envelope, etc. and the associated code to deal with
The final big change was to create libraries for each of the mailbox
A lot of the work done by these mailboxes is controlled through the
Mailbox API: https://neomutt.org/code/structMxOps.html
However the code still contains a lot of #ifdef's for each mailbox type.
These need to be eliminated.
The next big changes are to: protos.h, globals.h and mutt.h
These HUGE monoliths of code contains thousands of prototypes and
definitions. Such a collection is a terrible idea. It obscures the
boundaries between components and means unnecessary recompiles.
To fix this, there are now a lot of new header files, matching the
source files. The problem headers still exist, but now they're much
By using iwyu, we've ensured that each source file has the correct
includes. This makes it easier to find (and break up) dependencies.
To test the libraries, there's the library-test repo:
It contains stub code to call each of the libraries.
With a bit of work, it might soon be possible to write tests for the
individual mailbox types.
Finally, here's a (near future) picture of the architecture:
There's a LOT of work to do.
Unless you help, we'll never get there.
Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the neomutt-devel