Coder Social home page Coder Social logo

crun's Issues

just compile

The command -jc, --just-compile can be used to compile a script, without having to run it. The main purpose would be to make debugging the script easier. Any more arguments passed along with this option, should be assumed to be compilation flags.

The command should return the path to where the file is compiled to.

For example:

$ gdb `crun -jc script.c`
$ valgrind --leak-check=yes `crun -jc script.c` arg1 arg2

allow configuring the cache/out directory

The directory where the compiled executables are placed should be made configurable to allow personal cache preferences, different from those implied by using /tmp. For example, one may want to really cache the executables across restarts, thus only compiling again if source changes.

force compilation

We can have the options -fc, --force-compile to force (re-)compilation of the C file. This is useful in cases our script is not changing alot but the libraries employed in the script are changing (e.g. during development).

enable shell eval

Currently, by default, crun evaluates the string in the 2nd line for flags. While this is a pretty neat feature, it can be seen as a vulnerability (or insecure feature). Therefore, it is better to have the feature disabled by default and have the user enable it explicitly. Using an environment variable, such as CRUN_ENABLE_EVAL, or a command-line option, such as --do-eval, this feature will be enabled.

use git annotated tags

To mark releases, we should use signed, annotated tags. It is easier to manage and use rather than SHA-1 OIDs.

maintain line numbers

The stripping off of the first two lines causes the actual file compiled to have different line numbers from the original file. This causes debugging to be a little bit shitty.

A possible solution would be to just place empty lines in place of the first two lines.

detect if C source code does NOT start on 3rd line

Sometimes, one can forget to start source code on the 3rd line. This will almost definitely lead to compilation errors, which are not pretty to look at (of course!). Detecting this bug and showing a helpful error message would be a pretty feature!

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.