why cant i start syncthing with the main.go

hello so im trything to run the cmd\syncthing\main.go i saw that there is the code where it actualy starts syncthing , but when i try to run it it i get random errors in the api like undefined: auto.Assets?

You can’t run it like that. The build script does some additional steps, such as bundling the GUI HTML assets. So you need to call build.go first and then run bin/syncthing. See Building Syncthing — Syncthing documentation

i know but it should work somehow like that too cus i cant just but those binarys in my project . i want to be abble to start syncthing using pure code like this go run main.go and it shoudl start syncthing

Then I guess you need to develop a patch that optionally removes the dependency on the auto package and uses the STGUIASSETS directory only. I can’t say whether that is the only needed change though. Syncthing source code is designed to be built first and then run, as documented.

Run packages, not files.

% go generate ./...
% go run ./cmd/syncthing

thank u sir , i appriciate it :smiley:

hey jakob , is it possible maybe just to take the syncthing package in cmd . and create a new project with just that package and start it? is it possible to generate somehow so i can get past the undefined auto.Assets . you method worked but im creating an project and i dont want to have to put the whole sorcecode of syncthing in my project so im searching for a way to look it more profesional