Giter Site home page Giter Site logo

rmmc's Introduction

[[Abandoned Project]]RMMC - Rust Minus Minus Compiler

Unit Test badge Ubuntu badge macOS badge RISC_V

Introduction to RMM/R-- (Rust Minus Minus)

RMM is an intuitive, safe, functional programming language.

RMM is a rust-like language but has much fewer restrictions.

  • Reference validator ensure references are always valid.
  • No borrow concept. No check for data race. (Easy linked list)
  • Move of ownership must be explicit.
  • Allow implicit type cast. (Can be disabled by compiler option)
  • Allow raw pointer operation but it is not necessary and not safe.
  • Functional programming: All function is treated as a variable.
  • No more implicit return
  • Auto memory management without Garbage collection.

Full documentation is available here.

RMMC command line options


Short form Long from Require argument Description
-o --output Yes Specific output file name
--genAST optional Output AST in xml format.
Default filename is AST.xml.
--stdpath Yes Standard library path (Enable stdlib)
-I --import Yes Specify modules search path

Environment and Support Packages

  • Architecture: RMMC standard library only supports RISC-V. However, it should compile on other architecture (Darwin or Linux). We recommend using a docker. See Docker setup.
  • Flex/Bison: Recommended Bison > 3.8 and flex > 2.6. If you are using a old version of bison, you may need to remove -Wcex flex for debug build.
  • Google Test: Google test is used for unit test only. Install only if you need to run tests. See Google Test installation.

Google Test Framework Installation


1. Grab source code

apt install libgtest-dev -y

2. Install cmake

apt-get install cmake

3. Compile the library

cd /usr/src/gtest
cmake CMakeLists.txt

Docker Environment installation


1. Clone this Github Repository

Clone this Repo into your local filesystem :

git clone https://github.com/TerenceNg03/RMMC.git

2. Pull Ubuntu 20.04 (RISC-V) version from Official Image

Run this line in terminal :

docker pull riscv64/ubuntu:20.04

3. Create a Container from the Image and Mount Local Files

Execute this command in your cloned directory!
Create a container named Yacc and mount current directory as /home/RMMC:

docker create -it -v `pwd`:/home/RMMC --name Yacc -w /home riscv64/ubuntu:20.04

4. Start and Enter the Container

It is required to start the container before executing it :

docker start Yacc
docker exec -it Yacc /bin/bash

5. Install Lex&Yacc

Note: Please execute these commands inside docker.

apt update
apt-get install bison flex make g++ vim clang llvm

6. Test Your Installation

Note: Please execute these commands inside docker.

yacc --version
lex --version

7. Stop the Container

docker stop Yacc

rmmc's People

Contributors

terenceng03 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

liuyuying03

rmmc's Issues

rmm_types should use iterator instead of vector

Currently the constructor is accepting vectors. Time to immigrate to iterator like the make_types functions.

Should be

template <
	typename Iter,
	std::enable_if_t<(std::is_same<typename std::iterator_traits<Iter>::value_type
		, std::pair<std::string, rmm_type>>::value), std::nullptr_t> = nullptr
>
rmmc::compound_type::compound_type(std::string name, Iter begin, Iter end);

instead of

rmmc::compound_type::compound_type(const std::string& name, 
	const std::vector<std::pair<rmm_type, std::string>>& t);

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.