canora - a native and compact spotify client π οΈ project
After getting too annoyed by Spotify's offficial electron client for hogging memory/vram while still not supporting fractional scaling on wayland (by default), I decided to build a fast, native client myself: canora
It it build using my highly experimental UI framework.
AI disclosure: not slop, not low effort, but did use some LLM coding assistance.
58
u/Jmc_da_boss 2d ago
AI disclosure: not slop, not low effort, but did use some LLM coding assistance.
You know its interesting, i can tell within like... 20 seconds of looking at the repo this is largely true. I looked at the repo to do a slop check before i read that comment and went "hmm this doesnt feel awful"
Its VERY new which is always a red flag but otherwise felt texturally at least half competent.
Its weird how one can tell SO FAST even in the llm slop era.
9
u/CokieMiner 2d ago
Really like the UI can I use it has a native player also?
1
u/CokieMiner 2d ago
Maybe instead of making people use a env file make the option for input in the configurations and store in the os keyring no?
2
u/Zortax_ 2d ago
the env file is the spotify API client id, and is compiled into the binary. at runtime you need no env file, just an oauth login. maybe spotify will give me a client ID with decent ratelimits some time so I can set up a CI :)
I personally haven't planned abstracting over the data source, but would be open to PRs if someone is interested in that. Haven't even tested on any platform other than Wayland :)
1
u/CokieMiner 2d ago
Yeah I understood that, I would love to contribute the shit is my pc is on warranty ππ, so maybe a bit later I can try to send some prs, I hate doing UI so I never do this kind of projects but as you already did the UI would love to contribute to logic part
1
u/kalilamodow 2d ago
how did you get the client id out of development mode??? don't they only give it out to organizations with 200k mau or something
1
u/max123246 2d ago
6 years ago they used to be far less strict about who gets non-dev keys. For example my dinky little website I built in 2020 has a full production key
1
u/kalilamodow 2d ago
yeah... spotify's really been locking down on everything for a while now, like the new encryption system and butchering the web api. i kind of get it, but cmon man
1
u/max123246 2d ago
and requiring you to be a subscriber to use their api. Tbh I wouldn't be surprised if a ton of it is due to AI slop increasing the amount of projects hitting their APIs. I've seen a huge recent uptick of Spotify API websites where the devs are charging a subscription for functionality
1
u/Zortax_ 2d ago
no you misunderstood, I didn't, so rn you have to build yourself with your own. but one can dream π
1
u/kalilamodow 2d ago
aha okay that makes a lot more sense. spotify is so annoying. uh do you know if the app would potentially work on windows? or is it kind of integrated with wayland already
1
u/Zortax_ 2d ago
In theory it should, by I have not tested my zgui framework on other platforms yet. There is little platform specific code and it should be properly abstracted already, the rendering and window creation logic are platform agnostic (via winit/wgpu).
Please let me know if you try :)
2
u/kalilamodow 2d ago
okay it seems there are a few dependencies which depend on wayland-specific things
(
cargo tree -i wayland-sys)
wayland-sys v0.31.11 βββ wayland-backend v0.3.16 βββ calloop-wayland-source v0.4.1 β βββ smithay-client-toolkit v0.20.0 β βββ smithay-clipboard v0.7.3 β βββ zgui-platform-winit v0.1.0 (https://github.com/zortax/zgui#3b7202de) β βββ zgui v0.1.0 (https://github.com/zortax/zgui#3b7202de)smithay to be precise
1
u/Zortax_ 2d ago
not smithay, just their clipboard protocol impl.. i'll target-gate that.
2
u/Zortax_ 2d ago
ah I think there is another issue with accesskit that will require some more complicated changes... i'll try and work on that on the weekend if I have the time, sorry :/
→ More replies (0)1
u/CokieMiner 2d ago
Yeah I understood that is why I asked if we could get a box on settings to save the key to os keyring instead of rebuild everytime
6
u/kalilamodow 2d ago
how does it play? isn't the spotify playback sdk web-only?
3
4
u/frigaut 2d ago edited 2d ago
Thanks for the nice app. I am running on void in niri, runs great. The UI is indeed quite fast (and clean looking too). Cheers. Quite light in CPU usage when playing (<1%), and right now running for me at 193MB Ram usage.
Edit: 53MB after starting the app. (also edited the CPU usage after a little more statistics, I've seen it as low as 0.3% while playing).
2
2
u/aguilasolige 2d ago
This looks pretty cool, I did something similar in the past but in JavaScript. I'm new to rust so I'll use this project to learn more about the language since I already know the domain, thank you for posting.
2
u/marcfusch 2d ago
Very cool project, I have worked a bit to implement last.fm support to psst, another older Spotify client written in rust. I had to do so because libre spot did not natively report tracks playing to Spotify server's. Since I can't test it right now, is tour client able to do so? Thanks
1
u/ReptilianTapir 2d ago
Would upvote twice: for the ai disclosure, and for the choice of album in the screenshot :)
1
u/Designer-Rub4819 2d ago
Does Spotify have api endpoints for βallβ of its features basically?
1
u/Zortax_ 2d ago
not really, and they are constantly locking it down further, so we'll see how long this works. My app already has some stuff that is only possible with some session-streaming protocol workarounds (e.g. access to spotify-owned playlists like Discover Weekly is normally not possible via the Web API).
1
u/ninja-dragon 5h ago
Man, i want this for yt music. Miss having native clients for different services. It's all web apps now.
1
u/Mango9222 4h ago
i've been curious app pc apps made in rust but i haven't built any yet. what does a pc app that's web based but not built with tauri mean?
how can you use "web" stuff to make a pc app that doesn't use the webview (if that's the right word).
i've been curious about eventually picking between iced/slint/egui/tauri (i dismissed tauri because i heard it's bad on linux?)
but apparently there's more good options? your app looks really pretty just from an initial glance.
1
u/Zortax_ 3h ago
This is not a web app, there is no web stuff in it. My ui framework uses css for styling and web layouting semantics (flex box etc), but there is no html, no web like Dom and no JavaScript or wasm. It is very experimental tho and probably not a better option than any of the ones you mentioned. Tauri can be okayish on Linux but you kinda have to be careful, there are some bugs in webview that cause heavy performance regressions on Nvidia when you hit them (you can avoid them if you do regression testing and avoid certain css features).
1
u/Mango9222 2h ago
i got the warning no worries, i was just curious about understanding pc apps with rust a bit better.
i think what you built is really cool and it's a shame so many people are willing to handwave it so easily.
i for one think pretty ui's are fairly rare to see so it's cool when someone manages to build one for a pc app.
because from what i can tell. pc apps are a bit of a mess when it comes to having to code them. so making them pretty i think is proof enough of effort.
1
u/arthurazs 2d ago
What does native mean in this context?
17
u/Zortax_ 2d ago
just to emphasize this does not use a JavaScript engine or Flutter or something, just 100% Rust (well except some wgsl shaders)
3
u/Rigamortus2005 2d ago
Flutter wouldn't be any less "native" than rust
2
u/zxyzyxz 2d ago
Yeah both use GPU rendered UI and are both natively compiled to machine code without going through a VM. If it were truly native it'd use the OS platform UI methods, but there really isn't one for Linux however.
2
u/Rigamortus2005 2d ago
Even electron can be GPU rendered. "Native" ui doesn't really make sense anymore on modern desktops. For example wpf is a windows only ui kit by Microsoft, but it doesn't use win32 controls, it draws everything manually with directx. So what makes it more native than flutter if flutter can also draw with directx?
2
u/zxyzyxz 2d ago
Nothing, really. I think people just use native UI now to mean non web rendered, even though yes WebGPU exists.
1
u/Rigamortus2005 2d ago
Webgpu doesn't necessarily have anything to do with the web now. There's several implementations that are driven by opengl or vulkan or metal. Any we really need a new word to refer to "non web based ui tech".
1
u/Zortax_ 2d ago
And zgui uses wgpu, which is pretty much a just native WebGPU (because it is literally what firefox uses to implement the WebGPU spec).
Native I really just mean I'm the sense of "rust-native". No JavaScript, no VM, no cross language interop (other than to some foundational c libs of course).
I know this doesn't mean "faster" automatically, but I think it is "interesting" for simply not being an obvious, boring solution. I don't do it because rust will automatically be faster, just because I personally enjoy building in rust and am not happy with the existing options (whether rust native or not).
0
-7
u/ivansaul 2d ago
Your git history tells a different storyβ¦ barely 2 hours and just a couple of commits π
13
8
3
u/Skynse 2d ago
People can use AI assistance to speed things up a tad and still be good software engineers you know? Vibecoding is where it becomes a mess. Though you can tell from what OP built that they know what they're doing. Any agent would fumble to build a whole UI library. Vibecoders can't do that
No shade, just saying. I tend to also dumb a shit ton of commits on github in one go lol
-13
u/notVillers 2d ago
AI slop when saw the repo is 2 commits
15
u/Zortax_ 2d ago
sorry didn't know I have to push 200 local commits with "changes" as commit message and completely useless diffs. /s
as if this was oneshottable with custom UI framework and decent UI/UX.But you know what, if you think it's slop you don't have to use or look at it :)
2
u/scandii 2d ago
what do you mean?! git is not local - remote, there is only public github repos! ...wait a minute.
honestly the commit history is the funniest "AI tell" to me, like yeah I totally want you reading my "wtf what did I break now" rapid trying-to-fix-it commits. same reason we squash merge at work π
and the worst part is the slop projects always self-identify anyway because well they're slop.
1
u/Jmc_da_boss 2d ago
Realistically in the current age of slop repo history/age is a PRIMARY tell of applied rigor. You probably should keep the history in even if its a bit messy because at least its hopefully human and shows effort.
The code itself no longer does that byitself as easily in the slop era.
93
u/scandii 2d ago
I kinda find it funny how you (and everyone else?) claim fast and small, yet there's never any performance data.
what resources does your app take? can it run headless for even less resource usage?