Skip to content
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

Can this library run in WASM? #23

Open
amaury1093 opened this issue Jun 10, 2020 · 0 comments
Open

Can this library run in WASM? #23

amaury1093 opened this issue Jun 10, 2020 · 0 comments

Comments

@amaury1093
Copy link
Contributor

I'm looking to deploy my code to Cloudfare workers, and it uses this library. I was wondering, do you plan to support WASM as build target?

I just tried now, and had a small error, due to the hostname dependency (maybe others?).

error: Unsupported target OS! Create an issue: https://github.com/svartalf/hostname/issues/new
  --> /Users/amaurymartiny/.cargo/registry/src/github.com-1ecc6299db9ec823/hostname-0.3.1/src/lib.rs:81:9
   |
81 |         compile_error!("Unsupported target OS! Create an issue: https://github.com/svartalf/hostname/issues/new");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: use of undeclared type or module `sys`
   --> /Users/amaurymartiny/.cargo/registry/src/github.com-1ecc6299db9ec823/hostname-0.3.1/src/lib.rs:105:5
    |
105 |     sys::get()
    |     ^^^ use of undeclared type or module `sys`

error: aborting due to 2 previous errors

We could return localhost in wasm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant