ethanhs / cce

commandline compiler explorer - use https://godbolt.org from your terminal!
MIT License
196 stars 14 forks source link

Allow different remote url other than godbolt.org #1

Closed AbrilRBS closed 6 years ago

AbrilRBS commented 6 years ago

CE is selfhosted by some users. I think they would appreciate if there was a way to specify other remote url. Maybe even an IP to use a local instance! :)

ethanhs commented 6 years ago

This makes a lot of sense. I will work on this today. (Currently adding support for passing a file)

dkm commented 6 years ago

Would love that. My simple hack consisting on a sed pass failed. Not sure why, but I get :

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Json(Error("missing field `text`", line: 1, column: 663)), url: None }', libcore/result.rs:945:5

Listings the compilers works correcly. Any hint welcome :)

dkm commented 6 years ago

For my internal use, I've added a --host that defaults to godbolt.org. Do you want me to submit a PR ?

ethanhs commented 6 years ago

That would be great! Thank you

dkm commented 6 years ago

Ok, so I'll clean my code and push a PR asap !

ethanhs commented 6 years ago

@dkm, looking forward to your pr! :)