Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Oct 27, 2024
1 parent 57214d6 commit ea841ba
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 64 deletions.
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
[![CJIT logo](docs/cjit-logo.png)](https://dyne.org/cjit)
[![CJIT logo](docs/cjit-logotype.png)](https://dyne.org/cjit)

# Use C as a scripting language
CJIT is a lightweight, free and open source C interpreter that lets you run C code instantly, without needing to build it first.

This is a portable C interpreter (and compiler) based on tinycc and capable of
executing C code as-is at runtime, without a build step. It also supports a
curated selection of functions from included libraries.

When using CJIT there is no need for any toolchain, library, headers
or other files, only its executable interpreter is needed.

The idea of JIT compilation and execution for a C-like language is
inspired by Terry Davis, the author of TempleOS, and Fabrice Bellard,
the author of FFMpeg and TinyCC, whose in-memory compiler
implementation is used inside CJIT.

[![software by Dyne.org](https://files.dyne.org/software_by_dyne.png)](http://www.dyne.org)
More info on [Dyne.org/CJIT](https://dyne.org/cjit).

## Downloads

We provide ready to execute binary builds as releases on github.

- [cgit - Windows x86 64bit](https://github.com/dyne/cjit/releases/latest/download/cjit.exe)
- [cgit - Linux ELF x86 64bit](https://github.com/dyne/cjit/releases/latest/download/cjit)
We provide ready to execute binary builds on [github releases](https://github.com/dyne/cjit/releases).

Beware windows defender will warn you that there is a virus in the file.

There isn't, this is the [latest release analysis on VirusTotal](https://www.virustotal.com/gui/file/77054b14b5960eaa655bb5c3d5f4f1ddd3ddbd9756136f029074bbef83e168fd/).
There isn't, this is the [0.6.2 release analysis on VirusTotal](https://www.virustotal.com/gui/file/77054b14b5960eaa655bb5c3d5f4f1ddd3ddbd9756136f029074bbef83e168fd/).

## Quick start

Expand All @@ -42,14 +27,16 @@ int main(int argc, char **argv) {
exit(0);
}
EOF
./cjit hello.c
```
You can now play around with `hello.c` and write your own C code, which can be simply executed with this command:
```
./cjit hello.c
```
If you install `cjit` into your path then you can `chmod +x hello.c` and execute it directly: the hash bang on first line is supported.

If you install `cjit` into your path then you can execute scripts directly:
```
#!/usr/bin/env cjit
```
this hash-bang on first line is supported!

## Build from source

Expand All @@ -63,6 +50,8 @@ There are various build targets, just type `make` to have a list:
musl-linux 🗿 Build a fully static cjit using musl-libc on Linux
linux-x86 🐧 Build a dynamically linked cjit using libs found on Linux x86
win-wsl 🪟 Build cjit.exe for WIN64 on an Ubuntu WSL VM using gcc-mingw-w64
win-native 🪟 Build cjit.exe for WIN64 on Windows Server
apple-osx 🍎 Build cjit.command for Apple/OSX using clang static
_
------ __ Debugging targets
linux-asan 🔬 Build using the address sanitizer to detect memory leaks
Expand All @@ -77,11 +66,13 @@ There are various build targets, just type `make` to have a list:

CJIT is copyright (C) 2024 by the Dyne.org foundation

CJIT is distributed under the Affero GNU General Public License v3
CJIT is distributed under the GNU General Public License v3

TinyCC is copyright (C) 2001-2004 by Fabrice Bellard

TinyCC is distributed under the GNU Lesser General Public License

For more information on licensing please refer to the Reuse report and
license texts included in LICENSES/.

[![software by Dyne.org](https://files.dyne.org/software_by_dyne.png)](http://www.dyne.org)
8 changes: 2 additions & 6 deletions build/release-intro.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
![CJIT logo](docs/cjit-logo.png)

## CJIT binary releases

This project is in its infancy! You are welcome to get in touch with us via [dyne.org channels](https://dyne.org/contact).
![CJIT card](docs/cjit-mascotte-card.png)

For more information see our [website](https://dyne.org/cjit) and [source repository](https://github.com/dyne/cjit).

![Software by Dyne.org](https://files.dyne.org/software_by_dyne.png)
Contribute! You are welcome to get in touch with us via [dyne.org channels](https://dyne.org/contact).
70 changes: 36 additions & 34 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,56 +42,58 @@ <h1 class="hero-heading">
<p class="hero-subheading">
C, Just in Time!
</p>
<div class="hero-actions">
<div class="hero-actions start-link">
<a href="https://github.com/dyne/cjit/releases" class="hero-action primary">
🤏🏼Single 2MB executable! 💾 Download for Win64, OSX and Linux
🤏🏼Download a single 2MB executable!<br />
💾 Works on Win64, OSX and Linux
</a>
</div>
</div>
</div>
<div style="background: var(--vp-c-bg-alt)">
<div class="container">
<div class="features">
<div class="feature">
<span class="feature-title">🧩 Effortless smart contracts</span>
<span class="feature-subtitle">Create Complex Contracts Without Writing Code</span>
</div>
<div class="feature">
<span class="feature-title">⏱️ Instant Deployment</span>
<span class="feature-subtitle">Deploy Contracts in Seconds</span>
</div>
<div class="feature">
<span class="feature-title">🤖 Seamless Blockchain Integration</span>
<span class="feature-subtitle">Integrate Blockchain Features Effortlessly</span>
</div>
<div class="feature">
<span class="feature-title">🚀 Rapid Prototyping</span>
<span class="feature-subtitle">Prototype Blockchain Applications Rapidly</span>
</div>
</div>
<p>&nbsp;</p>
<p style="padding: 14px 18px">

CJIT is a lightweight C interpreter that lets you run C
code instantly, without needing to build it first. Just
use the executable interpreter—no extra tools, libraries,
or headers required.

Inspired by Terry Davis (TempleOS) and Fabrice Bellard
(FFmpeg, TinyCC), CJIT brings the power of Just-In-Time
(JIT) compilation to C programming.
<!-- <div class="features"> -->
<!-- <div class="feature"> -->
<!-- <span class="feature-title">🧩 Effortless smart contracts</span> -->
<!-- <span class="feature-subtitle">Create Complex Contracts Without Writing Code</span> -->
<!-- </div> -->
<!-- <div class="feature"> -->
<!-- <span class="feature-title">⏱️ Instant Deployment</span> -->
<!-- <span class="feature-subtitle">Deploy Contracts in Seconds</span> -->
<!-- </div> -->
<!-- <div class="feature"> -->
<!-- <span class="feature-title">🤖 Seamless Blockchain Integration</span> -->
<!-- <span class="feature-subtitle">Integrate Blockchain Features Effortlessly</span> -->
<!-- </div> -->
<!-- <div class="feature"> -->
<!-- <span class="feature-title">🚀 Rapid Prototyping</span> -->
<!-- <span class="feature-subtitle">Prototype Blockchain Applications Rapidly</span> -->
<!-- </div> -->
<!-- </div> -->
<!-- <p>&nbsp;</p> -->
<div class="box">
<p style="padding: 8px 8px">
CJIT is a lightweight C interpreter that lets you run C
code instantly, without needing to build it first. Just
use the executable interpreter—no extra tools, libraries,
or headers required.

</p>
Inspired by Terry Davis (TempleOS) and Fabrice Bellard
(FFmpeg, TinyCC), CJIT brings the power of Just-In-Time
(JIT) compilation to C programming. Free and open source!
</p>
<img src="https://github.com/dyne/cjit/blob/main/docs/cjit-mascotte.png?raw=true" width="30%" style="vertical-align:middle;">
</div>
</div>
</div>
<div class="container">
<div style="display: flex; justify-content: center">
<div class="start-link">
<a href="/slangroom/statements/">Download CJIT</a>
<a href="https://github.com/dyne/cjit/releases">Download CJIT</a>
</div>
</div>
<p class="footer-text"> crafted with ❤️‍🔥
by <a href="https://dyne.org"> dyne.org </a> hackers 👽</p>
by <a href="https://dyne.org"> dyne.org </a> - see <a href="https://github.com/dyne/cjit/graphs/contributors">contributors</a>👽</p>
</div>
</div>
</body>
7 changes: 7 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
padding: 20px 14px;
}

.homepage .box {
display: flex;
align-items:center;
margin: auto;
padding: 4px 10%;
}

.homepage .hero {
align-items: center;
display: flex;
Expand Down

0 comments on commit ea841ba

Please sign in to comment.