Giter VIP home page Giter VIP logo

idris-cil's Introduction

idris-cil Build Status

A Common Intermediate Language backend for Idris.

Why

Because programmers targeting the CLR deserve a modern pure functional language with dependent types.

Usage

Given a Main.idr file:

module Main

main : IO ()
main = putStrLn "Hello, Idris!"

Compile it to cil and execute it with .NET Core:

idris --codegen cil Main.idr -o HelloWorld.exe \
  && dotnet HelloWorld.exe

The resulting assemblies can also be used with Mono or Unity.

Installing

It's important that the version of the Idris executable matches the version used to build idris-cil:

git clone [email protected]:bamboo/idris-cil
cd idris-cil
stack install idris
stack install

Contributing

Issue reports and PRs are welcome.

Brought to you by @bamboo, @sangamon and contributors.

License

BSD3

Requirements

.NET Core 1.1 with ilasm

Install ilasm using nuget:

dotnet new console -o ilasm-setup
cd ilasm-setup
dotnet add package runtime.osx.10.10-x64.Microsoft.NETCore.ILAsm
cd .. && rm -fr ilasm-setup

Replace the runtime.osx.10.10-x64 prefix above with the right value for your system, for instance, ubuntu.14.04-x64.

Add ilasm to your PATH with something like:

export PATH=$(find $HOME/.nuget/packages -name ilasm | xargs dirname):$PATH

If you get an error from ilasm saying it cannot load libcoreclr.dylib, add the dotnet/shared dir to DYLD_LIBRARY_PATH:

export DYLD_LIBRARY_PATH=/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.2:$DYLD_LIBRARY_PATH

idris-cil's People

Contributors

bamboo avatar bartadv avatar xran-deex avatar simoncropp avatar

Watchers

James Cloos avatar  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.