Skip to content

Commit c92da6a

Browse files
committed
Update language policy: Add Gleam, Tauri 2.0+, Dioxus
1 parent b6f937a commit c92da6a

File tree

1 file changed

+29
-39
lines changed

1 file changed

+29
-39
lines changed

.claude/CLAUDE.md

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
| **ReScript** | Primary application code | Compiles to JS, type-safe |
1010
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
1111
| **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 |
1215
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
1316
| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs |
1417
| **Python** | SaltStack only | No other Python permitted |
1518
| **Nickel** | Configuration language | For complex configs |
1619
| **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 |
1723

1824
### BANNED - Do Not Use
1925

@@ -26,7 +32,19 @@
2632
| pnpm/yarn | Deno |
2733
| Go | Rust |
2834
| 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).
3048

3149
### Enforcement Rules
3250

@@ -35,46 +53,18 @@
3553
3. **No node_modules in production** - Deno caches deps automatically
3654
4. **No Go code** - Use Rust instead
3755
5. **Python only for SaltStack** - All other Python must be rewritten
56+
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
3857

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
5359

54-
### Build Commands
60+
- **Primary**: Guix (guix.scm)
61+
- **Fallback**: Nix (flake.nix)
62+
- **JS deps**: Deno (deno.json imports)
5563

56-
```bash
57-
# ReScript build
58-
deno task res:build # or: npx rescript build
64+
### Security Requirements
5965

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
7869
- 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

Comments
 (0)