Giter Club home page Giter Club logo

laye's Introduction

Laye

A systems programming language that wears its love for C on its shoulder.

Philosophy

C is by no means perfect, nor is Laye trying to be perfect in its stead. Rather, Laye understands that C is here to stay for the foreseeable future, and wants to peacefully co-exist with established C code while supporting modern and (hopefully) sensible language features to the table. To achieve this, Laye allows seamless importing of C source files, most commonly the public headers, into any Laye source file. In addition, Laye provides lightweight FFI to expose its own functions and data types to C.

Requirements

  • Any standard compliant C17 compiler (we like Clang)
    • If your compiler does not support an address sanitizer with the -fsanitize=address option or you don't have one installed, see the build configuration options for the option to disable it.
  • Clang 18 specifically to compile the IR generated by the LLVM backend
  • CMake for running fchk tests (see testing)

NOTE: The build system currently inherits whatever compiler you use to build it. All of the examples here use Clang, so the the project will also be built with clang. If you want to build Laye with GCC instead, replace instances of clang with gcc and that will propogate.

Building

  1. Build Nob

    This project uses a version of the Nob build system by Tsoding included with this repository.

    $ clang -o nob nob.c
  2. Run Nob Nob will automatically rebuild itself if any changes are made to the build script.

    $ ./nob

    You can run ./nob --help to see all of the commands and configuration available to you, and ./nob <command> --help for help filtered specifically to that command. By default, the build subcommand is assumed.

Usage

$ ./out/laye1 [options...] files...

Run ./out/laye1 --help for a list of avaliable options.

Testing

The test suite is written for the fchk tool, which has a few additional dependencies as listed in requirements.

$ ./nob test

Tests are located in the ./test directory. Each test file is a source file which defines the test inline, as well as how it should be invoked by the tooling. Read the fchk documentation to understand how it works.

Editor Support

Laye has a Visual Studio Code extension for syntax hilighting. Find it here.

License

The source code of this repository is dual-licensed: either the MIT license or in the public domain. You can choose whichever suits you best. See the license file for the high level details on each. The license applies only to source files which contain a copy the license information within them; this means, for example, that the "Laye" name is not in the public domain, only the source files of this implementation of its compiler.

Contributing

See the documentation on contributing in the GitHub project wiki.

laye's People

Contributors

nashiora avatar mrmugame avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.