Skip to content

Commit 89f5c8e

Browse files
committed
justfile command and generate extensions jsons
1 parent 99e6def commit 89f5c8e

File tree

5 files changed

+1846
-0
lines changed

5 files changed

+1846
-0
lines changed

justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ coverage language="[rust|python]": (_run_lang language \
4444
recompile-eccs:
4545
scripts/compile-test-eccs.sh
4646

47+
# Generate serialized declarations for the tket2 extensions
48+
gen-extensions:
49+
cargo run -p tket2-hseries gen-extensions -o tket2-py/tket2/extensions/_json_defs
4750

4851
# Runs a rust and a python command, depending on the `language` variable.
4952
#
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
{
2+
"version": "0.1.0",
3+
"name": "tket2.futures",
4+
"extension_reqs": [],
5+
"types": {
6+
"Future": {
7+
"extension": "tket2.futures",
8+
"name": "Future",
9+
"params": [
10+
{
11+
"tp": "Type",
12+
"b": "A"
13+
}
14+
],
15+
"description": "A value that is computed asynchronously",
16+
"bound": {
17+
"b": "Explicit",
18+
"bound": "A"
19+
}
20+
}
21+
},
22+
"values": {},
23+
"operations": {
24+
"Dup": {
25+
"extension": "tket2.futures",
26+
"name": "Dup",
27+
"description": "Duplicate a Future. The original Future is consumed and two Futures are returned",
28+
"signature": {
29+
"params": [
30+
{
31+
"tp": "Type",
32+
"b": "A"
33+
}
34+
],
35+
"body": {
36+
"input": [
37+
{
38+
"t": "Opaque",
39+
"extension": "tket2.futures",
40+
"id": "Future",
41+
"args": [
42+
{
43+
"tya": "Type",
44+
"ty": {
45+
"t": "V",
46+
"i": 0,
47+
"b": "A"
48+
}
49+
}
50+
],
51+
"bound": "A"
52+
}
53+
],
54+
"output": [
55+
{
56+
"t": "Opaque",
57+
"extension": "tket2.futures",
58+
"id": "Future",
59+
"args": [
60+
{
61+
"tya": "Type",
62+
"ty": {
63+
"t": "V",
64+
"i": 0,
65+
"b": "A"
66+
}
67+
}
68+
],
69+
"bound": "A"
70+
},
71+
{
72+
"t": "Opaque",
73+
"extension": "tket2.futures",
74+
"id": "Future",
75+
"args": [
76+
{
77+
"tya": "Type",
78+
"ty": {
79+
"t": "V",
80+
"i": 0,
81+
"b": "A"
82+
}
83+
}
84+
],
85+
"bound": "A"
86+
}
87+
],
88+
"extension_reqs": []
89+
}
90+
},
91+
"binary": false
92+
},
93+
"Free": {
94+
"extension": "tket2.futures",
95+
"name": "Free",
96+
"description": "Consume a future without reading it.",
97+
"signature": {
98+
"params": [
99+
{
100+
"tp": "Type",
101+
"b": "A"
102+
}
103+
],
104+
"body": {
105+
"input": [
106+
{
107+
"t": "Opaque",
108+
"extension": "tket2.futures",
109+
"id": "Future",
110+
"args": [
111+
{
112+
"tya": "Type",
113+
"ty": {
114+
"t": "V",
115+
"i": 0,
116+
"b": "A"
117+
}
118+
}
119+
],
120+
"bound": "A"
121+
}
122+
],
123+
"output": [],
124+
"extension_reqs": []
125+
}
126+
},
127+
"binary": false
128+
},
129+
"Read": {
130+
"extension": "tket2.futures",
131+
"name": "Read",
132+
"description": "Read a value from a Future, consuming it",
133+
"signature": {
134+
"params": [
135+
{
136+
"tp": "Type",
137+
"b": "A"
138+
}
139+
],
140+
"body": {
141+
"input": [
142+
{
143+
"t": "Opaque",
144+
"extension": "tket2.futures",
145+
"id": "Future",
146+
"args": [
147+
{
148+
"tya": "Type",
149+
"ty": {
150+
"t": "V",
151+
"i": 0,
152+
"b": "A"
153+
}
154+
}
155+
],
156+
"bound": "A"
157+
}
158+
],
159+
"output": [
160+
{
161+
"t": "V",
162+
"i": 0,
163+
"b": "A"
164+
}
165+
],
166+
"extension_reqs": []
167+
}
168+
},
169+
"binary": false
170+
}
171+
}
172+
}

0 commit comments

Comments
 (0)