An experimental draft of `nodylibs`
Libraries
Features (that I want)
-
Archiving tools into a single binary.
-
Low (if possibly, Zero) overheads
-
Cross-platform supports.
-
No dynamic libraries are required (except proprietary OS pre-installed system libraries).
-
Read-only binary (no FS writing).
-
A feature like a daemon mode.
-
To save process duplications.
-
Can it be realized through a UNIX or TCP socket (like it that responds to the metadata of current running
nodylibsprocesses)? 🤔
-
-
Togglable caching features if possible. But the default strategy must be no caching.
-
A feature that resolves the dependent dynamic linking libraries at the archiving time.
-
Keep fast at the runtime, even if archiving is slow.
-
To extract and modify paths command.
-
Configuration system for the
datadependencies (such as useful for dotfiles management).- It may require running some init scripts. It's useful to manage dotfiles.
Implementations
Binary format
-
Using
.tararchive format:- There's no reason why not to use it! 😼
The directory structures in .tar
example
root.tar
├── bin (executables)
│ ├── bar.elf (Linux)
│ ├── bar.exe (Windows)
│ └── bar.macho (MacOS)
├── data (data)
│ ├── bar.txt (text document)
│ ├── bar.jpg (JPEG image)
│ └── bar.png (PNG image)
├── init.toml (known information)
└── lib (dynamic libraries)
├── libfoo.dll (Windows)
├── libfoo.dylib (MacOS)
└── libfoo.so (Linux)
-
init.tomlcontains the information that knew at the archiving time. It doesn't have to be in.tomlformat. It should be in a binary format better.- The mapping of the structure?
- file info that can know at the archiving time.
-
bindirectory has some executable format binaries. -
libdirectory has some dynamic linking format binaries.-
They must be resolved and collected at the archiving time.
-
Some optional files are allowed as inputs at the archiving time!
-
-
datadirectory has any type of binary.
implements as a loader?
pros
- It will run in any environment.
cons
-
It is the most difficult implementation because it requires a deep understanding of low-level programming.
-
I don't assume that I can implement it 😇
implementation
- Study hard about low-level programming!
conclusion
- The loader method is not realistic.
implements as a filesystem?
pros
- In a POSIX-like environment, it will probably get high performance with low overheads.
cons
-
Maybe,
FUSEmethods cannot use in MacOS without themac-fuselibrary... -
It will spend coding costs hard to support cross-platform.
-
In a Windows environment, it won't get enough performance...
implementation
-
Using
Dokanfor Windows support? (There's a wrapper for Rust.). Or usingWinFsp-
WinFspis licensed under GPL-v3. is licensed under GPL-v3... -
Dokan(y)is licensed under LGPL.
-
-
Using
FUSEfor POSIX-like OS supports? -
Mounting on TMPDIR in
*nixenvironments.