Giter Club home page Giter Club logo

grain's Introduction

Grain CI Workflow License: LGPL v3 GitHub version

The Grain Compiler

Grain is a new programming language that compiles to WebAssembly. For more information about the language, check out grain-lang.org.

If it's your first time here, it's highly recommended that you follow the Grain guide to get up and running!

Contributing

There are tons of ways to contribute to Grain. Check out our contributing guide for more info and come chat with us on Discord! All contributors are held to our contributor code of conduct.

Building

To build Grain, you'll need yarn and Node.js version 14 or higher. To get everything set up, run:

yarn
yarn setup
yarn compiler build

This will set up the Grain runtime, standard library, and CLI.

If running tests is your kind of thing, run

yarn compiler test

If you are using vscode as your editor, we recommend you run:

yarn vscode

This will create local settings that point OCaml LSP to our compiler directory. Then, you should be able to use the OCaml Platform extension!

Other Commands

To build the standard library:

yarn stdlib build

To build the runtime:

yarn runtime build

To link the CLI:

yarn cli link

To reset your compiler build:

yarn compiler clean

To navigate tasks available in the system:

yarn run

This will display an interactive session where you can select the project and command you want.

Running Grain Programs

You can run programs using the Grain CLI:

echo "print('Hello world')" > hello.gr
grain hello.gr

Alternatively, you can invoke the compiler directly:

grainc hello.gr

Copyright ยฉ๏ธ 2017-2020 Philip Blair and Oscar Spencer.

grain's People

Contributors

dependabot[bot] avatar designsbysm avatar jacobginsparg avatar nickbreaton avatar ospencer avatar peblair avatar phated avatar torch2424 avatar tyreldenison avatar

Watchers

 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.