libnica icon indicating copy to clipboard operation
libnica copied to clipboard

Upstream the clr-boot-manager features

Open ikeydoherty opened this issue 8 years ago • 4 comments

clr-boot-manager has a whole bunch of really nice APIs, which should be in libnica itself

Notably:

  • CbmWriter - a failsafe memstream based stream writer ✓
  • CbmMappedFile - a very simple mechanism for working with mapped files (with autofrees) ✓
  • File manipulation functions (atomic copies, etc) ✓
  • A trivial log mechanism (expand this to be libraryfied) ✓
  • Better string functions (string_printf) ✓

Perhaps:

  • Filesystem APIs which allow overriding the process-space vtable for all file ops? Enables easy, safe mocking (would be nice)
  • Port the cmdline reader into a generic config reader? Especially with the *.d/*.conf support (very low priority, ideally just nice "read this thing" APIs) (meh. maybe)

ikeydoherty avatar Apr 07 '17 18:04 ikeydoherty

@bryteise wouldn't mind your thoughts on this :)

ikeydoherty avatar Apr 07 '17 18:04 ikeydoherty

I like the idea of the API providing a file ops vtable. Kind of a pain to write yourself every time you want to do something.

The commandline reader is also not a bad one but I'd wait until there are a few example applications doing git/ip style subcommands first.

The rest is pure steal it now please.

bryteise avatar Apr 07 '17 19:04 bryteise

Sure, I'll keep the coverage up in our submodule, and then we can drop our versions from CBM, which in turn should balance the coverage out over there too :]

ikeydoherty avatar Apr 07 '17 19:04 ikeydoherty

OK I've annotated the initial issue to indicate whats what :)

ikeydoherty avatar Apr 07 '17 19:04 ikeydoherty