The Mesche Compiler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
David Wilson c34c9d4e02
cli: build: Mesche library deps primarily come from Codeberg
2 months ago
.github/workflows ci: Upload library and CLI artifacts to build 3 months ago
components cli: build: Mesche library deps primarily come from Codeberg 2 months ago
scripts compiler: Add support for Emscripten builds 2 months ago
.clang-format Add .clang-format configuration 11 months ago
.gitignore meta: Add bootstrap.sh, simplify compiler and CLI build scripts 3 months ago
LICENSE Add README.org and LICENSE 12 months ago
README.org Update README.org 5 months ago
manifest.scm compiler: Add support for Emscripten builds 2 months ago
project.msc compiler: Add support for Emscripten builds 2 months ago

README.org

Mesche Compiler

Mesche is a programming language that is designed for integration in C applications.

It is used as a high-performance scripting language to drive C applications and enable interactive development of program behavior. The compiler and runtime can be compiled directly into the C application so that this interactivity is available even in shipped applications.

Principles

  • Simple: The compiler and runtime should be easy to understand and debug.
  • Extensible: The language will be extensible through macros, Mesche modules, and easy registration of C functions into the runtime.
  • Practical: Provides tools to build C/C++ projects that use Mesche (`mesche build`) and also manage project dependencies, especially those containing Mesche modules.

Use cases

  • Developing hackable tools for creative work (video and music production, writing, task management)
  • Game development with the Substratic Engine
  • Mobile application development (in the future)

Should I use this?

Probably not, this project is highly experimental and will probably change frequently. However, if you find the idea interesting and would like to try it, I would certainly be happy to have your feedback!

Features

  • Compiles directly to bytecode running on a custom VM
  • First-class functions with closures
  • First-class delimited continuations via reset and shift
  • Tail-call optimization for recursive algorithms and loops
  • Modules can be defined and loaded into Mesche projects
  • Record types with fast setter and accessor functions
  • Native function registration for integrating with C APIs
  • Supports running a VM per OS thread (theoretically, but not tested)
  • Cross-platform build orchestration, dependency management, and release builds with mesche build and mesche cli: https://github.com/mesche-lang/cli

Future Features

  • A set of persistent data structures a la Clojure
  • Support for Windows, macOS, and Android
  • Hygenic macro definitions following Scheme's design
  • Authoring C API bindings directly in Mesche code to generate C wrappers
  • APIs for working with dynamic arrays of C structures

License

This project is licensed under the BSD 3-Clause License.