diff --git a/COPYING b/COPYING index 09a50d1ce53f9428fe92daed2ceea17cecf790e2..2ff764f6669855608572d02805d805ee786e96df 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2007-2020 Yoran Heling +Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README b/README deleted file mode 100644 index 816ccd34a367a67b843f03eed49fccc321aac72b..0000000000000000000000000000000000000000 --- a/README +++ /dev/null @@ -1,55 +0,0 @@ -ncdu 1.15.1 -=========== - -DESCRIPTION - - ncdu (NCurses Disk Usage) is a curses-based version of - the well-known 'du', and provides a fast way to see what - directories are using your disk space. - - -REQUIREMENTS - - In order to compile and install ncdu, you need to have - at least... - - - a POSIX-compliant operating system (Linux, BSD, etc) - - curses libraries and header files - - -INSTALL - - The usual: - - ./configure --prefix=/usr - make - make install - - If you're building directly from the git repository, make sure you have perl - (or rather, pod2man), pkg-config and GNU autoconf/automake installed, then - run 'autoreconf -i', and you're ready to continue with the usual ./configure - and make route. - - -COPYING - - Copyright (c) 2007-2020 Yoran Heling - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5d1989b49599058a29a7373d7d2746b377ca4509 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# ncdu-zig + +## Description + +Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find +space hogs on a remote server where you don't have an entire graphical setup +available, but it is a useful tool even on regular desktop systems. Ncdu aims +to be fast, simple and easy to use, and should be able to run in any minimal +POSIX-like environment with ncurses installed. + +## This Zig implementation + +This branch represents an experimental rewrite of ncdu using the [Zig +programming language](https://ziglang.org/). It is supposed to be fully +compatible (in terms of behavior, UI and CLI flags) with the C version, so it +can eventually be used as a drop-in replacement. + +Since Zig itself is still very much unstable and things tend to break with each +release, I can't in good conscience publish this rewrite as a proper release of +ncdu (...yet). I intent to maintain the C version as long as necessary while +Zig matures and gets more widely supported among Linux/BSD systems. + +This rewrite is a test-bed for various improvements to the design of ncdu that +would impact large parts of its codebase. The improvements may also be +backported to the C version, depending on how viable a proper Zig release is. + +### Implementation status + +Missing features: + +- Export/import +- Most directory listing settings +- Scaning UI +- Lots of informational UI windows +- Directory refresh +- File deletion +- Opening a shell + +### Improvements compared to the C version + +Already implemented: + +- Significantly reduced memory usage, achieved by: + - Removing pointers between nodes that are not strictly necessary for basic + tree traversal (this impacts *all* code in the C version of ncdu). + - Using separate structs for directory, file and hard link nodes, each storing + only the information necessary for that particular type of node. + - Using an arena allocator and getting rid of data alignment. +- Improved performance of hard link counting (fixing + [#121](https://code.blicky.net/yorhel/ncdu/issues/121)). +- Add support for separate counting hard links that are shared with other + directories or unique within the directory (issue + [#36](https://code.blicky.net/yorhel/ncdu/issues/36)). + (Implemented in the data model, but not displayed in the UI yet) +- Faster --exclude-kernfs thanks to `statfs()` caching. +- Improved handling of Unicode and special characters. + +Potentially to be implemented: + +- Faster --exclude-pattern matching +- Multithreaded scanning + +### Regressions compared to the C version + +Aside from this implementation being unfinished: + +- Assumes a UTF-8 locale and terminal. +- No doubt somewhat less portable. + +## Requirements + +- Latest Zig compiler +- Some sort of POSIX-like OS +- ncurses libraries and header files + +## Install + +**todo**