百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CToy

> 编程语言
开源

交互式 C 编码环境

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

交互式 C 编码环境

C-Toy ==== C-Toy is an interactive C(99) coding environment based on [TCC](http://bellard.org/tcc/). Small, simple, no bullshit. Write cross-platform C code and see the result immediately. No installation or compiler required, download (<4mb), unzip, run CToy and play. Ready for Windows, MacOSX and Linux. Ideal for prototyping, learning, teaching... Features -------- * CToy: program update on file save (use any text editor) * CToy_player: to publish your project (dynamic update disabled) * API for window managment, inputs, persistent memory... * Image processing with [MaratisTCL](https://github.com/anael-seghezzi/Maratis-Tiny-C-library) * OpenGLES-2 * OpenAL * Portable pen-tablet support (Wacom, etc) * Use C-symbols from native dynamic libraries (*.dll etc) : just copy libraries in your_ctoy_path/lib/ * Pre-built Dear-Imgui suport (https://github.com/ocornut/imgui) * Can also compile your project with other compilers (CMake script for gcc, vs, mingw) * Emscripten compatible Download -------- [- CToy 1.06 Win64](http://anael.maratis3d.com/ctoy/bin/CToy-1.06-WIN-x86_64.zip)
[- CToy 1.05 MacOSX](http://anael.maratis3d.com/ctoy/bin/CToy-1.05-OSX_10.6-x86_64.zip)
[- CToy 1.05 Linux64](http://anael.maratis3d.com/ctoy/bin/CToy-1.05-Linux64-x86_64.zip)
[- [all versions]](http://anael.maratis3d.com/ctoy/bin/) Requirement For Linux: OpenAL Getting started --------------- - Launch CToy - Open src/main.c using your favorite text editor - Start coding (samples included) - Save your file(s) and see the result in realtime

Usage ----- C-Toy expects a main file in src/main.c.
But instead of the standad C "main" function, the entry points are "ctoy_begin", "ctoy_main_loop" and "ctoy_end". The compulsory "Hello, World!" program is then (in src/main.c):
```c #include // ctoy API (including frequently used ANSI C libs) void ctoy_begin() // called at the beginning of the program { printf("Hello, World!\n"); } void ctoy_main_loop() // called at every update of the main loop {} void ctoy_end() // called at the end of the program {} ``` Every time you modify src/main.c or any other file connected to it (directly or recursively included), C-Toy will recompile and restart the program dynamically. One other difference with standard C is the use of persistent memory to maintain a bloc of memory intact between recompiles. For example: ``` … ``` (You can store any data that was manually allocated with malloc, it can be an array or a global pointer. Just avoid storing function pointers, as functions addresses may change after recompiles, or update them after calling ctoy_retrieve_memory) Documentation ------------- C-Toy API: https://github.com/anael-seghezzi/CToy/blob/master/ressources/include/ctoy.h
MaratisTCL: https://github.com/anael-seghezzi/Maratis-Tiny-C-library
OpenGLES2: https://www.khronos.org/registry/OpenGL-Refpages/es2.0/
OpenAL: https://www.openal.org/documentation/OpenAL_Programmers_Guide.pdf
Tutorials and examples ---------------------- Wiki: https://github.com/anael-seghezzi/CToy/wiki License ------- CToy is licensed under the zlib/libpng License. Building CToy from sources (CMake) ---------------------------------- **Unix:** mkdir Build cd Build cmake -G "Unix Makefiles" ../ -DCMAKE_INSTALL_PREFIX=../bin -DCMAKE_BUILD_TYPE=Release make make install **Windows:** mkdir Build cd Build cmake -G "Visual Studio 11 Win64" ../ -DCMAKE_INSTALL_PREFIX=../bin (libtcc.dll and libtcc.dylib where pre-built from a fork of tcc: [libtcc-fork](https://github.com/anael-seghezzi/tcc-0.9.26))

GitHub Issues· 6 开放

在 GitHub 查看全部
  • #33

    add GetJoystickName to joystick functionset

    更新于 2026年7月16日
  • #32

    Error running the CToy binary on Linux

    更新于 2025年12月1日
  • #19

    [Feature Request] Official RaspberryPi Package

    enhancementhelp wanted更新于 2023年12月13日
  • #27

    [RFC] A CToy based Linux distro

    invalid更新于 2023年11月20日
  • #24

    Change when tcc build fail, fallback to previous working copy of program instead of blocking

    enhancement更新于 2023年1月29日
  • #25

    Add ability to run any source file through a command line option

    enhancement更新于 2021年9月18日

核心特点

  • •CToy: program update on file save (use any text editor)
  • •CToy_player: to publish your project (dynamic update disabled)
  • •API for window managment, inputs, persistent memory...
  • •Image processing with MaratisTCL
  • •OpenGLES-2
  • •Portable pen-tablet support (Wacom, etc)
  • •Use C-symbols from native dynamic libraries (*.dll etc) : just copy libraries in your_ctoy_path/lib/
  • •Pre-built Dear-Imgui suport (https://github.com/ocornut/imgui)
  • •Can also compile your project with other compilers (CMake script for gcc, vs, mingw)
  • •Emscripten compatible

> 标签

C++livecodingtcc

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言