Skip to content

Commit ca42fe4

Browse files
committed
Add Project.toml, Manifest.toml, directions
1 parent e52b2c2 commit ca42fe4

File tree

3 files changed

+184
-1
lines changed

3 files changed

+184
-1
lines changed

src/libzstd/Manifest.toml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
3+
[[ArgTools]]
4+
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
5+
6+
[[Artifacts]]
7+
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
8+
9+
[[Base64]]
10+
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
11+
12+
[[CEnum]]
13+
git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9"
14+
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
15+
version = "0.4.1"
16+
17+
[[Clang]]
18+
deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"]
19+
uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31"
20+
version = "0.14.0"
21+
22+
[[Clang_jll]]
23+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libLLVM_jll"]
24+
git-tree-sha1 = "a5923c06de3178dd755f4b9411ea8922a7ae6fb8"
25+
uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100"
26+
version = "11.0.1+3"
27+
28+
[[Dates]]
29+
deps = ["Printf"]
30+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
31+
32+
[[Downloads]]
33+
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
34+
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
35+
36+
[[InteractiveUtils]]
37+
deps = ["Markdown"]
38+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
39+
40+
[[JLLWrappers]]
41+
deps = ["Preferences"]
42+
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
43+
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
44+
version = "1.3.0"
45+
46+
[[LibCURL]]
47+
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
48+
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
49+
50+
[[LibCURL_jll]]
51+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
52+
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
53+
54+
[[LibGit2]]
55+
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
56+
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
57+
58+
[[LibSSH2_jll]]
59+
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
60+
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
61+
62+
[[Libdl]]
63+
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
64+
65+
[[Logging]]
66+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
67+
68+
[[Markdown]]
69+
deps = ["Base64"]
70+
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
71+
72+
[[MbedTLS_jll]]
73+
deps = ["Artifacts", "Libdl"]
74+
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
75+
76+
[[MozillaCACerts_jll]]
77+
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
78+
79+
[[NetworkOptions]]
80+
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
81+
82+
[[Pkg]]
83+
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
84+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
85+
86+
[[Preferences]]
87+
deps = ["TOML"]
88+
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
89+
uuid = "21216c6a-2e73-6563-6e65-726566657250"
90+
version = "1.2.2"
91+
92+
[[Printf]]
93+
deps = ["Unicode"]
94+
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
95+
96+
[[REPL]]
97+
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
98+
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
99+
100+
[[Random]]
101+
deps = ["Serialization"]
102+
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
103+
104+
[[SHA]]
105+
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
106+
107+
[[Serialization]]
108+
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
109+
110+
[[Sockets]]
111+
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
112+
113+
[[TOML]]
114+
deps = ["Dates"]
115+
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
116+
117+
[[Tar]]
118+
deps = ["ArgTools", "SHA"]
119+
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
120+
121+
[[UUIDs]]
122+
deps = ["Random", "SHA"]
123+
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
124+
125+
[[Unicode]]
126+
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
127+
128+
[[Zlib_jll]]
129+
deps = ["Libdl"]
130+
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
131+
132+
[[Zstd_jll]]
133+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
134+
git-tree-sha1 = "cc4bf3fdde8b7e3e9fa0351bdeedba1cf3b7f6e6"
135+
uuid = "3161d3a3-bdf6-5164-811a-617609db77b4"
136+
version = "1.5.0+0"
137+
138+
[[libLLVM_jll]]
139+
deps = ["Artifacts", "Libdl"]
140+
uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a"
141+
142+
[[nghttp2_jll]]
143+
deps = ["Artifacts", "Libdl"]
144+
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
145+
146+
[[p7zip_jll]]
147+
deps = ["Artifacts", "Libdl"]
148+
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

src/libzstd/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
3+
Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4"
4+
5+
[compat]
6+
Clang = "0.14"

src/libzstd/generator.jl

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
# Clang.jl 14.0
1+
# generator.jl
2+
# generator.jl uses Clang to parse zdict.h, zstd.h, zstd_errors.h and generates LibZstd.jl
3+
4+
# Clang.jl 0.14 (40e3b903)
5+
# As of 2021-09-18 0.14 is currently unreleased
6+
# See https://github.com/JuliaInterop/Clang.jl/milestone/1
7+
8+
# Configuration files:
9+
# generator.toml is used to configure the Clang generator
10+
# prologue.jl adds some definitions to beginning LibZstd.jl
11+
12+
# Directions:
13+
# 1. Change to this directory e.g. `import CodecZstd; cd(joinpath(dirname(pathof(CodecZstd)), "libzstd"))`
14+
# 2. Activate the project in this directory e.g. `using Pkg; Pkg.activate(".")`
15+
# 2a. You may need to dev Clang to get 0.14 or greater: `Pkg.dev("Clang")`
16+
# 3. Include this file: `include("generator.jl")``
17+
# Alternatively, from the shell, `cd libzstd; julia --project=. generator.jl`
18+
19+
#=
20+
# Example Code Block to Run Generator
21+
import CodecZstd; cd(joinpath(dirname(pathof(CodecZstd)), "libzstd"))
22+
using Pkg; Pkg.activate(".")
23+
# Pkg.dev("Clang")
24+
include("generator.jl")
25+
=#
26+
227
using Clang.Generators
328
using Zstd_jll
429

@@ -32,12 +57,16 @@ end
3257
function rewrite!(dag::ExprDAG)
3358
for node in get_nodes(dag)
3459
if node.id == :ZSTD_WINDOWLOG_MAX
60+
# Unsupported macro
3561
node.exprs[1].args[1] = :(const ZSTD_WINDOWLOG_MAX = sizeof(Csize_t) == 4 ? ZSTD_WINDOWLOG_MAX_32 : ZSTD_WINDOWLOG_MAX_64)
3662
elseif node.id == :ZSTD_CHAINLOG_MAX
63+
# Unsupported macro
3764
node.exprs[1].args[1] = :(const ZSTD_CHAINLOG_MAX = sizeof(Csize_t) == 4 ? ZSTD_CHAINLOG_MAX_32 : ZSTD_CHAINLOG_MAX_64)
3865
elseif node.id == :ZSTD_LIB_VERSION
66+
# Unsupported macro
3967
node.exprs[1].args[1] = :(const ZSTD_LIB_VERSION = VersionNumber(ZSTD_VERSION_MAJOR, ZSTD_VERSION_MINOR, ZSTD_VERSION_RELEASE))
4068
elseif node isa ExprNode{Generators.MacroUnsupported}
69+
# Usually just export symbols for ZSTDLIB_API, ZDICTLIB_API, ZSTDERRORLIB_API
4170
node.exprs[1].args[1] = :(const $(node.id) = nothing)
4271
end
4372
for expr in get_exprs(node)

0 commit comments

Comments
 (0)