|
9 | 9 | | **ReScript** | Primary application code | Compiles to JS, type-safe | |
10 | 10 | | **Deno** | Runtime & package management | Replaces Node/npm/bun | |
11 | 11 | | **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools | |
| 12 | +| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI | |
| 13 | +| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like | |
| 14 | +| **Gleam** | Backend services | Runs on BEAM or compiles to JS | |
12 | 15 | | **Bash/POSIX Shell** | Scripts, automation | Keep minimal | |
13 | 16 | | **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs | |
14 | 17 | | **Python** | SaltStack only | No other Python permitted | |
15 | 18 | | **Nickel** | Configuration language | For complex configs | |
16 | 19 | | **Guile Scheme** | State/meta files | STATE.scm, META.scm, ECOSYSTEM.scm | |
| 20 | +| **Julia** | Batch scripts, data processing | Per RSR | |
| 21 | +| **OCaml** | AffineScript compiler | Language-specific | |
| 22 | +| **Ada** | Safety-critical systems | Where required | |
17 | 23 |
|
18 | 24 | ### BANNED - Do Not Use |
19 | 25 |
|
|
26 | 32 | | pnpm/yarn | Deno | |
27 | 33 | | Go | Rust | |
28 | 34 | | Python (general) | ReScript/Rust | |
29 | | -| Java/Kotlin | Rust | |
| 35 | +| Java/Kotlin | Rust/Tauri/Dioxus | |
| 36 | +| Swift | Tauri/Dioxus | |
| 37 | +| React Native | Tauri/Dioxus | |
| 38 | +| Flutter/Dart | Tauri/Dioxus | |
| 39 | + |
| 40 | +### Mobile Development |
| 41 | + |
| 42 | +**No exceptions for Kotlin/Swift** - use Rust-first approach: |
| 43 | + |
| 44 | +1. **Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0 |
| 45 | +2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0 |
| 46 | + |
| 47 | +Both are FOSS with independent governance (no Big Tech). |
30 | 48 |
|
31 | 49 | ### Enforcement Rules |
32 | 50 |
|
|
35 | 53 | 3. **No node_modules in production** - Deno caches deps automatically |
36 | 54 | 4. **No Go code** - Use Rust instead |
37 | 55 | 5. **Python only for SaltStack** - All other Python must be rewritten |
| 56 | +6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus |
38 | 57 |
|
39 | | -### ReScript Conventions |
40 | | - |
41 | | -- Output format: ES6 modules (`"module": "es6"` in rescript.json) |
42 | | -- File extension: `.res` (compiled to `.res.js`) |
43 | | -- Use `@rescript/core` for stdlib |
44 | | -- Bindings in `src/bindings/` directory |
45 | | - |
46 | | -### Deno Conventions |
47 | | - |
48 | | -- Import maps in `deno.json` |
49 | | -- Permissions explicitly declared |
50 | | -- Use `Deno.Command` not shell execution |
51 | | -- Format with `deno fmt` |
52 | | -- Lint with `deno lint` |
| 58 | +### Package Management |
53 | 59 |
|
54 | | -### Build Commands |
| 60 | +- **Primary**: Guix (guix.scm) |
| 61 | +- **Fallback**: Nix (flake.nix) |
| 62 | +- **JS deps**: Deno (deno.json imports) |
55 | 63 |
|
56 | | -```bash |
57 | | -# ReScript build |
58 | | -deno task res:build # or: npx rescript build |
| 64 | +### Security Requirements |
59 | 65 |
|
60 | | -# Run server |
61 | | -deno task start |
62 | | - |
63 | | -# Development |
64 | | -deno task dev |
65 | | -``` |
66 | | - |
67 | | -### Migration Priority |
68 | | - |
69 | | -When encountering banned languages: |
70 | | -1. **Immediate**: Block new code in banned languages |
71 | | -2. **Short-term**: Convert TypeScript to ReScript |
72 | | -3. **Medium-term**: Replace Node/npm with Deno |
73 | | -4. **Long-term**: Rewrite Go/Python in Rust |
74 | | - |
75 | | -## Code Quality |
76 | | - |
77 | | -- SPDX license headers on all files |
| 66 | +- No MD5/SHA1 for security (use SHA256+) |
| 67 | +- HTTPS only (no HTTP URLs) |
| 68 | +- No hardcoded secrets |
78 | 69 | - SHA-pinned dependencies |
79 | | -- No shell metacharacters in commands |
80 | | -- Whitelist approach for CLI subcommands |
| 70 | +- SPDX license headers on all files |
0 commit comments