librespeed / speedtest-rust

Rust backend for LibreSpeed
GNU Lesser General Public License v3.0
38 stars 7 forks source link

Happy defaults #12

Open drewwells opened 19 hours ago

drewwells commented 19 hours ago

I replaced speedtest-go with speedtest-rust and running into a couple configuration issues. I'll try to fix them, novice rust developer though.

listen_port="" // Rust is unhappy that this isn't a u16, it should default to 8080 when empty string is offered

sqlite can not start. It has write permissions to the directory so some issue is happening here. Error setup sqlite SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: speedtest.db"))

SudoDios commented 19 hours ago

Hi @drewwells how interesting! But type listen_port is not string.
Did you run it on the go sqlite database?

drewwells commented 19 hours ago

It would be helpful if the program accepted strings, config is safer to pass around as strings that get interpreted. I didn't find a spec for how to describe config across these different language implementations of librespeed.

Go didn't have a db, so it's starting from a non-existent file. Does it attempt to create a db if nothing exists? I didn't see any special instructions in the docs and this appears to be the default setup. Maybe default of no db is easier to start from?

SudoDios commented 18 hours ago

Oh, Ok. The root of the problem is probably clear. Can you fix it yourself?

drewwells commented 17 hours ago

Yes, Im taking a stab at it.