lisette-stdlib 0.1.15

Little language inspired by Rust that compiles to Go
Documentation
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
// Generated by Lisette bindgen. DO NOT EDIT.

use std::collections::HashMap;
use std::sync::LazyLock;

static GO_STDLIB_TYPEDEFS: LazyLock<HashMap<&str, &str>> = LazyLock::new(|| {
    HashMap::from([
        ("archive/tar", include_str!("../typedefs/archive/tar.d.lis")),
        ("archive/zip", include_str!("../typedefs/archive/zip.d.lis")),
        ("bufio", include_str!("../typedefs/bufio.d.lis")),
        ("bytes", include_str!("../typedefs/bytes.d.lis")),
        ("cmp", include_str!("../typedefs/cmp.d.lis")),
        (
            "compress/bzip2",
            include_str!("../typedefs/compress/bzip2.d.lis"),
        ),
        (
            "compress/flate",
            include_str!("../typedefs/compress/flate.d.lis"),
        ),
        (
            "compress/gzip",
            include_str!("../typedefs/compress/gzip.d.lis"),
        ),
        (
            "compress/lzw",
            include_str!("../typedefs/compress/lzw.d.lis"),
        ),
        (
            "compress/zlib",
            include_str!("../typedefs/compress/zlib.d.lis"),
        ),
        (
            "container/heap",
            include_str!("../typedefs/container/heap.d.lis"),
        ),
        (
            "container/list",
            include_str!("../typedefs/container/list.d.lis"),
        ),
        (
            "container/ring",
            include_str!("../typedefs/container/ring.d.lis"),
        ),
        ("context", include_str!("../typedefs/context.d.lis")),
        ("crypto", include_str!("../typedefs/crypto.d.lis")),
        ("crypto/aes", include_str!("../typedefs/crypto/aes.d.lis")),
        (
            "crypto/cipher",
            include_str!("../typedefs/crypto/cipher.d.lis"),
        ),
        ("crypto/des", include_str!("../typedefs/crypto/des.d.lis")),
        ("crypto/dsa", include_str!("../typedefs/crypto/dsa.d.lis")),
        ("crypto/ecdh", include_str!("../typedefs/crypto/ecdh.d.lis")),
        (
            "crypto/ecdsa",
            include_str!("../typedefs/crypto/ecdsa.d.lis"),
        ),
        (
            "crypto/ed25519",
            include_str!("../typedefs/crypto/ed25519.d.lis"),
        ),
        (
            "crypto/elliptic",
            include_str!("../typedefs/crypto/elliptic.d.lis"),
        ),
        (
            "crypto/fips140",
            include_str!("../typedefs/crypto/fips140.d.lis"),
        ),
        ("crypto/hkdf", include_str!("../typedefs/crypto/hkdf.d.lis")),
        ("crypto/hmac", include_str!("../typedefs/crypto/hmac.d.lis")),
        ("crypto/md5", include_str!("../typedefs/crypto/md5.d.lis")),
        (
            "crypto/mlkem",
            include_str!("../typedefs/crypto/mlkem.d.lis"),
        ),
        (
            "crypto/pbkdf2",
            include_str!("../typedefs/crypto/pbkdf2.d.lis"),
        ),
        ("crypto/rand", include_str!("../typedefs/crypto/rand.d.lis")),
        ("crypto/rc4", include_str!("../typedefs/crypto/rc4.d.lis")),
        ("crypto/rsa", include_str!("../typedefs/crypto/rsa.d.lis")),
        ("crypto/sha1", include_str!("../typedefs/crypto/sha1.d.lis")),
        (
            "crypto/sha256",
            include_str!("../typedefs/crypto/sha256.d.lis"),
        ),
        ("crypto/sha3", include_str!("../typedefs/crypto/sha3.d.lis")),
        (
            "crypto/sha512",
            include_str!("../typedefs/crypto/sha512.d.lis"),
        ),
        (
            "crypto/subtle",
            include_str!("../typedefs/crypto/subtle.d.lis"),
        ),
        ("crypto/tls", include_str!("../typedefs/crypto/tls.d.lis")),
        ("crypto/x509", include_str!("../typedefs/crypto/x509.d.lis")),
        (
            "crypto/x509/pkix",
            include_str!("../typedefs/crypto/x509/pkix.d.lis"),
        ),
        (
            "database/sql",
            include_str!("../typedefs/database/sql.d.lis"),
        ),
        (
            "database/sql/driver",
            include_str!("../typedefs/database/sql/driver.d.lis"),
        ),
        (
            "debug/buildinfo",
            include_str!("../typedefs/debug/buildinfo.d.lis"),
        ),
        ("debug/dwarf", include_str!("../typedefs/debug/dwarf.d.lis")),
        ("debug/elf", include_str!("../typedefs/debug/elf.d.lis")),
        ("debug/gosym", include_str!("../typedefs/debug/gosym.d.lis")),
        ("debug/macho", include_str!("../typedefs/debug/macho.d.lis")),
        ("debug/pe", include_str!("../typedefs/debug/pe.d.lis")),
        (
            "debug/plan9obj",
            include_str!("../typedefs/debug/plan9obj.d.lis"),
        ),
        ("embed", include_str!("../typedefs/embed.d.lis")),
        ("encoding", include_str!("../typedefs/encoding.d.lis")),
        (
            "encoding/ascii85",
            include_str!("../typedefs/encoding/ascii85.d.lis"),
        ),
        (
            "encoding/asn1",
            include_str!("../typedefs/encoding/asn1.d.lis"),
        ),
        (
            "encoding/base32",
            include_str!("../typedefs/encoding/base32.d.lis"),
        ),
        (
            "encoding/base64",
            include_str!("../typedefs/encoding/base64.d.lis"),
        ),
        (
            "encoding/binary",
            include_str!("../typedefs/encoding/binary.d.lis"),
        ),
        (
            "encoding/csv",
            include_str!("../typedefs/encoding/csv.d.lis"),
        ),
        (
            "encoding/gob",
            include_str!("../typedefs/encoding/gob.d.lis"),
        ),
        (
            "encoding/hex",
            include_str!("../typedefs/encoding/hex.d.lis"),
        ),
        (
            "encoding/json",
            include_str!("../typedefs/encoding/json.d.lis"),
        ),
        (
            "encoding/pem",
            include_str!("../typedefs/encoding/pem.d.lis"),
        ),
        (
            "encoding/xml",
            include_str!("../typedefs/encoding/xml.d.lis"),
        ),
        ("errors", include_str!("../typedefs/errors.d.lis")),
        ("expvar", include_str!("../typedefs/expvar.d.lis")),
        ("flag", include_str!("../typedefs/flag.d.lis")),
        ("fmt", include_str!("../typedefs/fmt.d.lis")),
        ("go/ast", include_str!("../typedefs/go/ast.d.lis")),
        ("go/build", include_str!("../typedefs/go/build.d.lis")),
        (
            "go/build/constraint",
            include_str!("../typedefs/go/build/constraint.d.lis"),
        ),
        ("go/constant", include_str!("../typedefs/go/constant.d.lis")),
        ("go/doc", include_str!("../typedefs/go/doc.d.lis")),
        (
            "go/doc/comment",
            include_str!("../typedefs/go/doc/comment.d.lis"),
        ),
        ("go/format", include_str!("../typedefs/go/format.d.lis")),
        ("go/importer", include_str!("../typedefs/go/importer.d.lis")),
        ("go/parser", include_str!("../typedefs/go/parser.d.lis")),
        ("go/printer", include_str!("../typedefs/go/printer.d.lis")),
        ("go/scanner", include_str!("../typedefs/go/scanner.d.lis")),
        ("go/token", include_str!("../typedefs/go/token.d.lis")),
        ("go/types", include_str!("../typedefs/go/types.d.lis")),
        ("go/version", include_str!("../typedefs/go/version.d.lis")),
        ("hash", include_str!("../typedefs/hash.d.lis")),
        (
            "hash/adler32",
            include_str!("../typedefs/hash/adler32.d.lis"),
        ),
        ("hash/crc32", include_str!("../typedefs/hash/crc32.d.lis")),
        ("hash/crc64", include_str!("../typedefs/hash/crc64.d.lis")),
        ("hash/fnv", include_str!("../typedefs/hash/fnv.d.lis")),
        (
            "hash/maphash",
            include_str!("../typedefs/hash/maphash.d.lis"),
        ),
        ("html", include_str!("../typedefs/html.d.lis")),
        (
            "html/template",
            include_str!("../typedefs/html/template.d.lis"),
        ),
        ("image", include_str!("../typedefs/image.d.lis")),
        ("image/color", include_str!("../typedefs/image/color.d.lis")),
        (
            "image/color/palette",
            include_str!("../typedefs/image/color/palette.d.lis"),
        ),
        ("image/draw", include_str!("../typedefs/image/draw.d.lis")),
        ("image/gif", include_str!("../typedefs/image/gif.d.lis")),
        ("image/jpeg", include_str!("../typedefs/image/jpeg.d.lis")),
        ("image/png", include_str!("../typedefs/image/png.d.lis")),
        (
            "index/suffixarray",
            include_str!("../typedefs/index/suffixarray.d.lis"),
        ),
        ("io", include_str!("../typedefs/io.d.lis")),
        ("io/fs", include_str!("../typedefs/io/fs.d.lis")),
        ("io/ioutil", include_str!("../typedefs/io/ioutil.d.lis")),
        ("iter", include_str!("../typedefs/iter.d.lis")),
        ("log", include_str!("../typedefs/log.d.lis")),
        ("log/slog", include_str!("../typedefs/log/slog.d.lis")),
        ("log/syslog", include_str!("../typedefs/log/syslog.d.lis")),
        ("maps", include_str!("../typedefs/maps.d.lis")),
        ("math", include_str!("../typedefs/math.d.lis")),
        ("math/big", include_str!("../typedefs/math/big.d.lis")),
        ("math/bits", include_str!("../typedefs/math/bits.d.lis")),
        ("math/cmplx", include_str!("../typedefs/math/cmplx.d.lis")),
        ("math/rand", include_str!("../typedefs/math/rand.d.lis")),
        (
            "math/rand/v2",
            include_str!("../typedefs/math/rand/v2.d.lis"),
        ),
        ("mime", include_str!("../typedefs/mime.d.lis")),
        (
            "mime/multipart",
            include_str!("../typedefs/mime/multipart.d.lis"),
        ),
        (
            "mime/quotedprintable",
            include_str!("../typedefs/mime/quotedprintable.d.lis"),
        ),
        ("net", include_str!("../typedefs/net.d.lis")),
        ("net/http", include_str!("../typedefs/net/http.d.lis")),
        (
            "net/http/cgi",
            include_str!("../typedefs/net/http/cgi.d.lis"),
        ),
        (
            "net/http/cookiejar",
            include_str!("../typedefs/net/http/cookiejar.d.lis"),
        ),
        (
            "net/http/fcgi",
            include_str!("../typedefs/net/http/fcgi.d.lis"),
        ),
        (
            "net/http/httptest",
            include_str!("../typedefs/net/http/httptest.d.lis"),
        ),
        (
            "net/http/httptrace",
            include_str!("../typedefs/net/http/httptrace.d.lis"),
        ),
        (
            "net/http/httputil",
            include_str!("../typedefs/net/http/httputil.d.lis"),
        ),
        (
            "net/http/pprof",
            include_str!("../typedefs/net/http/pprof.d.lis"),
        ),
        ("net/mail", include_str!("../typedefs/net/mail.d.lis")),
        ("net/netip", include_str!("../typedefs/net/netip.d.lis")),
        ("net/rpc", include_str!("../typedefs/net/rpc.d.lis")),
        (
            "net/rpc/jsonrpc",
            include_str!("../typedefs/net/rpc/jsonrpc.d.lis"),
        ),
        ("net/smtp", include_str!("../typedefs/net/smtp.d.lis")),
        (
            "net/textproto",
            include_str!("../typedefs/net/textproto.d.lis"),
        ),
        ("net/url", include_str!("../typedefs/net/url.d.lis")),
        ("os", include_str!("../typedefs/os.d.lis")),
        ("os/exec", include_str!("../typedefs/os/exec.d.lis")),
        ("os/signal", include_str!("../typedefs/os/signal.d.lis")),
        ("os/user", include_str!("../typedefs/os/user.d.lis")),
        ("path", include_str!("../typedefs/path.d.lis")),
        (
            "path/filepath",
            include_str!("../typedefs/path/filepath.d.lis"),
        ),
        ("plugin", include_str!("../typedefs/plugin.d.lis")),
        ("reflect", include_str!("../typedefs/reflect.d.lis")),
        ("regexp", include_str!("../typedefs/regexp.d.lis")),
        (
            "regexp/syntax",
            include_str!("../typedefs/regexp/syntax.d.lis"),
        ),
        ("runtime", include_str!("../typedefs/runtime.d.lis")),
        ("runtime/cgo", include_str!("../typedefs/runtime/cgo.d.lis")),
        (
            "runtime/coverage",
            include_str!("../typedefs/runtime/coverage.d.lis"),
        ),
        (
            "runtime/debug",
            include_str!("../typedefs/runtime/debug.d.lis"),
        ),
        (
            "runtime/metrics",
            include_str!("../typedefs/runtime/metrics.d.lis"),
        ),
        (
            "runtime/pprof",
            include_str!("../typedefs/runtime/pprof.d.lis"),
        ),
        (
            "runtime/race",
            include_str!("../typedefs/runtime/race.d.lis"),
        ),
        (
            "runtime/trace",
            include_str!("../typedefs/runtime/trace.d.lis"),
        ),
        ("slices", include_str!("../typedefs/slices.d.lis")),
        ("sort", include_str!("../typedefs/sort.d.lis")),
        ("strconv", include_str!("../typedefs/strconv.d.lis")),
        ("strings", include_str!("../typedefs/strings.d.lis")),
        ("structs", include_str!("../typedefs/structs.d.lis")),
        ("sync", include_str!("../typedefs/sync.d.lis")),
        ("sync/atomic", include_str!("../typedefs/sync/atomic.d.lis")),
        ("syscall", include_str!("../typedefs/syscall.d.lis")),
        ("testing", include_str!("../typedefs/testing.d.lis")),
        (
            "testing/fstest",
            include_str!("../typedefs/testing/fstest.d.lis"),
        ),
        (
            "testing/iotest",
            include_str!("../typedefs/testing/iotest.d.lis"),
        ),
        (
            "testing/quick",
            include_str!("../typedefs/testing/quick.d.lis"),
        ),
        (
            "testing/slogtest",
            include_str!("../typedefs/testing/slogtest.d.lis"),
        ),
        (
            "testing/synctest",
            include_str!("../typedefs/testing/synctest.d.lis"),
        ),
        (
            "text/scanner",
            include_str!("../typedefs/text/scanner.d.lis"),
        ),
        (
            "text/tabwriter",
            include_str!("../typedefs/text/tabwriter.d.lis"),
        ),
        (
            "text/template",
            include_str!("../typedefs/text/template.d.lis"),
        ),
        (
            "text/template/parse",
            include_str!("../typedefs/text/template/parse.d.lis"),
        ),
        ("time", include_str!("../typedefs/time.d.lis")),
        ("time/tzdata", include_str!("../typedefs/time/tzdata.d.lis")),
        ("unicode", include_str!("../typedefs/unicode.d.lis")),
        (
            "unicode/utf16",
            include_str!("../typedefs/unicode/utf16.d.lis"),
        ),
        (
            "unicode/utf8",
            include_str!("../typedefs/unicode/utf8.d.lis"),
        ),
        ("unique", include_str!("../typedefs/unique.d.lis")),
        ("unsafe", include_str!("../typedefs/unsafe.d.lis")),
        ("weak", include_str!("../typedefs/weak.d.lis")),
    ])
});

pub fn get_go_stdlib_typedef(package: &str) -> Option<&'static str> {
    GO_STDLIB_TYPEDEFS.get(package).copied()
}

pub fn get_go_stdlib_packages() -> Vec<&'static str> {
    let mut packages: Vec<&'static str> = GO_STDLIB_TYPEDEFS.keys().copied().collect();
    packages.sort();
    packages
}