flutmax 0.1.0__tar.gz

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.
Files changed (58) hide show
  1. flutmax-0.1.0/Cargo.toml +15 -0
  2. flutmax-0.1.0/PKG-INFO +11 -0
  3. flutmax-0.1.0/bindings/python/Cargo.lock +312 -0
  4. flutmax-0.1.0/bindings/python/Cargo.toml +17 -0
  5. flutmax-0.1.0/bindings/python/LICENSE +21 -0
  6. flutmax-0.1.0/bindings/python/README.md +31 -0
  7. flutmax-0.1.0/bindings/python/src/lib.rs +32 -0
  8. flutmax-0.1.0/bindings/python/test_flutmax.py +33 -0
  9. flutmax-0.1.0/crates/flutmax/Cargo.toml +19 -0
  10. flutmax-0.1.0/crates/flutmax/LICENSE +21 -0
  11. flutmax-0.1.0/crates/flutmax/README.md +39 -0
  12. flutmax-0.1.0/crates/flutmax/src/lib.rs +161 -0
  13. flutmax-0.1.0/crates/flutmax-ast/Cargo.toml +10 -0
  14. flutmax-0.1.0/crates/flutmax-ast/LICENSE +21 -0
  15. flutmax-0.1.0/crates/flutmax-ast/README.md +27 -0
  16. flutmax-0.1.0/crates/flutmax-ast/src/lib.rs +344 -0
  17. flutmax-0.1.0/crates/flutmax-codegen/Cargo.toml +15 -0
  18. flutmax-0.1.0/crates/flutmax-codegen/LICENSE +21 -0
  19. flutmax-0.1.0/crates/flutmax-codegen/README.md +21 -0
  20. flutmax-0.1.0/crates/flutmax-codegen/src/builder.rs +5754 -0
  21. flutmax-0.1.0/crates/flutmax-codegen/src/layout.rs +567 -0
  22. flutmax-0.1.0/crates/flutmax-codegen/src/lib.rs +12 -0
  23. flutmax-0.1.0/crates/flutmax-codegen/src/maxpat.rs +2378 -0
  24. flutmax-0.1.0/crates/flutmax-codegen/tests/object_coverage.rs +1143 -0
  25. flutmax-0.1.0/crates/flutmax-decompile/Cargo.toml +13 -0
  26. flutmax-0.1.0/crates/flutmax-decompile/LICENSE +21 -0
  27. flutmax-0.1.0/crates/flutmax-decompile/README.md +23 -0
  28. flutmax-0.1.0/crates/flutmax-decompile/src/alias.rs +103 -0
  29. flutmax-0.1.0/crates/flutmax-decompile/src/analyzer.rs +6185 -0
  30. flutmax-0.1.0/crates/flutmax-decompile/src/emitter.rs +1779 -0
  31. flutmax-0.1.0/crates/flutmax-decompile/src/lib.rs +9 -0
  32. flutmax-0.1.0/crates/flutmax-decompile/src/multi.rs +538 -0
  33. flutmax-0.1.0/crates/flutmax-decompile/src/parser.rs +757 -0
  34. flutmax-0.1.0/crates/flutmax-objdb/Cargo.lock +92 -0
  35. flutmax-0.1.0/crates/flutmax-objdb/Cargo.toml +12 -0
  36. flutmax-0.1.0/crates/flutmax-objdb/LICENSE +21 -0
  37. flutmax-0.1.0/crates/flutmax-objdb/README.md +24 -0
  38. flutmax-0.1.0/crates/flutmax-objdb/src/lib.rs +407 -0
  39. flutmax-0.1.0/crates/flutmax-objdb/src/parser.rs +856 -0
  40. flutmax-0.1.0/crates/flutmax-parser/Cargo.toml +21 -0
  41. flutmax-0.1.0/crates/flutmax-parser/LICENSE +21 -0
  42. flutmax-0.1.0/crates/flutmax-parser/README.md +26 -0
  43. flutmax-0.1.0/crates/flutmax-parser/src/lexer.rs +704 -0
  44. flutmax-0.1.0/crates/flutmax-parser/src/lib.rs +65 -0
  45. flutmax-0.1.0/crates/flutmax-parser/src/parse.rs +1657 -0
  46. flutmax-0.1.0/crates/flutmax-parser/src/parser.rs +2305 -0
  47. flutmax-0.1.0/crates/flutmax-parser/src/tokens.rs +74 -0
  48. flutmax-0.1.0/crates/flutmax-parser/tests/edge_cases.rs +667 -0
  49. flutmax-0.1.0/crates/flutmax-sema/Cargo.lock +75 -0
  50. flutmax-0.1.0/crates/flutmax-sema/Cargo.toml +12 -0
  51. flutmax-0.1.0/crates/flutmax-sema/LICENSE +21 -0
  52. flutmax-0.1.0/crates/flutmax-sema/README.md +26 -0
  53. flutmax-0.1.0/crates/flutmax-sema/src/graph.rs +160 -0
  54. flutmax-0.1.0/crates/flutmax-sema/src/lib.rs +4 -0
  55. flutmax-0.1.0/crates/flutmax-sema/src/registry.rs +279 -0
  56. flutmax-0.1.0/crates/flutmax-sema/src/trigger.rs +959 -0
  57. flutmax-0.1.0/crates/flutmax-sema/src/type_check.rs +3355 -0
  58. flutmax-0.1.0/pyproject.toml +22 -0
