gochomugo / crun Goto Github PK
View Code? Open in Web Editor NEWRun C/C++ scripts, just like you would do with Python, Ruby etc.
License: MIT License
Run C/C++ scripts, just like you would do with Python, Ruby etc.
License: MIT License
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
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.
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).
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.
To mark releases, we should use signed, annotated tags. It is easier to manage and use rather than SHA-1 OIDs.
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.