forked from TheDan64/inkwell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
155 lines (146 loc) · 6.46 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
[package]
name = "inkwell"
version = "0.4.0"
authors = ["Daniel Kolsoi <[email protected]>"]
description = "Inkwell aims to help you pen your own programming languages by safely wrapping llvm-sys."
documentation = "https://thedan64.github.io/inkwell/"
repository = "https://github.com/TheDan64/inkwell"
readme = "README.md"
keywords = ["llvm", "safe", "wrapper"]
license = "Apache-2.0"
categories = ["development-tools::ffi"]
edition = "2021"
[features]
default = ["target-all"]
# Please update internal_macros::FEATURE_VERSIONS when adding a new LLVM version
llvm4-0 = ["llvm-sys-40"]
llvm5-0 = ["llvm-sys-50"]
llvm6-0 = ["llvm-sys-60"]
llvm7-0 = ["llvm-sys-70"]
llvm8-0 = ["llvm-sys-80"]
llvm9-0 = ["llvm-sys-90"]
llvm10-0 = ["llvm-sys-100"]
llvm11-0 = ["llvm-sys-110"]
llvm12-0 = ["llvm-sys-120"]
llvm13-0 = ["llvm-sys-130"]
llvm14-0 = ["llvm-sys-140"]
llvm15-0 = ["llvm-sys-150"]
llvm16-0 = ["llvm-sys-160"]
llvm17-0 = ["llvm-sys-170"]
# Don't link against LLVM libraries. This is useful if another dependency is
# installing LLVM. See llvm-sys for more details. We can't enable a single
# `no-llvm-linking` feature across the board of llvm versions, as it'll cause
# cargo to try and download and compile them all. See
# https://github.com/rust-lang/cargo/issues/3494
llvm4-0-no-llvm-linking = ["llvm4-0", "llvm-sys-40/no-llvm-linking"]
llvm5-0-no-llvm-linking = ["llvm5-0", "llvm-sys-50/no-llvm-linking"]
llvm6-0-no-llvm-linking = ["llvm6-0", "llvm-sys-60/no-llvm-linking"]
llvm7-0-no-llvm-linking = ["llvm7-0", "llvm-sys-70/no-llvm-linking"]
llvm8-0-no-llvm-linking = ["llvm8-0", "llvm-sys-80/no-llvm-linking"]
llvm9-0-no-llvm-linking = ["llvm9-0", "llvm-sys-90/no-llvm-linking"]
llvm10-0-no-llvm-linking = ["llvm10-0", "llvm-sys-100/no-llvm-linking"]
llvm11-0-no-llvm-linking = ["llvm11-0", "llvm-sys-110/no-llvm-linking"]
llvm12-0-no-llvm-linking = ["llvm12-0", "llvm-sys-120/no-llvm-linking"]
llvm13-0-no-llvm-linking = ["llvm13-0", "llvm-sys-130/no-llvm-linking"]
llvm14-0-no-llvm-linking = ["llvm14-0", "llvm-sys-140/no-llvm-linking"]
llvm15-0-no-llvm-linking = ["llvm15-0", "llvm-sys-150/no-llvm-linking"]
llvm16-0-no-llvm-linking = ["llvm16-0", "llvm-sys-160/no-llvm-linking"]
llvm17-0-no-llvm-linking = ["llvm17-0", "llvm-sys-170/no-llvm-linking"]
# Linking preference.
# If none of these are enabled, it defaults to force static linking.
#
# Force dynamic linking against LLVM libraries. See llvm-sys for more details
llvm12-0-force-dynamic = ["llvm12-0", "llvm-sys-120/force-dynamic"]
llvm13-0-force-dynamic = ["llvm13-0", "llvm-sys-130/force-dynamic"]
llvm14-0-force-dynamic = ["llvm14-0", "llvm-sys-140/force-dynamic"]
llvm15-0-force-dynamic = ["llvm15-0", "llvm-sys-150/force-dynamic"]
llvm16-0-force-dynamic = ["llvm16-0", "llvm-sys-160/force-dynamic"]
llvm17-0-force-dynamic = ["llvm17-0", "llvm-sys-170/force-dynamic"]
# Prefer dynamic linking against LLVM libraries. See llvm-sys for more details
llvm12-0-prefer-dynamic = ["llvm12-0", "llvm-sys-120/prefer-dynamic"]
llvm13-0-prefer-dynamic = ["llvm13-0", "llvm-sys-130/prefer-dynamic"]
llvm14-0-prefer-dynamic = ["llvm14-0", "llvm-sys-140/prefer-dynamic"]
llvm15-0-prefer-dynamic = ["llvm15-0", "llvm-sys-150/prefer-dynamic"]
llvm16-0-prefer-dynamic = ["llvm16-0", "llvm-sys-160/prefer-dynamic"]
llvm17-0-prefer-dynamic = ["llvm17-0", "llvm-sys-170/prefer-dynamic"]
# Force static linking against LLVM libraries. See llvm-sys for more details
llvm12-0-force-static = ["llvm12-0", "llvm-sys-120/force-static"]
llvm13-0-force-static = ["llvm13-0", "llvm-sys-130/force-static"]
llvm14-0-force-static = ["llvm14-0", "llvm-sys-140/force-static"]
llvm15-0-force-static = ["llvm15-0", "llvm-sys-150/force-static"]
llvm16-0-force-static = ["llvm16-0", "llvm-sys-160/force-static"]
llvm17-0-force-static = ["llvm17-0", "llvm-sys-170/force-static"]
# Prefer static linking against LLVM libraries. See llvm-sys for more details
llvm12-0-prefer-static = ["llvm12-0", "llvm-sys-120/prefer-static"]
llvm13-0-prefer-static = ["llvm13-0", "llvm-sys-130/prefer-static"]
llvm14-0-prefer-static = ["llvm14-0", "llvm-sys-140/prefer-static"]
llvm15-0-prefer-static = ["llvm15-0", "llvm-sys-150/prefer-static"]
llvm16-0-prefer-static = ["llvm16-0", "llvm-sys-160/prefer-static"]
llvm17-0-prefer-static = ["llvm17-0", "llvm-sys-170/prefer-static"]
# Don't force linking to libffi on non-windows platforms. Without this feature
# inkwell always links to libffi on non-windows platforms.
no-libffi-linking = []
target-x86 = []
target-arm = []
target-mips = []
target-aarch64 = []
target-amdgpu = []
target-systemz = []
target-hexagon = []
target-nvptx = []
target-msp430 = []
target-xcore = []
target-powerpc = []
target-sparc = []
target-bpf = []
target-lanai = []
target-webassembly = []
target-riscv = []
target-loongarch = []
target-syncvm = []
target-all = [
"target-x86",
"target-arm",
"target-mips",
"target-aarch64",
"target-amdgpu",
"target-systemz",
"target-hexagon",
"target-nvptx",
"target-msp430",
"target-xcore",
"target-powerpc",
"target-sparc",
"target-bpf",
"target-lanai",
"target-webassembly",
"target-riscv",
"target-loongarch",
]
experimental = ["static-alloc"]
nightly = ["inkwell_internals/nightly"]
[dependencies]
either = "1.5"
inkwell_internals = { path = "./internal_macros", version = "0.9.0" }
libc = "0.2"
llvm-sys-40 = { package = "llvm-sys", version = "40.4", optional = true }
llvm-sys-50 = { package = "llvm-sys", version = "50.4", optional = true }
llvm-sys-60 = { package = "llvm-sys", version = "60.6", optional = true }
llvm-sys-70 = { package = "llvm-sys", version = "70.4", optional = true }
llvm-sys-80 = { package = "llvm-sys", version = "80.3", optional = true }
llvm-sys-90 = { package = "llvm-sys", version = "90.2.1", optional = true }
llvm-sys-100 = { package = "llvm-sys", version = "100.2.3", optional = true }
llvm-sys-110 = { package = "llvm-sys", version = "110.0.3", optional = true }
llvm-sys-120 = { package = "llvm-sys", version = "120.2.4", optional = true }
llvm-sys-130 = { package = "llvm-sys", version = "130.0.4", optional = true }
llvm-sys-140 = { package = "llvm-sys", version = "140.0.2", optional = true }
llvm-sys-150 = { package = "llvm-sys", version = "150.0.3", optional = true }
llvm-sys-160 = { package = "llvm-sys", version = "160.1.0", optional = true }
llvm-sys-170 = { package = "llvm-sys", version = "170.0.1", optional = true }
once_cell = "1.16"
static-alloc = { version = "0.2", optional = true }
thiserror = "1.0.48"
[dev-dependencies]
regex = "1"
[badges]
codecov = { repository = "TheDan64/inkwell" }