An awesome language and its compiler.

Related tags

Command-line calocom
Overview

Calocom Project

Build

Build with cargo-make

Just run cargo make in the root directory of the project. Or, if you want to build it in release mode, run cargo make release.

Build the runtime

The calocom compiler requires the runtime to be a LLVM IR form so that it can link the runtime before compiling the program into a object file. In a sense, it looks like a typical LTO operation. Because cargo is not intend to let users to modify the compiling options of rustc automatically and easily, we need to build the runtime manually.

To obtain a LLVM IR form of the runtime, we need to run the following command:

cd runtime
cargo rustc --lib --release -- --emit=llvm-ir

Note that it's required to use release mode because we expect to produce a single IR file.

Then found the calocom_runtime.ll file in the target/release/deps directory.

Usually, the calocom compiler tries to find the runtime file in the current directory with the name calocom_runtime.ll. You might modify the default behavior with some flags.

Build the compiler

The building process goes as normal rust crates.

cargo build

or in release mode:

cargo build --release

Usage

calocom-compiler 0.1.0

USAGE:
    calocom-compiler [OPTIONS] <FILE>

ARGS:
    <FILE>    Specify the input file

OPTIONS:
    -h, --help                   Print help information
    -l, --opt-level <LEVEL>      Specify the optimizing level [default: O3] [possible values: O0,
                                 O1, O2, O3]
        --llvm-pass-debug        Specify if need to enable debug log for llvm passes
    -o, --output <OUTPUT>        Specify the output file
    -r, --relocate <RELOCATE>    Specify the relocation type [default: pic] [possible values:
                                 static, dynamic-no-pic, pic, default]
        --runtime <RUNTIME>      Specify the runtime file [default: calocom_runtime.ll]
    -t, --type <TYPE>            Specify the type of the output file [possible values: llvm-bc,
                                 llvm-asm, mir, tast, ast, asm, bin, obj]
    -u, --visualize              Use this option to generate the visualized ast in html
    -V, --version                Print version information
You might also like...
Rust awesome(资源). 💥
Rust awesome(资源). 💥

Rust Boom 💥 Rust Boom 是一个仓主在学习使用 Rust 的时候,对 Rust 的一些难点的解决方法以及一些 Rust 开源的好玩的库、书籍、文章的整理,希望可以帮助更多的 Rust 初学者来翻过 Rust 这座大山。 TOC Rust Boom 💥 TOC Blasting

awesome fullstack rust web framework, made by axum & shaku & yew

Awesome Rust Full Stack Web Framework With Axum && shaku && yew, this repository represents how can we construct new web server used by rust. Still in

Black-box integration tests for your REST API using the Rust and its test framework

restest Black-box integration test for REST APIs in Rust. This crate provides the [assert_api] macro that allows to declaratively test, given a certai

By mirroring traffic to and from your machine, mirrord surrounds your local service with a mirror image of its cloud environment.
By mirroring traffic to and from your machine, mirrord surrounds your local service with a mirror image of its cloud environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and

An interpreter and compiler for the Brainfuck language.

Brainrust 🧠 An interpreter and compiler for the Brainfuck language. Prerequisites You need a LLVM 16.0.* installation on your system. On Windows, you

tkn-watch - watch a PipelineRuns on its way to success or failures
tkn-watch - watch a PipelineRuns on its way to success or failures

tkn-watch - watch a PipelineRuns on its way to success or failures tkn-watch is a simple extension to the tkn command line tool that watches a Pipelin

Compiler for an "extended" version of the Mindustry logic language

Minblur Compiler Minblur is a compiler for a superset of "logic" programming language in the game Mindustry. It helps reduce code-duplication, making

Open-source compiler for the Papyrus scripting language of Bethesda games.

Open Papyrus Compiler This project is still WORK IN PROGRESS. If you have any feature requests, head over to the Issues tab and describe your needs. Y

Compiler frontend for the PureScript programming language.

purescript-analyzer Goals Provide an independent frontend for providing information for IDE tooling, separate from the compiler. Implement a rich edit

Owner
Aoyang Yu
Junior in Computer Science, interested in programming language theory.
Aoyang Yu
(Pre-Release Software) Secure, Encrypted, P2P chat written atop Warp, IPFS, LibP2P, Dioxus and many more awesome projects and protocols.

Uplink Privacy First, Modular, P2P messaging client built atop Warp. Uplink is written in pure Rust with a UI in Dioxus (which is also written in Rust

Satellite 13 Jan 25, 2023
An awesome CLI tool for effectively learning Rust and more. Project winner of the RustFi 2022 hackathon

rlrn An awesome CLI tool for effectively learning Rust and more Table of Contents About The Project Built With Getting Started Prerequisites Installat

Victor Kostyuk 6 Dec 25, 2022
Little example projects for learning Rust and building awesome cli tools! ⭐️

rust-cli-examples Examples of clean and well-tested command line utilities, written in Rust. ?? ?? What is this repo? This repo is a collection of man

Jim Lynch 5 Mar 31, 2023
Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models, supports talking, speaking assessment, memorizing words with contexts, Listening test, so on.

null 155 Apr 20, 2023
Little exercises for learning Rust and building awesome cli tools! ⭐️

rust-cli-exercises Little exercises for learning Rust and building awesome cli tools! ⭐️ What's Here This repo is a collection of many extremely small

null 6 Apr 25, 2023
Zash - A Zuper Awesome Shell

Zash - A Zuper Awesome Shell Welcome to zash, its activily being developed and is not near a stable release. Installation Arch: yay -S zash Paru seem

Robiot 27 May 22, 2022
rust awesome(资源). 💥

Rust Boom ?? Rust Boom 是一个仓主在学习使用 Rust 的时候,对 Rust 的一些难点的解决方法以及一些 Rust 开源的好玩的库、书籍、文章的整理,希望可以帮助更多的 Rust 初学者来翻过 Rust 这座大山。 TOC Rust Boom ?? TOC Blasting

null 503 Dec 30, 2022
The awesome-app Command Line Interface

Rust CLI to create Awesome Applications with Rust. More info at awesomeapp.org Install > cargo install awesome-app Create your first app: # Create you

RUST-AWESOME-APP 41 Jan 4, 2023
Awesome-like workspaces for Hyprland

Hyprsome Hyprsome is a binary that interacts with Hyprland's Unix socket to make workspaces behave similarly to AwesomeWM in a multi-monitor setup. If

null 17 Jan 1, 2023
Super-lightweight Immediate-mode Embedded GUI framework, based on the awesome embedded-graphics library. Written in Rust.

Kolibri - A GUI framework made to be as lightweight as its namesake What is Kolibri? Kolibri is an embedded Immediate Mode GUI mini-framework very str

null 6 Jun 24, 2023