Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portability - libc dependency #37

Closed
jrolli opened this issue Feb 17, 2022 · 1 comment
Closed

Portability - libc dependency #37

jrolli opened this issue Feb 17, 2022 · 1 comment

Comments

@jrolli
Copy link
Contributor

jrolli commented Feb 17, 2022

Issue

The current configuration of the core library relies on sqlite3 which in turn relies on CGO and libc. This significantly reduces the portability of the Linux version of the released binaries. Specifically, the packaged version cannot be run on Ubuntu 18.04 because of a mismatch in the libc version.

Proposal

Change the sqlite3 dependency from using github.com/mattn/go-sqlite3 to modernc.org/sqlite. This should remove the libc runtime dependency and make the core library (and released binaries) significantly more portable across Linux distributions.

Concerns

  • Dependencies on recent features of sqlite: This should not be a significant concern as the new dependency makes a concerted effort to stay up to date with upstream sqlite.
  • Performance: The Go version of sqlite is not as performant as the CGO version in general. However, the database transactions are not generally on the critical path of cmgr functionality and shouldn't be a significant concern.
@jrolli
Copy link
Contributor Author

jrolli commented Feb 17, 2022

As an additional advantage, this may make it easier to add experimental support for Windows containers/challenges. The last time I looked at it, there are some implicit POSIX assumptions but it mostly worked.

@jrolli jrolli closed this as completed in bbd7d4a Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant