Giter Site home page Giter Site logo

rcore's Introduction

  Riwux core
+============+

The rcore project aims to provide a minimal but complete commandline
environment containing utilities found on most UNIX(-like) systems.
It's goal is to be simple, portable and compliant while still being pleasant
to use. Features and extensions are chosen carefully and only implemented if
they are either (very) common or provide real value to the user.


  Modules
+=========+

rcore is split into several different subdirectories (i.e modules),
each dedicated to a specific standard or group of utilities.
This adds the possibility to exclude certain tools (e.g. linux/ on BSD systems)
or only select a small subset to be replaced on an already existing system.

posix/ -- POSIX.1-2017 utilities
more/  -- common non-standard utilities
linux/ -- non-portable Linux specific utilities


  Build
+=======+

rcore requires a compiler that implements ISO C99, a libc that conforms to
POSIX.1-2008 and ISO C99 as well as a make(1) implementation that is
POSIX.1-2008 compliant and supports <slash>'es in target names.
To build rcore, follow these instructions:

    $ make            # build the whole project
    $ make all        # same as above

    $ make install    # install utilities
    $ make uninstall  # uninstall utilities
    $ make clean      # remove all binaries and build leftovers

    $ make posix      # only build POSIX utilities
    $ make more       # only build non-standard / more utilities
    $ make linux      # only build Linux specific utilities

    $ make lib           # only build libraries (in lib/)
    $ make posix/src/cat # only build utility specified by the path (i.e. cat).
                         # It might be necessary to build lib/ first

In case you want to customize your build process, change the corresponding
values in config.mak or directly on the commandline.

Supported compilers:
   clang
    $ make CC=clang
   gcc
    $ make CC=gcc
   tcc
    $ make CC=tcc
   cproc
    $ make CC=cproc
   pcc
    $ make LDFLAGS='-L lib/libutil -lutil' CC=pcc


  Conventions
+=============+

* Error messages:

  It's important that error messages are consistent across all utilities
  since they form the base of a system and should feel coherent.
  The format is simple but does not hide any information. It should be
  possible to look at an error message and immediately know what happened.
  The format is specified as follows:


     <utility> [: <function> ['<argument>']] [: <message>]\n


  utility  : The name of the program.
  function : The function that reports the error.
  argument : The argument the function operates on (if any)
  message  : optional useful information (e.g. errno-string)



* Function names:

  Function names that are part of a library (i.e shared accross all tools)
  and have the potential to exit(3) the program are prefixed with 'x_'.
  Those functions local to a utility don't (have to) follow this convention.



* Options:

  Mutually exclusive options (e.g. [-a | -b]) can be specified together
  without resulting in an error. The last option specified is used/active
  while the options prior are ignored and have no effect.

    util -a -b -a -b -a -c

  In this example '-a' will be used by the program since it is the last
  out of the mutually exclusive options 'a' and 'b'. The normal option 'c'
  will be active regardless since it has no relationship with the other
  options.


  Long options are not implemented since they are non-standard and don't
  provide much value. Most of the time they just provide another, longer
  name for an already existing option. They complicate and confuse a program
  without adding functionality or anything useful.

rcore's People

Contributors

tosch42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rcore's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.