Giter Site home page Giter Site logo

vlubarsky / scala-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scala-native/scala-native

0.0 2.0 0.0 2.74 MB

Your favourite language gets closer to bare metal.

Home Page: http://scala-native.org

License: BSD 3-Clause "New" or "Revised" License

Scala 96.15% C++ 0.80% Shell 0.04% Python 3.01%

scala-native's Introduction

Scala Native

Join the chat at https://gitter.im/scala-native/scala-native

Build Status

Scala Native is a new ahead-of-time compiler and lightweight managed runtime designed specifically for Scala. Project is currently in pre-release stage. Follow us on twitter to be first to know about upcoming updates.

Features

  • Low-level primitives.

    @struct class Vec(
      val x: Double,
      val y: Double,
      val z: Double
    )
    
    val vec = stackalloc[Vec] // pointer to stack allocation
    !vec = new Vec(1, 2, 3)   // store value to stack
    length(vec)               // pass by reference

    Pointers, structs, you name it. Low-level primitives let you hand-tune your application to make it work exactly as you want it to. You're in control.

  • Extern objects.

    @extern object stdlib {
      def malloc(size: CSize): Ptr[_] = extern
    }
    
    val ptr = stdlib.malloc(32)

    Calling C code has never been easier. With the help of extern objects you can seamlessly call native code without any runtime overhead.

  • Instant startup.

    > time hello-native
    hello, native!
    
    real    0m0.005s
    user    0m0.002s
    sys     0m0.002s
    

    Scala Native is compiled ahead-of-time via LLVM. This means that there is no sluggish warm-up phase that's common for just-in-time compilers. Your code is immediately fast and ready for action.

Community

Documentation

License

Scala Native is distributed under the Scala license.

scala-native's People

Contributors

densh avatar t-hiroyoshi avatar duhemm avatar andreatp avatar lukeindykiewicz avatar fbertra avatar masseguillaume avatar gurinderu avatar timothyklim avatar milyardo avatar phdoerfler avatar sciss avatar alexdupre avatar ankitson avatar felixmulder avatar jentsch avatar nightscape avatar siriux avatar rzoller avatar tuxdna avatar dozed avatar gitter-badger avatar dant3 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.