-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hey @danchitnis , wondering if you would publish a module that publishes the ngspice bindings as a standalone javascript/wasm module.
So somebody could do e.g.
npm add eecircuitI'm not 100% sure on the API, but something like this?
import { SpiceSimulation } from "eecircuit"
const spiceSim = new SpiceSimulation()
spiceSim.setSpice(`
voltage divider netlist
V1 in 0 1
R1 in out 1k
R2 out 0 2k
.end
`)
await spiceSim.run()I organized the API such that it could maybe stream responses eventually which i think ngspice is capable of.
I would love to help contribute this if it's interesting to you. My biggest concern (something I would need to report back on) is the loader. Runtimes like bun and deno can directly import WASM but IIRC it's not that simple with other runtimes.
If this isn't interesting and you'd like this repo to stay at the application level that's ok as well!
Metadata
Metadata
Assignees
Labels
No labels