8000 log4rs does not work on target wasm32-wasi · Issue #244 · estk/log4rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

log4rs does not work on target wasm32-wasi #244

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

Open
jornfranke opened this issue Feb 14, 2022 · 2 comments
Open

log4rs does not work on target wasm32-wasi #244

jornfranke opened this issue Feb 14, 2022 · 2 comments

Comments

@jornfranke
Copy link

Hi,

I would like to use log4rs and compile it to the target wasm32-wasi:

cargo build --target wasm32-wasi

Output:

error[E0425]: cannot find function `get_internal` in this scope
  --> /.cargo/registry/src/github.com-1ecc6299db9ec823/thread-id-3.3.0/src/lib.rs:44:5
   |
44 |     get_internal()
   |     ^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.

This does not work as there is an issue with the thread-id library: ruuda/thread-id#10
Note: The issue is rather old and wasm allows compilation with threads (no other library causes problems...). If I remove log4rs as a dependency then I can compile.

Do you have a pointer where thread-id is used and if this could be maybe removed from log4rs?

I think making it work on WASM would extend the potential use cases of log4rs significantly.

Thank you.

@estk
Copy link
Owner
estk commented Apr 19, 2022

We should be able to avoid calling thread_id all together in wasi compile target.

@upendra1997
Copy link

Hi, I tried taking a stab at this issue on PR #407 , please suggest if I need to make any changes for the PR.

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

No branches or pull requests

3 participants
0