Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Rust integration #108

Closed
wants to merge 92 commits into from
Closed

Rust integration #108

wants to merge 92 commits into from

Conversation

marioortizmanero
Copy link
Member

@marioortizmanero marioortizmanero commented Aug 25, 2020

Very WIP PR of the Rust integration mentioned in #107. Only the Vidify core is rewritten into Rust, leaving the GUI and similar elements in Python for now. Audiosync is also being re-implemented in Rust at https://github.com/vidify/audiosync-rs, in a separate crate so that it can be used by anyone outside of Vidify, too.

Tasks:

  • New config file and argument parser: more performant and reliable, based on https://github.com/vidify/structconf, and the API/Player structure is relatively similar to the Python implementation, with some minor changes.
  • Remove support for VLC and QtWebEngine, as explained here. Vidify will now focus more on being easy to install and distribute, trying to be shipped in a single bundled binary.
  • Automatic CI and tests for Rust, update Dockerfile
  • New Python CI with black
  • Deprecate old audiosync implementation
  • Integrate Dependabot, this should happen after the merge
  • New improved build system with a python script
  • Proper error handling from Rust to Python, blocked by Add a proc macro for exceptions PyO3/pyo3#295 so maybe later on
  • Update tests and add new ones
  • Update documentation
  • Use web server for Spotify API authentication instead of Qt Web Engine
  • Consider implementing audiosync in this crate instead of a separate one

With the new Rust implementation, VLC suport is dropped. This is mainly
because it doesn't work well with automatic synchronization because it's
not precise enough.

QtWebEngine is also dropped in place of a small web server in the Rust
implementation that asks the user to log in, and automatically obtains
the authentication information. This considerably reduces the size and
complexity of Vidify, since shipping an entire webkit is excessive for
the small usage it had, and anyone has a web browser around anyway.

Vidify is now less modular as well, which means that it's much easier to
distribute and install. It will from now on include support for all APIs
and Players, optionally being able to include new ones manually.
@marioortizmanero marioortizmanero marked this pull request as draft August 25, 2020 22:08
@marioortizmanero marioortizmanero self-assigned this Aug 25, 2020
It's not worth it re-writing *everything* in Rust. I'll just use a
couple of things like the config and resource management, and audiosync
will be what's actually written in Rust.
marioortizmanero and others added 23 commits December 24, 2020 02:22
…/pyo3-0.13.0

Bump pyo3 from 0.12.4 to 0.13.0
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/master/CHANGELOG.md)
- [Commits](PyO3/pyo3@v0.13.0...v0.13.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>
…/pyo3-0.13.1

Bump pyo3 from 0.13.0 to 0.13.1
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.118 to 1.0.123.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.118...v1.0.123)

Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/master/CHANGELOG.md)
- [Commits](PyO3/pyo3@v0.13.1...v0.13.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.22 to 1.0.24.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.22...1.0.24)

Signed-off-by: dependabot-preview[bot] <[email protected]>
…/thiserror-1.0.24

Bump thiserror from 1.0.22 to 1.0.24
…/pyo3-0.13.2

Bump pyo3 from 0.13.1 to 0.13.2
…/env_logger-0.8.3

Bump env_logger from 0.8.2 to 0.8.3
…/libpulse-binding-2.23.0

Bump libpulse-binding from 2.22.0 to 2.23.0
…/log-0.4.14

Bump log from 0.4.11 to 0.4.14
…/serde-1.0.123

Bump serde from 1.0.118 to 1.0.123
…/simplelog-0.10.0

Bump simplelog from 0.9.0 to 0.10.0
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.123 to 1.0.125.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.123...v1.0.125)

Signed-off-by: dependabot-preview[bot] <[email protected]>
…/serde-1.0.125

Bump serde from 1.0.123 to 1.0.125
@marioortizmanero
Copy link
Member Author

As the latest update in vidify.org stated, I will no longer try to directly integrate Rust into Vidify. Rather, the audiosync extension will work just like the previous one did: it'll be implemented in a lower level language (Rust instead of C) and have a set of Python bindings so that it can be used as an extension.

I will now try to refactor this PR and clean up what I've changed. Perhaps that'd be better off in a new PR.

@marioortizmanero marioortizmanero mentioned this pull request Jun 23, 2021
9 tasks
@marioortizmanero
Copy link
Member Author

I can confirm I will be working on this in a new PR: #159

@marioortizmanero marioortizmanero deleted the rust-integration branch June 23, 2021 19:49
@marioortizmanero marioortizmanero restored the rust-integration branch June 23, 2021 20:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant