-
Notifications
You must be signed in to change notification settings - Fork 9
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
C + Go Bindings #11
Comments
Yeah, that would be pretty cool! But I'd like to implement the URL overrides first, just to get the entire API down - I think that's the only thing preventing this from being fully usable (at least, without shipping an entire web server, too). |
Sounds like a plan :) I have been looking into the area of Signing and Packaging for Windows store. Will raise an issue to discuss now. |
I have not had a chance to work on this yet. If you come a Ross any ideas or examples do post here and I will try them out |
I have an idea to try. PWA is now actually useable because Service Workers and Web workers is pretty stable and used. I know this is a bit radical and different.. Happy to help and discuss though. |
That's a great idea, but isn't that exactly what Cordova does? It's mostly mobile-centric, though. Edit: I guess Cordova's centered around static files, not URLs, though. It's quite a bit different, now that I think about it. |
yes i think your right - good point... I used it once for a bit. It worked but very clunky. I guess the difference is this. |
Has the code moved on further that you think this might be possible ? Thinking about it, all I need is to be able to boot it up giving it a localhost URL to run from. Or maybe a file system path to inject the JS code from. All my front end is coded up in golang and transpired to JS. |
If that's all you need, this snippet can do it. extern crate tether;
fn main() {
tether::builder()
.html("<meta http-equiv=\"refresh\" content=\"0;URL='{{ YOUR URL }}'\" />")
.start();
} Feel free to ask for more advice/code! Yeah, the core API is definitely stable, but I'm kind of busy right now. I'd need to do the following things to get a full Go interface:
Is the Rust code above enough that I can move this to low priority, or are Go bindings still necessary for you? |
Would that's alot of golang code to write.
I guess it will mean I need rust also installed ?
…On Mon, Mar 26, 2018, 10:40 AM Ram ***@***.***> wrote:
If that's all you need, this snippet can do it.
extern crate tether;
fn main() {
tether::builder()
.html("<meta http-equiv=\"refresh\" content=\"0;URL='{{ YOUR URL }}'\" />")
.start();
}
Feel free to ask for more advice/code! Yeah, the core API is definitely
stable, but I'm kind of busy right now, because school. I'd need to do the
following things to get a full Go interface (assuming you still think this
is a worthwhile feature):
- Write C bindings, because Go and Rust can only reliably communicate
through C.
- Write idiomatic Go bindings.
- Make builds of the staticlib on GitLab, because otherwise C/Go users
would still need to install the Rust toolchain.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATuCwggTR7DtaPsBFcN-bhyirgInThMrks5tiKmOgaJpZM4SDAZ2>
.
|
Yeah, Rust needs to be installed, unless this issue is completed. |
ok thanks. For now, i think i can write the rust code to kick off the PWA. I plan to boot it off localhost, which is a GRPC server. If you even do get a golang wrapper, then i can link to the Tether code from golang. For Mobile, if this gets that far you can do the same sort of approach using gomobile. SO, once you get through that you start askng yourself if its possible to not using http between them but just API binary calls. |
seems its quite easy
https://github.com/medimatrix/rust-plus-golang
Would be interesting to try at some stage..
The text was updated successfully, but these errors were encountered: