• Stars
    star
    1
  • Language
    Swift
  • License
    MIT License
  • Created 5 months ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift LLVM API is a library and utils set fully compatible with LLVM-C API. The library can be used to create compiler backend based on LLVM

llvm-api-swift

llvm-api-swift is a library representing Swift LLVM API, a pure Swift interface to the LLVM API and its associated libraries. It provides native, easy-to-use components to create compilers codegen backend. It contains LLVM bindings, components and toolset for efficiently use LLVM as compilers backend implementation on Swift.

Compatibility with LLVM-C API

When creating the library, we were guided by full compatibility with LLVM-C API. For this reason, structurally the library tries to inherit the LLVM-C API tree, thereby dividing the library structure into subdirectories. And filling the components also with the appropriate LLVM-C API. When implementing Swift types, we were guided by the approach of abstracting away from C types, completely transforming them into Swift types. At the same time adhering to the principles of a safety and reliability implementation - without explicit memory management, means of safe techniques, functions provided by Swift.

Requirements

  • Supported OS: MacOS 12.0 or above

  • Swift lang: 5.9 or above

  • Install LLVM:

brew install llvm
  • Set Environment variables, that provided during brew llvm install
  • initialize pkg-config:
./utils/make-pkg-config.swift

NOTE: Every time, when LLVM is updated or installed new version should be run pkg-config step.

Supported LLVM version

  • v17.0

Troubleshooting

If LLVM-C head files during compulation doesn't found, make sure that you:

  • installed LLVM
llv --version
  • Set environment variables for your terminal (for example in .zshrc). To get instruction about variables run:
brew info llvm
  • run pkg-config utility:
./utils/make-pkg-config.swift
  • if utility doesn't have access right to run:
chmod +x ./utils/make-pkg-config.swift
./utils/make-pkg-config.swift

LICENS: MIT

More Repositories

1

riscv-fs

F# RISC-V Instruction Set formal specification
F#
276
star
2

iron-cms

CMS based on Iron Framework for Rust lang
Rust
45
star
3

semantic-analyzer-rs

Semantic analyzer library for compilers written in Rust for semantic analysis of programming languages AST
Rust
32
star
4

go-benchmark-app

Application for HTTP benchmarking via different rules and configs
Go
27
star
5

nickel-cms

The research project on the development of CMS based on Nickel framework
Rust
13
star
6

amq

Message queue distributed framework based on Actix
Rust
12
star
7

iLang

iLang - a functional programming language and compiler
Rust
9
star
8

riscv-cpu

RISC-V five stage pipline CPU
SystemVerilog
5
star
9

fpga

Research & Development FPGA projects for different boards
GLSL
4
star
10

echo-cms

CMS based on Echo golang framework
HTML
4
star
11

reqrep-events

Golang sample app for REQ/REP message queue events based on go-mangos
Go
3
star
12

rocket-rs

Rust Rocket app
Rust
3
star
13

rcp

Fast copy files based on Rust lang
Rust
3
star
14

llvm-sample

Rust
2
star
15

DAG-chain

DAG chain platform
F#
2
star
16

llvm-ir-tutor

LLVM IR Tutorial
LLVM
2
star
17

avr-timers

AVR timers solutions
Assembly
2
star
18

reqrep-rs

Rust
2
star
19

useful-rust

Rust useful tools & tutorials based on https://doc.rust-lang.org/book/ Chapters and Rust By Examples
Rust
2
star
20

riscv-gcc-source-tests

C
2
star
21

simple-employees-task

Go
1
star
22

hsb

Haskell
1
star
23

mrLSD

Let's change the world... My favorite languages: Rust, F#, Go, Haskell
1
star
24

gpg-test

1
star
25

auth-kit

Golang Authentication Kit
Go
1
star
26

status-check

Status Check system based on Yii Framework
PHP
1
star
27

rust-patterns

Rust design putterns templates
Rust
1
star
28

arduino

Arduino projects based on Atmel chips
C++
1
star
29

linux-util

Most useful utils for Linux
Shell
1
star
30

agda-emacs

Agda & Emacs integrations and samples code
Agda
1
star
31

git-fetch-history

Filter git commits and change their data
Go
1
star
32

tokenomics

JavaScript
1
star
33

pyredmine

Python redmine console grid renderer for specific user and sorted by priority
Python
1
star
34

book-formatter

Format text book to html formatted with page separation
Rust
1
star
35

useful-haskell

Useful Haskell and algorithms
Haskell
1
star
36

go-tutorial

Go Tutorials
Go
1
star
37

mips-one-stage-cpu

MIPS 32 one stage CPU with limited ISA
Verilog
1
star
38

HaskellTutorials

Haskell
1
star
39

idris-docker

Idris language docker image builder
Makefile
1
star
40

hashmap-copy

Rustlang concurent copy and change hashmap
Rust
1
star
41

cabal-dependency-resolver

Haskell Cabal packages dependency resolver
Python
1
star
42

julia-dockerhub

DockerHub files for https://hub.docker.com/r/mrlsd/julia/
Makefile
1
star
43

swift-async-toy

Toy async queue implemented on Swift
Swift
1
star
44

nodemcu-v3

NodeMCU v3 devboard projects
1
star
45

yasvm

Yet another simple Virtual Machine
Rust
1
star
46

yogaGo

Yoga CMS based on Golang
HTML
1
star
47

simple-http-files

Go
1
star
48

exonum-blockchain

Exomun framework Blockchaind samples
1
star
49

dandelion

Semantic parser
F#
1
star