@codama/renderers-rust 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -14
- package/package.json +36 -20
package/README.md
CHANGED
|
@@ -15,24 +15,23 @@ This package generates Rust clients from your Codama IDLs.
|
|
|
15
15
|
pnpm install @codama/renderers-rust
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
> [!NOTE]
|
|
19
|
-
> This package is **not** included in the main [`codama`](../library) package.
|
|
20
|
-
>
|
|
21
|
-
> However, note that the [`renderers`](../renderers) package re-exports the `renderVisitor` function of this package as `renderRustVisitor`.
|
|
22
|
-
|
|
23
18
|
## Usage
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
Add the following script to your Codama configuration file.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"scripts": {
|
|
25
|
+
"rust": {
|
|
26
|
+
"from": "@codama/renderers-rust",
|
|
27
|
+
"args": ["clients/rust/src/generated"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
34
31
|
```
|
|
35
32
|
|
|
33
|
+
An object can be passed as a second argument to further configure the renderer. See the [Options](#options) section below for more details.
|
|
34
|
+
|
|
36
35
|
## Options
|
|
37
36
|
|
|
38
37
|
The `renderVisitor` accepts the following options.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codama/renderers-rust",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Renders Rust clients for your programs",
|
|
5
5
|
"exports": {
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -28,41 +28,57 @@
|
|
|
28
28
|
"client"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"@codama/
|
|
34
|
-
"@codama/
|
|
35
|
-
"@
|
|
36
|
-
"
|
|
31
|
+
"@codama/errors": "^1.3.7",
|
|
32
|
+
"@codama/nodes": "^1.3.7",
|
|
33
|
+
"@codama/renderers-core": "^1.2.2",
|
|
34
|
+
"@codama/visitors-core": "^1.3.7",
|
|
35
|
+
"@solana/codecs-strings": "^3.0.3",
|
|
36
|
+
"nunjucks": "^3.2.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
+
"@codama/nodes-from-anchor": "^1.2.9",
|
|
40
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
41
|
+
"@changesets/cli": "^2.29.7",
|
|
42
|
+
"@solana/eslint-config-solana": "^5.0.0",
|
|
43
|
+
"@solana/prettier-config-solana": "0.0.5",
|
|
44
|
+
"@types/node": "^24",
|
|
39
45
|
"@types/nunjucks": "^3.2.6",
|
|
40
|
-
"
|
|
46
|
+
"agadoo": "^3.0.0",
|
|
47
|
+
"eslint": "^9.35.0",
|
|
48
|
+
"happy-dom": "^18.0.1",
|
|
49
|
+
"prettier": "^3.6.2",
|
|
50
|
+
"rimraf": "6.0.1",
|
|
51
|
+
"tsup": "^8.5.0",
|
|
52
|
+
"typescript": "^5.9.2",
|
|
53
|
+
"vitest": "^3.2.4"
|
|
41
54
|
},
|
|
42
55
|
"license": "MIT",
|
|
43
56
|
"repository": {
|
|
44
57
|
"type": "git",
|
|
45
|
-
"url": "https://github.com/codama-idl/
|
|
58
|
+
"url": "https://github.com/codama-idl/renderers-rust"
|
|
46
59
|
},
|
|
47
60
|
"bugs": {
|
|
48
|
-
"url": "http://github.com/codama-idl/
|
|
61
|
+
"url": "http://github.com/codama-idl/renderers-rust/issues"
|
|
49
62
|
},
|
|
50
63
|
"browserslist": [
|
|
51
64
|
"supports bigint and not dead",
|
|
52
65
|
"maintained node versions"
|
|
53
66
|
],
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=20.18.0"
|
|
69
|
+
},
|
|
70
|
+
"prettier": "@solana/prettier-config-solana",
|
|
54
71
|
"scripts": {
|
|
55
|
-
"build": "rimraf dist &&
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node && pnpm test:e2e && pnpm test:exports",
|
|
72
|
+
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
|
|
73
|
+
"dev": "vitest --project node",
|
|
74
|
+
"lint": "eslint . && prettier --check .",
|
|
75
|
+
"lint:fix": "eslint --fix . && prettier --write .",
|
|
76
|
+
"publish-package": "pnpm build && changeset publish",
|
|
77
|
+
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
|
|
62
78
|
"test:e2e": "./e2e/test.sh",
|
|
63
79
|
"test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
|
|
64
|
-
"test:
|
|
65
|
-
"test:
|
|
66
|
-
"test:
|
|
80
|
+
"test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
|
|
81
|
+
"test:types": "tsc --noEmit",
|
|
82
|
+
"test:unit": "vitest run"
|
|
67
83
|
}
|
|
68
84
|
}
|