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
// Copyright ©2025 The typst-cffi Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
typedef struct Context Context;
/**
* # Safety
*
* typst_cffi_version returns the typst-cffi version "MAJOR.MINOR.PATCH".
* The returned data is owned by Typst.
*/
const char *;
/**
* # Safety
*
* typst_free drops all typst-managed memory for this Context.
*/
void ;
/**
* # Safety
*
* typst_get_err returns the error message from Typst compilation, if any.
* The returned message is owned by Typst.
*/
const char *;
/**
* # Safety
*
* typst_get_buf returns the document produced by Typst compilation, if any.
* The returned data is owned by Typst.
*/
const uint8_t *;
/**
* # Safety
*
* typst_get_npages returns the number of pages in the document produced by Typst compilation, if any.
*/
size_t ;
/**
* # Safety
*
* typst_compile compiles the provided Typst document.
* The returned Context is owned by Typst.
*/
struct Context *;
/**
* # Safety
*
* typst_compile_pdf compiles the provided Typst document to PDF.
* The returned Context is owned by Typst.
*/
void ;
/**
* # Safety
*
* typst_compile_png compiles the provided Typst document to PNG.
* The returned Context is owned by Typst.
*/
void ;
/**
* # Safety
*
* typst_compile_svg compiles the provided Typst document to SVG.
* The returned Context is owned by Typst.
*/
void ;