@cgasgarth/opencode-for-rust 1.1.0-next.1 → 1.1.1-next.1

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 (3) hide show
  1. package/README.md +14 -3
  2. package/dist/index.js +12417 -59
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -6,10 +6,10 @@ OpenCode plugin for Rust
6
6
 
7
7
  ## Features
8
8
 
9
- - Automatic Type Injection: Automatically analyzes Rust files and injects relevant type definitions (structs, enums, traits) into the context when you read a file.
10
- - Type Lookup: Includes a `lookup_type` tool to find specific Rust type definitions by name.
9
+ - Automatic Type Injection: Automatically analyzes Rust files and injects an outline of defined types (structs, enums, traits, functions) at the end of file content when you read a `.rs` file.
10
+ - Type Lookup: Includes a `lookup_type` tool to find specific Rust type definitions by name across the entire project.
11
11
  - Type Listing: Includes a `list_types` tool to see all available Rust types in the project.
12
- - Regex-based Parser: Uses a lightweight regex-based parser for robust compatibility across all JavaScript runtimes.
12
+ - Regex-based Parser: Uses a lightweight, zero-dependency regex-based parser that works reliably in all JavaScript environments (Node.js, Bun, OpenCode).
13
13
  - Zero Configuration: Works out of the box for standard Rust projects.
14
14
 
15
15
  ## Tools
@@ -56,3 +56,14 @@ https://github.com/cgasgarth/opencode-for-rust
56
56
  ## License
57
57
 
58
58
  MIT
59
+
60
+ ## Known Limitations
61
+
62
+ **Automatic Type Injection**: The hook for automatic type injection when reading `.rs` files is currently not functional in OpenCode's environment. This appears to be due to differences in how OpenCode's plugin system processes hook registration or type expectations compared to the TypeScript plugin.
63
+
64
+ **Manual Tools**: The following tools work correctly and can be used as alternatives:
65
+
66
+ - `lookup_type`: Successfully retrieves Rust type definitions by name (verified: 413 types found in kalshi-tools)
67
+ - `list_types`: Successfully lists all Rust type names in the project (verified: 413 types found in kalshi-tools)
68
+
69
+ The plugin loads without errors and uses a cross-platform regex-based parser that eliminates the WASM dependency issues that caused earlier crashes.