Skip to content

[FEAT] Build with CGO #97

@bt90

Description

@bt90

Is this a new feature request?

  • I have searched the existing issues

Wanted change

Syncthing v2 should be built as a static binary using CGO.

Reason for change

Syncthing v2 uses SQLite as its database backend. While the build without CGO is functional, the resulting binary is approximately 20% slower. The CGO built is also the version primarily shipped by the upstream project, which reduces the likelihood of users encountering edge cases or SQLite library related bugs.

Proposed code change

https://github.com/syncthing/syncthing/blob/6e9ccf7211aec68df5f15e4a4cceb6315b5d4c63/.github/workflows/build-syncthing.yaml#L314

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions