Skip to content

Priyankay151/CTRust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRustC

Transpile Rust to C.

Note from developers

We have only completed upto syntax analysis part of transpiler, The checkSyntax.sh only checks for syntatically errors/

Goal of project

This project intends to transpile a code written in Rust to C. For phase 1 we consider only selected aspects of Rust. We may later improve the transpiler to transpile standard Rust. We hereby define TRust as subset of Rust which may not contain all features.

TRust

Please refer TRust Doc (if link broken then please go to docs folder and TRust.md) to know the syntax of Rust and which feature subsets we have implemented.

Installation

Clone

  • Clone this repo to your local machine.

Setup

  • change directory to CTRust folder.

Install Bison and Flex

CTRust$ sudo apt-get install bison flex

Make ./build.sh executable

CTRust$ sudo chmod +x ./build.sh

Make ./build/checkSyntax.sh executable

CTRust$ sudo chmod +x ./build/buildSyntax.sh

Run ./build.sh, this generates a executable in build folder.

CTRust$ ./build.sh

change directory to build and execute checkSyntax.sh on appropriate rust script.

CTRust$ cd build
CTRust/build$ ./checkSyntax.sh test.sh

About

Front end of complier for Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Yacc 59.8%
  • Lex 23.7%
  • Rust 13.4%
  • Shell 3.1%