Giter Site home page Giter Site logo

Comments (7)

jedisct1 avatar jedisct1 commented on August 14, 2024

This requires a bit more than GNU make. I'd suggest trying under WSL or MSYS2.

Also, path names with spaces in them (C:/Program Files (x86)) may not be well supported currently.

from wasi-libc.

jedisct1 avatar jedisct1 commented on August 14, 2024

Update:

wasi-sysroot can be compiled under MSYS. The default LLVM/Clang packages are version 8.

You simply need to install the following packages:

make
mingw-w64-x86_64-llvm
mingw-w64-x86_64-clang
mingw-w64-x86_64-clang-tools-extra
patchutils

And type make.

Setting the WASM_* variables is not even required.

from wasi-libc.

jedisct1 avatar jedisct1 commented on August 14, 2024

Note that you may have to store the source code in a folder with a very short path, or you will hit the maximum command line length when the linker is invoked :)

from wasi-libc.

DragonOsman avatar DragonOsman commented on August 14, 2024

So I have to use WSL (I don't know much about using MSYS2 but I have WSL)? Would I still be able to build WebAssembly apps where I need WASI without WSL as well? And I installed version 9 of LLVM to use the Wasm Backend with Emscripten.

As for the file path for the source code: don't worry, I have wasi_sysroot cloned directly into my C drive.

If wasi_sysroot is for the C standard library, what about the C++ standard library? What do we do about that?

from wasi-libc.

jedisct1 avatar jedisct1 commented on August 14, 2024

Once compiled, Webassembly apps can run anywhere.

All you need is a runtime. Wasmtime is such a runtime, and it works natively on Windows, so you can use it to run Webassembly code without WSL.

If you have LLVM 8 or 9, you are all set! You don't need Emscripten to use WASI.

But C++ is not supported yet.

from wasi-libc.

penzn avatar penzn commented on August 14, 2024

@DragonOsman now I see the context for your post on llvm-dev :) MingGW with the right set of packages should be sufficient for Windows builds. As for C++, this is libc, which means that you need another layer of libraries to get to C++ support. @sunfishcode and @sbc100 do you have more context on building libcxx?

from wasi-libc.

sbc100 avatar sbc100 commented on August 14, 2024

We have libc++ and libc++abi are easy enough to build on top of wasi-libc. I don't think they have any requirements that clang and wasi-libc don't already have:

See https://github.com/CraneStation/wasi-sdk/blob/master/Makefile

from wasi-libc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.