Git Product home page Git Product logo

mira's Introduction

Logo

License Language Support Platform Support

Mira

The Mira Programming Language and Toolchain
Report a bug · Request a feature

Table of Contents

Warning

⚠️ Caution: Experimental and Early Development ⚠️

This programming language is currently in early stages of development. Use with caution! This language is highly experimental and may not have all the safety features in place.

Expect rapid changes, and be aware that the language is not yet stable for production use. Feedback and contributions are welcome.

(to the top)

Overview

Welcome to mira, a stack-based, concatenative low-level programming language designed for loosing your mind and shooting yourself in the foot. It compiles to NASM Linux x86_64 assembly, with plans for supporting additional architectures in the future.

This language already supports many (and too often taken for-granted) features commonly found in various programming languages while maintaining a low-level approach, allowing for close interaction with the underlying hardware.

Features

Here is the list of the main features the language has:

  • sections, functions, memories, and strings
  • if-else and loops blocks
  • inline native assembly
  • comments :)
  • arithmetic, bitwise, and logical operations
  • comparison operators
  • intrinsic functionalities like syscalls and stack manipulation operations
  • very minimal std library

(to the top)

Getting Started

#ifndef __main_mira__
#define  __main_mira__

#include "std/posix.mira"
#include "std/io.mira"

sec .rodata str hello "hello, world!\n\0"

sec .text fun _start {
	hello call put_cstr
	0 call exit
}

#endif

To get started with mira, follow these simple steps:

Cloning

Clone the mira repository from GitHub as follows:

> git clone https://github.com/joba14/mira.git <path-to-be-cloned-to>

Building

Navigate to the project directory and run the build script or compiler. This will generate the executable for your specific platform:

> cd <path-to-be-cloned-to>/mirac/scripts
> chmod +x ./*.sh
> ./build.sh debug

Running

To get help and learn more about the compiler, use the following:

> cd mira/mirac/build
> ./mirac --help

Once built successfully, you can run mira programs by providing the source code file as an argument to the compiler (or use makefile template from the example projects):

> cd mira/mirac/build
> ./mirac -d -u -a x86_64 -f nasm <path-to-mira-source-file> <path-to-output-asm-file>
> nasm -f elf64 <path-to-output-asm-file> -o <path-to-output-obj-file>
> ld <path-to-output-obj-file> -o <path-to-output-elf-file>
> <path-to-output-elf-file>

Examples

The repo provides various syntax and project examples in the examples directory. The project examples use the makefiles and uses various building steps such as pre-processor, assembler and linker to automate the building process. To build and run the example project, follow the steps below:

> cd <root-of-the-example-project>
> make && make run

(to the top)

Contributing

At this time, I am not actively seeking contributions to the Mira project. I appreciate your interest and enthusiasm for contributing to the project.

The reason for not actively seeking contributions is that I currently do not have well-defined ground rules and guidelines in place for contributors. I want to ensure that the contribution process is clear, fair, and productive for everyone involved.

However, I am always open to feedback, bug reports, and feature requests. If you encounter issues with the project or have ideas for improvements, please feel free to report in this project's repo issues page.

I value your interest in the project, and I may consider establishing contribution guidelines in the future. Until then, thank you for your understanding and support.

(to the top)

License

The Mira project is released under the Mira GPLv1 license. Users and contributors are required to review and comply with the license terms specified in the license.md file. The license outlines the permitted usage, distribution, and intellectual property rights associated with the Mira project.

Please refer to the license.md file for more details. By using, modifying, or distributing the Mira project, you agree to be bound by the terms and conditions of the license.

(to the top)

mira's People

Contributors

joba14 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.