neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻譯準備中
Rust-powered native Node.js packages
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Monorepo of Rust-powered npm packages under @amigo-labs, built with napi-rs. See the dashboard for the package catalog, benchmarks, and install instructions.
CI does the same thing automatically: on each push to main it benches only the crates whose
crates/ / changed in that commit. Force a full rerun (e.g. after a toolchain bump) by
putting [full-bench] anywhere in the merge commit message.
Then edit crates/ /src/lib.rs and crates/ /Cargo.toml.檢視完整 README ↗Monorepo of Rust-powered npm packages under @amigo-labs, built with napi-rs. See the dashboard for the package catalog, benchmarks, and install instructions.
pnpm install
pnpm build
pnpm test
pnpm bench # performance benchmarks
pnpm build # all packages, release
pnpm build:debug # all packages, debug (faster compile)
cargo test --workspace # Rust unit tests
pnpm test # Node.js tests (vitest)
pnpm bench # run all benchmarks (vitest bench)
pnpm bench:report # run all benchmarks + size + parity, regenerate shards
node scripts/run-benchmarks.mjs --crates xxhash # only this crate; writes bench-results-xxhash.json at repo root
node scripts/run-benchmarks.mjs --only-changed # crates whose source changed vs origin/main
node scripts/generate-report.mjs # rebuild docs/data.json, generate docs/benchmarks/*.json, append history from fresh shards
CI does the same thing automatically: on each push to main it benches only the crates whose
crates/<name>/ changed in that commit. Force a full rerun (e.g. after a toolchain bump) by
putting [full-bench] anywhere in the merge commit message.
pnpm lint # oxlint + cargo fmt --check + cargo clippy
./scripts/new-package.sh <package-name>
Then edit crates/<name>/src/lib.rs and crates/<name>/Cargo.toml.
amigo-native/
├── crates/
│ ├── <package>/ # one directory per @amigo-labs/<package> (catalog: docs/packages.json)
│ └── _template/ # scaffold for new packages
├── scripts/
│ ├── new-package.sh # package generator
│ ├── run-benchmarks.mjs
│ ├── measure-size.mjs
│ ├── generate-report.mjs # rebuild docs/data.json
│ ├── sync-registry.mjs # single-source-of-truth registry sync
│ └── conformance-summary.mjs
├── .github/workflows/
│ ├── ci.yml # lint + test + benchmark (on main)
│ └── release.yml # cross-compile + npm publish
├── web/ # Astro source for the marketing + docs site
├── wrangler.toml # web/dist → Cloudflare Worker (Git integration)
├── Cargo.toml # workspace root
└── vitest.config.ts
Each crate is a standalone npm package with:
src/lib.rs#[napi] macros)npm/ (6 targets)__test__/, upstream conformance tests in __conformance__/, benchmarks in __bench__/MIGRATION.md when the package is not a 100% drop-in replacementTag with <crate-name>@<version> (e.g. [email protected]) to trigger the release workflow. It cross-compiles for 6 targets and publishes to npm with provenance.
| Target | OS | Arch |
|---|---|---|
x86_64-unknown-linux-gnu | Linux | x64 |
x86_64-unknown-linux-musl | Linux (Alpine) | x64 |
aarch64-unknown-linux-gnu | Linux | ARM64 |
x86_64-apple-darwin | macOS | x64 |
aarch64-apple-darwin | macOS | ARM64 |
x86_64-pc-windows-msvc | Windows | x64 |
MIT