You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`SwiftLLVMCodegen` is a pure Swift interface to the [LLVM API](https://llvm.org/docs/) and its associated libraries. It provides
4
-
native, easy-to-use components to create compilers codegen backend. It contains LLVM bindings,
5
-
components and toolset for `Codegen` implementation on Swift.
3
+
`llvm-api-swift` is a library representing Swift LLVM API, a pure Swift interface to the [LLVM API](https://llvm.org/docs/) and its associated libraries.
4
+
It provides native, easy-to-use components to create compilers codegen backend. It contains LLVM bindings,
5
+
components and toolset for efficiently use LLVM as compilers backend implementation on Swift.
6
6
7
-
##Status
7
+
### Compatibility with LLVM-C API
8
8
9
-
In progress...
9
+
When creating the library, we were guided by **full compatibility** with [LLVM-C API](https://llvm.org/doxygen/group__LLVMC.html).
10
+
For this reason, structurally the library tries to inherit the `LLVM-C API` tree, thereby dividing the library structure into subdirectories.
11
+
And filling the components also with the appropriate `LLVM-C API`.
12
+
When implementing Swift types, we were guided by the approach of abstracting away from C types, completely transforming them into Swift types.
13
+
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.
10
14
11
-
### Supported LLVM version
12
15
13
-
**v17.0**
16
+
### Requirements
17
+
- Supported OS: MacOS 12.0 or above
18
+
- Swift lang: 5.9 or above
19
+
20
+
- Install LLVM:
21
+
```
22
+
brew install llvm
23
+
```
24
+
- Set Environment variables, that provided during `brew` llvm install
25
+
- initialize `pkg-config`:
26
+
```
27
+
./utils/make-pkg-config.swift
28
+
```
14
29
15
-
## Inspiration
30
+
**NOTE:** Every time, when LLVM is updated or installed new version should be run `pkg-config` step.
16
31
17
-
Inspired by [SwiftLLVM](https://github.com/llvm-swift/LLVMSwift).
32
+
### Supported LLVM version
18
33
19
-
## LICENS: [MIT](LICENSE)
34
+
-[x] v17.0
35
+
36
+
37
+
### Troubleshooting
38
+
39
+
If `LLVM-C` head files during compulation doesn't found, make sure that you:
40
+
- installed LLVM
41
+
```
42
+
llv --version
43
+
```
44
+
- Set environment variables for your terminal (for example in `.zshrc`). To get instruction about variables run:
0 commit comments