Remix.run Logo
ViktorEE 2 days ago

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.

zephen a day ago | parent | next [-]

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

yonatan8070 16 hours ago | parent | prev | next [-]

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)

abeyer 10 hours ago | parent | next [-]

There's already some work in that direction, too: https://github.com/theacodes/kicanvas

ViktorEE 14 hours ago | parent | prev [-]

That's a neat idea! To be honest my brain is overflowing with ideas too, right now I want to just bring all the apps one. Or... Actually just bring the layout editor up first :) I'm trying hard to live in the present...

14 hours ago | parent [-]
[deleted]
dilawar a day ago | parent | prev | next [-]

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.

fcoury a day ago | parent [-]

Very interesting. Is it or will it be open source? Any links?

dilawar a day ago | parent [-]

dsn parser is open source, https://github.com/dilawar/dsn-parser (WIP). Some part of PCB routing will be open-source (MIT).

burgerone 2 days ago | parent | prev | next [-]

Awesome Project! Would love to hear more!

ViktorEE 2 days ago | parent [-]

Heyythanks! Feel free to bug me at viktor.vaczi(at)emergence-engineering.com I'd love to chat about it :)

mikeayles 2 days ago | parent [-]

Have you checked out circuitsnips and kicanvas?

ViktorEE a day ago | parent [-]

I did check kicanvas, but I didn't know about circutsnips, I had the same idea for years! It's great!

sulicat a day ago | parent | prev | next [-]

This is a great project! Thanks for tackling it!

platevoltage a day ago | parent | prev [-]

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