From ea841bafbf868345329f501e4ce181bc7fa78bad Mon Sep 17 00:00:00 2001 From: Jaromil Date: Sun, 27 Oct 2024 08:12:16 +0100 Subject: [PATCH] improve documentation --- README.md | 39 +++++++++-------------- build/release-intro.md | 8 ++--- docs/index.html | 70 ++++++++++++++++++++++-------------------- docs/style.css | 7 +++++ 4 files changed, 60 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 01f6045..0098968 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -77,7 +66,7 @@ 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 @@ -85,3 +74,5 @@ 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) diff --git a/build/release-intro.md b/build/release-intro.md index 3c821bb..5082bad 100644 --- a/build/release-intro.md +++ b/build/release-intro.md @@ -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). diff --git a/docs/index.html b/docs/index.html index 24764d7..ee9ea7b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,56 +42,58 @@

C, Just in Time!

-
-
-
- 🧩 Effortless smart contracts - Create Complex Contracts Without Writing Code -
-
- ⏱️ Instant Deployment - Deploy Contracts in Seconds -
-
- 🤖 Seamless Blockchain Integration - Integrate Blockchain Features Effortlessly -
-
- 🚀 Rapid Prototyping - Prototype Blockchain Applications Rapidly -
-
-

 

-

- - 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. + + + + + + + + + + + + + + + + + + + +

+

+ 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. Free and open source! +

+ +
+ by dyne.org - see contributors👽

diff --git a/docs/style.css b/docs/style.css index bed6eaa..4f63827 100644 --- a/docs/style.css +++ b/docs/style.css @@ -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;