logoalt Hacker News

ViktorEElast Sunday at 8:22 PM6 repliesview on HN

I'm working on porting KiCad to the browser. It's a lot of sweat and tears, multithreading issues and some more sweat. I've updated a port of WxWidgets and now I support all the features KiCad needs with ~200 tests.

Right now I have a build that loads in the browser, but I really want to have "multithreading" which means workers in the web. One can use asyncify with emscripten to translate blocking C++ to WASM, but that transition is not perfect, right now I'm debugging a bug where there's a race condition that halts all execution and the main thread runs in an infinite loop waiting for the workers to stand up. I guess I'll have a few of those ahead.

The main goal is to 1. just have fun 2. use yjs as a collab backend so multiple people can edit the same PCB. This will probably work with pcbnew, KiCad's layout editor, since it has a plugin system and AFAIK I can do the sync layer there. For the rest ( schematic, component editor etc. ) I'll have to figure out something.. KiCad does not sync automatically if you modify a file, I'll have to do some lifting there.

Anyway, it's a lot of fun, I really want this thing to exist, I'm hoping that I won't run into a "wellll, this is just not going to work" kind of issue in the end.


Replies

yonatan8070yesterday at 8:19 PM

That's super cool! Not needing to install is great for accessibility for new users, and I think this would also be cool if it can be embedded into other websites as a viewer (like imagine opening up a Git repo with KiCAD files in it and being able to explore them in an integrated viewer)

show 2 replies
zephenyesterday at 4:22 AM

Excellent. kicad is cool; zero install should be a good gateway drug.

sulicatyesterday at 2:39 PM

This is a great project! Thanks for tackling it!

dilawaryesterday at 2:32 AM

I just finished a dsn parser and now I am planning to write a pcb router. All in rust. The plan is to have a wasm/wasi version as well so routing is possible in the browser.

show 1 reply
burgeronelast Sunday at 10:11 PM

Awesome Project! Would love to hear more!

show 1 reply
platevoltageyesterday at 5:38 AM

That is very cool. I can't wait to try it out!