Coder Social home page Coder Social logo

universal-sierra-compiler's Introduction

Universal-Sierra-Compiler

Universal-Sierra-Compiler is the tool for Sierra compilation. It compiles any ever-existing Sierra version to CASM.

Supported Sierra Versions
1.5.0
~1.4.0
~1.3.0
~1.2.0
1.1.0
1.0.0
0.1.0

Installation

To install the binary on your PATH run the following line

curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh

...
universal-sierra-compiler (v1.0.0) has been installed successfully.

๐Ÿ“ Note

If the script can't add installed binary to the PATH, it will print the instructions about adding it manually.

Usage

Tool consist of two subcommands:

  • compile-contract
  • compile-raw

The first one compiles Sierra of the Starknet contract, while the second one compiles Sierra of the plain Cairo code.

compile-contract subcommand

The input of this subcommand is a path to a file with Sierra of the contract (cairo_lang_starknet_classes::contract_class::ContractClass) in json format:

$ universal-sierra-compiler \
  compile-contract \
  --sierra-path ./path/to/sierra.json
  
{"bytecode": ...}

๐Ÿ“ Note

Please, note that the output is in the JSON format.

To automatically save CASM, pass --output-path argument:

$ universal-sierra-compiler \
    compile-contract \
      --sierra-path ./path/to/sierra.json
      --output-path ./path/to/casm.json

compile-raw subcommand

The input of this subcommand is a path to a file with Sierra program (cairo_lang_sierra::program::Program) in json format:

$ universal-sierra-compiler \
    compile-raw \
      --sierra-path ./path/to/sierra.json
  
{"assembled_cairo_program": ...}

๐Ÿ“ Note

Please, note that the output is in the JSON format.

To automatically save assebled cairo program, pass --output-path argument:

$ universal-sierra-compiler \
    compile-raw \
      --sierra-path ./path/to/sierra.json
      --output-path ./path/to/casm.json

universal-sierra-compiler's People

Contributors

war-in avatar arcticae 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.