1
0
Fork
You've already forked scrap
0
New block based programming language, with advanced features, built from ground up in C
  • C 98.2%
  • Makefile 1%
  • C++ 0.7%
2026年02月27日 22:32:22 +03:00
.github Try to fix uploading files in release.yml 2026年02月27日 22:32:22 +03:00
data Add various icons to buttons and windows 2026年01月26日 20:24:03 +03:00
examples Add colors to custom blocks in neon example 2026年01月13日 20:08:08 +03:00
external Update Raylib to latest commit 2025年12月24日 21:35:55 +03:00
extras Update screenshots 2025年02月04日 21:02:40 +03:00
raylib @fc843dc557 Update Raylib to latest commit 2025年12月24日 21:35:55 +03:00
src Fix compiler errors & warnings 2026年02月27日 22:03:40 +03:00
translations "color" ru translation 2026年02月03日 19:21:28 +03:00
.gitignore Move build artifacts into build/ folder & cleanup Makefile 2025年12月13日 01:01:16 +03:00
.gitmodules Add raylib submodule 2025年01月05日 18:07:46 +03:00
CHANGELOG.md Add changelog date 2026年02月27日 22:12:16 +03:00
default.nix Add NixOS support ( #58 ) 2026年02月27日 00:03:14 +03:00
LICENSE Update copyright year 2026年01月01日 15:18:32 +03:00
Makefile Fix dynamic linking with libzstd.dll 2026年02月07日 14:02:43 +03:00
README.md Add NixOS support ( #58 ) 2026年02月27日 00:03:14 +03:00
scrap.desktop Automate package process 2024年12月30日 17:35:12 +03:00
scrap.rc Add an icon for windows executables 2025年01月07日 14:39:39 +03:00

Scrap splash

Scrap

CI build Version Downloads License

Scrap is a new block based programming language with the aim towards advanced users. It is written in pure C and mostly inspired by other block based languages such as Scratch and its forks such as Turbowarp.

Warning

Scrap is currently in Beta stage. Some features may be missing or break, so use with caution!

Notable advantages from scratch

  • (LLVM only) Faster runtime. The speed is achieved using compilation through LLVM
  • The addition of separate else if, else blocks (C-end blocks as i call them), which eliminates a lot of nested checks with if-else blocks (i.e. more flexible variant of if-else block in Snap!)
  • Variables can have a lifetime, which avoids variable name conflicts and allows to make temporary variables
  • Custom blocks can return values and can be used as an argument for other block
  • Various string manipulation blocks and bitwise operator blocks
  • Data type conversion functions
  • More strict checks for and blocks. Now they are case sensitive and will check data type for equality
  • Lists are now a data type instead of a different type of variable, this allows nesting lists inside a list
  • The code runs in a separate thread. This solves some performance issues compared to Scratch
  • Modularized interface. Most of the interface can be rearranged or moved to another tab
  • (LLVM only) Standalone builds. Scrap projects can be built and run as native executables without significant runtime overhead

Controls

  • Click on blocks to pick up them, click again to drop them
  • Hold Ctrl to take single block, Alt to duplicate blocks and Shift to pickup/drop multiple block chains
  • Hold left mouse button to move around code space
  • Holding middle mouse button will do the same, except it works everywhere
  • Press Tab to jump to chain in code base (Useful if you got lost in code base)
  • Press F5 to run the project. Press F6 to stop it.
  • Press arrow keys while the block is highlighted to move the block cursor around
  • Press Enter to enter the highlighted text box and Esc to leave that text box
  • Press S to open block search menu

Binary Installation

Github releases

See Releases page for all available download options for Windows, Linux as well as their respective LLVM builds

AUR

Scrap is now available for download from Arch User Repository (AUR) as scrap-git package. This package will download and build latest Scrap commit from git (LLVM PKGBUILDs are coming soon)

To install Scrap from AUR you can use your preferred AUR helper, for example with yay:

yay -S scrap-git

Building

Dependencies

Scrap requires these dependencies to run:

  • gettext
  • LLVM (Only required if building with USE_COMPILER=TRUE flag)

Currently Scrap can be built for Windows, Linux, MacOS and FreeBSD.

Download commands for Windows (MSYS2 UCRT64)

pacman -S mingw-w64-ucrt-x86_64-gcc make gettext
ln -sf "${MSYSTEM_PREFIX}/bin/windres.exe" "${MSYSTEM_PREFIX}/bin/x86_64-w64-mingw32-windres"

Download commands for Windows (LLVM) (Experimental)

If you are going to compile with USE_COMPILER=TRUE flag, then you need to install additional dependencies:

pacman -S mingw-w64-ucrt-x86_64-llvm

Download commands for Debian

sudo apt install libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev gettext

Download commands for Arch linux

Download command for arch-based distributions:

sudo pacman -S libx11 libxrandr libxi libxcursor libxinerama gettext

Download commands for OpenSUSE

Download command for openSUSE:

sudo zypper install libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel gettext

Build

Before building the repo needs to be cloned along with its submodules. To do this, run:

git clone --recursive https://github.com/Grisshink/scrap.git
cd scrap

Windows build

NOTE: This guide will assume that you have MSYS2 installed and running on your system.

After that, run the following commands:

make -B TARGET=WINDOWS
./scrap.exe

NOTE: When running make clean MSYS2 will occasionally drop you into command prompt. To fix this, just type exit in the cmd and the cleanup process will proceed

Linux build

To build and run Scrap on linux you need to install gcc (10+) and make. After install, just run following commands:

make -j$(nproc)
./scrap

FreeBSD build

To build and run Scrap on FreeBSD you need to install gcc (10+) and gmake. After install, just run following commands:

gmake MAKE=gmake -j$(nproc)
./scrap

NixOS build

To build and run Scrap on NixOS, just run the following commands:

nix-shell
make -j$(nproc)
./scrap

MacOS build

Warning

MacOS build is not being tested right now, so it may not work properly or not at all, you have been warned!

To build and run Scrap on macOS, you need to install gcc (10+) and make. First, install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After that, you need to run the following commands:

brew install gettext
make -j$(nproc) TARGET=OSX
./scrap

Thanks to @arducat for MacOS support.

Screenshots

Screenshot1 Screenshot2 Screenshot3

Wait, there is more?

In examples/ folder you can find some example code writen in Scrap that uses most features from Scrap

In extras/ folder you can find some various artwork made for Scrap. The splash art was made by @FlaffyTheBest, the logo was made by @Grisshink with some inspiration for logo from @unixource, the wallpaper was made by @Grisshink

License

All scrap code is licensed under the terms of zlib license.