@@ -0,0 +1,15 @@
1
+ [workspace]
2
+ members = [
3
+ "crates/flutmax-ast",
4
+ "crates/flutmax-parser",
5
+ "crates/flutmax-sema",
6
+ "crates/flutmax-codegen",
7
+ "crates/flutmax-objdb",
8
+ "crates/flutmax-validate",
9
+ "crates/flutmax-decompile",
10
+ "crates/flutmax-cli",
11
+ "crates/flutmax-lsp",
12
+ "crates/flutmax",
13
+ ]
14
+ exclude = ["bindings/wasm"]
15
+ resolver = "2"
flutmax-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: flutmax
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Topic :: Multimedia :: Sound/Audio
7
+ License-File: LICENSE
8
+ Summary: Transpiler between .flutmax text and Max/MSP .maxpat patches
9
+ License: MIT
10
+ Requires-Python: >=3.8
11
+ Project-URL: Repository, https://github.com/nordsound/flutmax
@@ -0,0 +1,312 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.4"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
16
+
17
+ [[package]]
18
+ name = "flutmax"
19
+ version = "0.1.0"
20
+ dependencies = [
21
+ "flutmax-ast",
22
+ "flutmax-codegen",
23
+ "flutmax-decompile",
24
+ "flutmax-objdb",
25
+ "flutmax-parser",
26
+ "flutmax-sema",
27
+ "serde_json",
28
+ ]
29
+
30
+ [[package]]
31
+ name = "flutmax-ast"
32
+ version = "0.1.0"
33
+
34
+ [[package]]
35
+ name = "flutmax-codegen"
36
+ version = "0.1.0"
37
+ dependencies = [
38
+ "flutmax-ast",
39
+ "flutmax-objdb",
40
+ "flutmax-sema",
41
+ "serde",
42
+ "serde_json",
43
+ ]
44
+
45
+ [[package]]
46
+ name = "flutmax-decompile"
47
+ version = "0.1.0"
48
+ dependencies = [
49
+ "flutmax-objdb",
50
+ "serde",
51
+ "serde_json",
52
+ ]
53
+
54
+ [[package]]
55
+ name = "flutmax-objdb"
56
+ version = "0.1.0"
57
+ dependencies = [
58
+ "quick-xml",
59
+ "serde",
60
+ ]
61
+
62
+ [[package]]
63
+ name = "flutmax-parser"
64
+ version = "0.1.0"
65
+ dependencies = [
66
+ "flutmax-ast",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "flutmax-py"
71
+ version = "0.1.0"
72
+ dependencies = [
73
+ "flutmax",
74
+ "pyo3",
75
+ ]
76
+
77
+ [[package]]
78
+ name = "flutmax-sema"
79
+ version = "0.1.0"
80
+ dependencies = [
81
+ "flutmax-ast",
82
+ "serde",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "heck"
87
+ version = "0.5.0"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
90
+
91
+ [[package]]
92
+ name = "indoc"
93
+ version = "2.0.7"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
96
+ dependencies = [
97
+ "rustversion",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "itoa"
102
+ version = "1.0.18"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
105
+
106
+ [[package]]
107
+ name = "libc"
108
+ version = "0.2.184"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
111
+
112
+ [[package]]
113
+ name = "memchr"
114
+ version = "2.8.0"
115
+ source = "registry+https://github.com/rust-lang/crates.io-index"
116
+ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
117
+
118
+ [[package]]
119
+ name = "memoffset"
120
+ version = "0.9.1"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
123
+ dependencies = [
124
+ "autocfg",
125
+ ]
126
+
127
+ [[package]]
128
+ name = "once_cell"
129
+ version = "1.21.4"
130
+ source = "registry+https://github.com/rust-lang/crates.io-index"
131
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
132
+
133
+ [[package]]
134
+ name = "portable-atomic"
135
+ version = "1.13.1"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
138
+
139
+ [[package]]
140
+ name = "proc-macro2"
141
+ version = "1.0.106"
142
+ source = "registry+https://github.com/rust-lang/crates.io-index"
143
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
144
+ dependencies = [
145
+ "unicode-ident",
146
+ ]
147
+
148
+ [[package]]
149
+ name = "pyo3"
150
+ version = "0.22.6"
151
+ source = "registry+https://github.com/rust-lang/crates.io-index"
152
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
153
+ dependencies = [
154
+ "cfg-if",
155
+ "indoc",
156
+ "libc",
157
+ "memoffset",
158
+ "once_cell",
159
+ "portable-atomic",
160
+ "pyo3-build-config",
161
+ "pyo3-ffi",
162
+ "pyo3-macros",
163
+ "unindent",
164
+ ]
165
+
166
+ [[package]]
167
+ name = "pyo3-build-config"
168
+ version = "0.22.6"
169
+ source = "registry+https://github.com/rust-lang/crates.io-index"
170
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
171
+ dependencies = [
172
+ "once_cell",
173
+ "target-lexicon",
174
+ ]
175
+
176
+ [[package]]
177
+ name = "pyo3-ffi"
178
+ version = "0.22.6"
179
+ source = "registry+https://github.com/rust-lang/crates.io-index"
180
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
181
+ dependencies = [
182
+ "libc",
183
+ "pyo3-build-config",
184
+ ]
185
+
186
+ [[package]]
187
+ name = "pyo3-macros"
188
+ version = "0.22.6"
189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
190
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
191
+ dependencies = [
192
+ "proc-macro2",
193
+ "pyo3-macros-backend",
194
+ "quote",
195
+ "syn",
196
+ ]
197
+
198
+ [[package]]
199
+ name = "pyo3-macros-backend"
200
+ version = "0.22.6"
201
+ source = "registry+https://github.com/rust-lang/crates.io-index"
202
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
203
+ dependencies = [
204
+ "heck",
205
+ "proc-macro2",
206
+ "pyo3-build-config",
207
+ "quote",
208
+ "syn",
209
+ ]
210
+
211
+ [[package]]
212
+ name = "quick-xml"
213
+ version = "0.37.5"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb"
216
+ dependencies = [
217
+ "memchr",
218
+ "serde",
219
+ ]
220
+
221
+ [[package]]
222
+ name = "quote"
223
+ version = "1.0.45"
224
+ source = "registry+https://github.com/rust-lang/crates.io-index"
225
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
226
+ dependencies = [
227
+ "proc-macro2",
228
+ ]
229
+
230
+ [[package]]
231
+ name = "rustversion"
232
+ version = "1.0.22"
233
+ source = "registry+https://github.com/rust-lang/crates.io-index"
234
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
235
+
236
+ [[package]]
237
+ name = "serde"
238
+ version = "1.0.228"
239
+ source = "registry+https://github.com/rust-lang/crates.io-index"
240
+ checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
241
+ dependencies = [
242
+ "serde_core",
243
+ "serde_derive",
244
+ ]
245
+
246
+ [[package]]
247
+ name = "serde_core"
248
+ version = "1.0.228"
249
+ source = "registry+https://github.com/rust-lang/crates.io-index"
250
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
251
+ dependencies = [
252
+ "serde_derive",
253
+ ]
254
+
255
+ [[package]]
256
+ name = "serde_derive"
257
+ version = "1.0.228"
258
+ source = "registry+https://github.com/rust-lang/crates.io-index"
259
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
260
+ dependencies = [
261
+ "proc-macro2",
262
+ "quote",
263
+ "syn",
264
+ ]
265
+
266
+ [[package]]
267
+ name = "serde_json"
268
+ version = "1.0.149"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
271
+ dependencies = [
272
+ "itoa",
273
+ "memchr",
274
+ "serde",
275
+ "serde_core",
276
+ "zmij",
277
+ ]
278
+
279
+ [[package]]
280
+ name = "syn"
281
+ version = "2.0.117"
282
+ source = "registry+https://github.com/rust-lang/crates.io-index"
283
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
284
+ dependencies = [
285
+ "proc-macro2",
286
+ "quote",
287
+ "unicode-ident",
288
+ ]
289
+
290
+ [[package]]
291
+ name = "target-lexicon"
292
+ version = "0.12.16"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
295
+
296
+ [[package]]
297
+ name = "unicode-ident"
298
+ version = "1.0.24"
299
+ source = "registry+https://github.com/rust-lang/crates.io-index"
300
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
301
+
302
+ [[package]]
303
+ name = "unindent"
304
+ version = "0.2.4"
305
+ source = "registry+https://github.com/rust-lang/crates.io-index"
306
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
307
+
308
+ [[package]]
309
+ name = "zmij"
310
+ version = "1.0.21"
311
+ source = "registry+https://github.com/rust-lang/crates.io-index"
312
+ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -0,0 +1,17 @@
1
+ [package]
2
+ name = "flutmax-py"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ license = "MIT"
6
+ description = "Python bindings for flutmax (.flutmax <-> .maxpat transpiler)"
7
+ readme = "README.md"
8
+
9
+ [workspace]
10
+
11
+ [lib]
12
+ name = "flutmax_py"
13
+ crate-type = ["cdylib"]
14
+
15
+ [dependencies]
16
+ pyo3 = { version = "0.22", features = ["extension-module"] }
17
+ flutmax = { version = "0.1.0", path = "../../crates/flutmax" }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nordsound
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # flutmax-py
2
+
3
+ Python bindings for flutmax (.flutmax <-> .maxpat transpiler).
4
+
5
+ Part of the [flutmax](https://github.com/nordsound/flutmax) workspace.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install maturin
11
+ maturin develop --release
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```python
17
+ import flutmax_py
18
+
19
+ # Compile .flutmax source to .maxpat JSON
20
+ maxpat = flutmax_py.compile("out audio: signal;\nwire osc = cycle~(440);\nout[0] = osc;")
21
+
22
+ # Decompile .maxpat JSON to .flutmax source
23
+ source = flutmax_py.decompile(maxpat)
24
+
25
+ # Parse to AST JSON
26
+ ast = flutmax_py.parse("wire osc = cycle~(440);")
27
+ ```
28
+
29
+ ## License
30
+
31
+ MIT
@@ -0,0 +1,32 @@
1
+ use pyo3::prelude::*;
2
+
3
+ /// Compile .flutmax source to .maxpat JSON string.
4
+ #[pyfunction]
5
+ fn compile(source: &str) -> PyResult<String> {
6
+ flutmax::compile(source)
7
+ .map_err(|e| PyErr::new::<pyo3::exceptions::PyValueError, _>(e))
8
+ }
9
+
10
+ /// Decompile .maxpat JSON string to .flutmax source.
11
+ #[pyfunction]
12
+ fn decompile(maxpat_json: &str) -> PyResult<String> {
13
+ flutmax::decompile(maxpat_json)
14
+ .map_err(|e| PyErr::new::<pyo3::exceptions::PyValueError, _>(e))
15
+ }
16
+
17
+ /// Parse .flutmax source and return AST as JSON string.
18
+ #[pyfunction]
19
+ fn parse(source: &str) -> PyResult<String> {
20
+ flutmax::parse_to_json(source)
21
+ .map_err(|e| PyErr::new::<pyo3::exceptions::PySyntaxError, _>(e))
22
+ }
23
+
24
+ /// flutmax Python module
25
+ #[pymodule]
26
+ fn flutmax_py(m: &Bound<'_, PyModule>) -> PyResult<()> {
27
+ m.add_function(wrap_pyfunction!(compile, m)?)?;
28
+ m.add_function(wrap_pyfunction!(decompile, m)?)?;
29
+ m.add_function(wrap_pyfunction!(parse, m)?)?;
30
+ m.add("__version__", "0.1.0")?;
31
+ Ok(())
32
+ }
@@ -0,0 +1,33 @@
1
+ """Basic tests for flutmax Python bindings."""
2
+ import flutmax_py
3
+ import json
4
+
5
+ def test_compile():
6
+ source = "wire osc = cycle~(440);\nout audio: signal = osc;\n"
7
+ result = flutmax_py.compile(source)
8
+ data = json.loads(result)
9
+ assert "patcher" in data
10
+
11
+ def test_compile_error():
12
+ try:
13
+ flutmax_py.compile("wire osc = ;")
14
+ assert False, "should raise"
15
+ except ValueError:
16
+ pass
17
+
18
+ def test_parse():
19
+ source = "in freq: float;\nwire osc = cycle~(freq);\nout audio: signal = osc;\n"
20
+ result = flutmax_py.parse(source)
21
+ data = json.loads(result)
22
+ assert "wires" in data
23
+ assert "in_decls" in data
24
+
25
+ def test_version():
26
+ assert flutmax_py.__version__ == "0.1.0"
27
+
28
+ if __name__ == "__main__":
29
+ test_compile()
30
+ test_compile_error()
31
+ test_parse()
32
+ test_version()
33
+ print("All Python tests passed!")
@@ -0,0 +1,19 @@
1
+ [package]
2
+ name = "flutmax"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ license = "MIT"
6
+ repository = "https://github.com/nordsound/flutmax"
7
+ description = "Transpiler between .flutmax text and Max/MSP .maxpat patches"
8
+ keywords = ["max-msp", "audio", "transpiler", "dsl"]
9
+ categories = ["parser-implementations", "multimedia::audio"]
10
+ readme = "README.md"
11
+
12
+ [dependencies]
13
+ flutmax-ast = { version = "0.1.0", path = "../flutmax-ast" }
14
+ flutmax-parser = { version = "0.1.0", path = "../flutmax-parser" }
15
+ flutmax-sema = { version = "0.1.0", path = "../flutmax-sema" }
16
+ flutmax-codegen = { version = "0.1.0", path = "../flutmax-codegen" }
17
+ flutmax-decompile = { version = "0.1.0", path = "../flutmax-decompile" }
18
+ flutmax-objdb = { version = "0.1.0", path = "../flutmax-objdb" }
19
+ serde_json = "1"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nordsound
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # flutmax
2
+
3
+ Transpiler between .flutmax text and Max/MSP .maxpat patches.
4
+
5
+ Part of the [flutmax](https://github.com/nordsound/flutmax) workspace.
6
+
7
+ ## Overview
8
+
9
+ Unified facade crate that re-exports the entire flutmax compiler pipeline. Provides high-level `compile()`, `decompile()`, and `parse_to_json()` functions for common workflows.
10
+
11
+ ## Usage
12
+
13
+ ```rust
14
+ // Compile .flutmax source to .maxpat JSON
15
+ let maxpat = flutmax::compile("out audio: signal;\nwire osc = cycle~(440);\nout[0] = osc;").unwrap();
16
+
17
+ // Decompile .maxpat JSON back to .flutmax source
18
+ let source = flutmax::decompile(&maxpat).unwrap();
19
+
20
+ // Parse to AST and return as JSON (useful for bindings)
21
+ let ast_json = flutmax::parse_to_json("wire osc = cycle~(440);").unwrap();
22
+ ```
23
+
24
+ ## Sub-crate access
25
+
26
+ For advanced usage, sub-crates are re-exported:
27
+
28
+ ```rust
29
+ use flutmax::ast;
30
+ use flutmax::parser;
31
+ use flutmax::sema;
32
+ use flutmax::codegen;
33
+ use flutmax::objdb;
34
+ use flutmax::decompile;
35
+ ```
36
+
37
+ ## License
38
+
39
+ MIT