{"_id":"@vocs/twoslash-rust","_rev":"3-0db74325562b8cd20297f41c6ad7dbf7","name":"@vocs/twoslash-rust","dist-tags":{"latest":"0.1.0","rc":"0.1.0-rc.0"},"versions":{"0.0.1":{"name":"@vocs/twoslash-rust","version":"0.0.1","license":"MIT","_id":"@vocs/twoslash-rust@0.0.1","maintainers":[{"name":"jmoxey","email":"jakemoxey@gmail.com"},{"name":"awkweb","email":"tom@meagher.co"}],"dist":{"shasum":"255f76cd2c3597269f3ebe720f7c36abb770089f","tarball":"https://registry.npmjs.org/@vocs/twoslash-rust/-/twoslash-rust-0.0.1.tgz","fileCount":1,"integrity":"sha512-N71Oiu98G8OGDxU0qwrEYP42fGPFKmHra8a2D+BURF18/5GpG0Qdsj66tnebUcL5Eh1WrxQ3lxzutg/mYcCUbw==","signatures":[{"sig":"MEUCIFzjRTUeZ2DNCmZlWa3bwh5vUqNTXKU+GwZ+cPeGNLbiAiEAw7OVzfO1w/raDbdXFq5UedwdEq1O4R6GZwVspv0lIMA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126},"_from":"file:vocs-twoslash-rust-0.0.1.tgz","_npmUser":{"name":"awkweb","email":"tom@meagher.co"},"_resolved":"/private/var/folders/db/tyxfhzcn72jdrb0bxp4r449w0000gn/T/f8dc896c54866f779cb2ea2cd30547ba/vocs-twoslash-rust-0.0.1.tgz","_integrity":"sha512-N71Oiu98G8OGDxU0qwrEYP42fGPFKmHra8a2D+BURF18/5GpG0Qdsj66tnebUcL5Eh1WrxQ3lxzutg/mYcCUbw==","_npmVersion":"11.5.1","directories":{},"_nodeVersion":"24.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/twoslash-rust_0.0.1_1768578592002_0.7224710536904446","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc.0":{"name":"@vocs/twoslash-rust","version":"0.1.0-rc.0","license":"MIT","_id":"@vocs/twoslash-rust@0.1.0-rc.0","maintainers":[{"name":"jmoxey","email":"jakemoxey@gmail.com"},{"name":"awkweb","email":"tom@meagher.co"}],"homepage":"https://github.com/wevm/vocs#readme","bugs":{"url":"https://github.com/wevm/vocs/issues"},"bin":{"twoslash-rust":"dist/bin.js","twoslash-rust.src":"src/bin.ts"},"dist":{"shasum":"d31c1ebdebfeaf6d5e621bb496664e23ae168ca8","tarball":"https://registry.npmjs.org/@vocs/twoslash-rust/-/twoslash-rust-0.1.0-rc.0.tgz","fileCount":12,"integrity":"sha512-oU4TY7wtwMO2NTryaozWKeAoLaF2jkBbj5H9VD/ODzLyGHR+XqYa+XIID/IceLwaeBh5iSXErnpDYC1QYQOiIg==","signatures":[{"sig":"MEUCIC/YrrvvS6GUHxqxHzM11pzy6Cu54h3J5NLqA6AOhpIOAiEA8BzF30IZnMPrIekl+EVAKz0py+O0J38VHExid+jFqMU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vocs%2ftwoslash-rust@0.1.0-rc.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9301},"main":"./dist/index.js","type":"module","_from":"file:vocs-twoslash-rust-0.1.0-rc.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"src":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"zile","build:npm":"node --experimental-strip-types scripts/build-npm.ts","build:rust":"cargo build --release"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5a28eef1-4583-4d11-80ee-faabaf94a35f"}},"_resolved":"/tmp/3fd730cd4391cd936e8184384d78c424/vocs-twoslash-rust-0.1.0-rc.0.tgz","_integrity":"sha512-oU4TY7wtwMO2NTryaozWKeAoLaF2jkBbj5H9VD/ODzLyGHR+XqYa+XIID/IceLwaeBh5iSXErnpDYC1QYQOiIg==","repository":{"url":"git+https://github.com/wevm/vocs.git","type":"git"},"_npmVersion":"11.5.1","description":"Twoslash backend for Rust code, powered by `rust-analyzer`. Extracts type information, hover docs, and completions from Rust code.","directories":{},"sideEffects":false,"_nodeVersion":"24.5.0","dependencies":{"detect-libc":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"zile":"^0.0.19","typescript":"^5.9.3"},"optionalDependencies":{"@vocs/twoslash-rust-darwin-arm64":"0.1.0-rc.0","@vocs/twoslash-rust-linux-x64-gnu":"0.1.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/twoslash-rust_0.1.0-rc.0_1779678353430_0.9624594378933948","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@vocs/twoslash-rust","version":"0.1.0","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/wevm/vocs.git"},"main":"./dist/index.js","bin":{"twoslash-rust":"dist/bin.js","twoslash-rust.src":"src/bin.ts"},"exports":{".":{"types":"./dist/index.d.ts","src":"./src/index.ts","default":"./dist/index.js"}},"dependencies":{"detect-libc":"^2.0.3"},"devDependencies":{"typescript":"^5.9.3","zile":"^0.0.19"},"optionalDependencies":{"@vocs/twoslash-rust-darwin-arm64":"0.1.0","@vocs/twoslash-rust-linux-x64-gnu":"0.1.0"},"sideEffects":false,"module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"zile","build:rust":"cargo build --release","build:npm":"node --experimental-strip-types scripts/build-npm.ts"},"_id":"@vocs/twoslash-rust@0.1.0","description":"Twoslash backend for Rust code, powered by `rust-analyzer`. Extracts type information, hover docs, and completions from Rust code.","bugs":{"url":"https://github.com/wevm/vocs/issues"},"homepage":"https://github.com/wevm/vocs#readme","_integrity":"sha512-kUTNzVB3GNPmsZgHXoysCCiPX9fh1EB3pSH+iCVk4wy++ofv8yx6vb5vnc2d9RNweUFIFcV6hpIJRqgE07kOvA==","_resolved":"/tmp/6d667cae701770bde9c068904f5950de/vocs-twoslash-rust-0.1.0.tgz","_from":"file:vocs-twoslash-rust-0.1.0.tgz","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-kUTNzVB3GNPmsZgHXoysCCiPX9fh1EB3pSH+iCVk4wy++ofv8yx6vb5vnc2d9RNweUFIFcV6hpIJRqgE07kOvA==","shasum":"9b944114b79290e4ba4289994dc7874cf9614b5d","tarball":"https://registry.npmjs.org/@vocs/twoslash-rust/-/twoslash-rust-0.1.0.tgz","fileCount":12,"unpackedSize":9286,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vocs%2ftwoslash-rust@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE+URME/9f5oMyZrFXdV8wkvvKzzuIZXmAdGF6wT9YX9AiEA6VTyO8j61S3l2nrd9MMT0+E1JJr1UWwRKEqgJ5sM/IY="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5a28eef1-4583-4d11-80ee-faabaf94a35f"}},"directories":{},"maintainers":[{"name":"jmoxey","email":"jakemoxey@gmail.com"},{"name":"awkweb","email":"tom@meagher.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/twoslash-rust_0.1.0_1779818169316_0.9579108343857399"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-16T15:49:51.881Z","modified":"2026-05-26T17:56:09.887Z","0.0.1":"2026-01-16T15:49:52.149Z","0.1.0-rc.0":"2026-05-25T03:05:53.589Z","0.1.0":"2026-05-26T17:56:09.465Z"},"license":"MIT","maintainers":[{"name":"jmoxey","email":"jakemoxey@gmail.com"},{"name":"awkweb","email":"tom@meagher.co"}],"readme":"# twoslash-rust\n\nTwoslash backend for Rust code, powered by `rust-analyzer`. Extracts type information, hover docs, and completions from Rust code.\n\n## Installation\n\n```bash\ncargo install twoslash-rust\n```\n\n## Usage\n\nPipe Rust code to the binary via stdin:\n\n```bash\necho 'fn main() { let x = 42; }' | twoslash-rust\n```\n\nOutput is JSON with type information:\n\n```json\n{\n  \"hovers\": [\n    {\n      \"text\": \"i32\",\n      \"line\": 0,\n      \"character\": 16,\n      \"length\": 1\n    }\n  ],\n  \"queries\": [],\n  \"completions\": [],\n  \"highlights\": [],\n  \"errors\": []\n}\n```\n\nUse twoslash query markers (`//  ^?`) to extract types at specific positions:\n\n```bash\necho 'fn main() {\n  let x = 42;\n//    ^?\n}' | twoslash-rust\n```\n\n### Options\n\n- `--cargo-toml <path>` — Use a custom `Cargo.toml` for dependencies\n- `--target-dir <path>` — Specify a custom target directory for caching\n\n### Server Mode\n\nSet `TWOSLASH_SERVER_UUID` to run as a persistent TCP server for faster repeated queries:\n\n```bash\nTWOSLASH_SERVER_UUID=abc123 twoslash-rust\n# Outputs: 127.0.0.1:<port>\n```\n\n## Development\n\nBuild the binary:\n\n```bash\ncargo build --release\n```\n\nUse `--release` for development. `rust-analyzer` is slow at indexing sysroot in debug builds.\n","readmeFilename":"README.md","description":"Twoslash backend for Rust code, powered by `rust-analyzer`. Extracts type information, hover docs, and completions from Rust code.","homepage":"https://github.com/wevm/vocs#readme","repository":{"type":"git","url":"git+https://github.com/wevm/vocs.git"},"bugs":{"url":"https://github.com/wevm/vocs/issues"}}