Skip to content

Support for wasm and asmjs ? #786

Open
@lilianmoraru

Description

@lilianmoraru

I try to cross-compile tantivy for the web with(I initially tried directly through "source emsdk_env.sh" + cross-compiling - same results but I wanted to mention the projects to make it easier for you to test) wargo,2(wasm) and cargo-web(asmjs) and it seems that the current blocking point is that nix does not compile on those platforms.

It is clear that this is because of some platform-specific cfgs(and of course no code for an API that does not map 1-on-1 with the POSIX API):

error[E0432]: unresolved import `self::os`
 --> src/features.rs:1:15
  |
1 | pub use self::os::*;
  |               ^^ Could not find `os` in `self`

error[E0432]: unresolved import `self::platform`
   --> src/sys/ioctl/mod.rs:243:15
    |
243 | pub use self::platform::*;
    |               ^^^^^^^^ Could not find `platform` in `self`

Do you guys think that it is feasible to make nix compatible with these platforms(the Emscripten API is inspired by POSIX)?
If yes, could you please consider adding support for the asmjs-unknown-emscripten/wasm32-unknown-emscripten targets? :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions