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

Measure of incompleteness and general overview #3

Open
jeff-hykin opened this issue May 16, 2020 · 4 comments
Open

Measure of incompleteness and general overview #3

jeff-hykin opened this issue May 16, 2020 · 4 comments

Comments

@jeff-hykin
Copy link

jeff-hykin commented May 16, 2020

This project is awesome! I'm interested in how broken/practical it is.

I found this in the test.js, I thought it was a pretty good gauge

  // #include <algorithm>  // FAIL
  // #include <any> // ok
  #include <array> // FAIL
  // #include <bitset> // FAIL
  // #include <chrono> // ok
  // #include <complex> // FAIL
  // #include <filesystem> // ok
  // #include <fstream> // ok
  // #include <functional> // FAIL
  // #include <initializer_list> // ok
  // #include <iomanip> // FAIL
  // #include <iosfwd> // ok
  // #include <ios> // ok
  // #include <iostream> // FAIL
  // #include <istream> // FAIL
  // #include <iterator> // ok
  // #include <limits> // ok
  // #include <list> // FAIL
  // #include <locale> // FAIL
  // #include <map> // FAIL
  // #include <memory> // ok
  // #include <new> // ok
  // #include <numeric> // FAIL
  // #include <optional> // FAIL
  // #include <ostream> // FAIL
  // #include <random> // FAIL
  // #include <regex> // ok
  // #include <set> // FAIL
  // #include <span> // FAIL
  // #include <sstream> // FAIL
  // #include <stack> // FAIL
  // #include <streambuf> // ok
  // #include <string> // FAIL
  // #include <string_view> // FAIL
  // #include <tuple> // ok
  // #include <typeindex> // ok
  // #include <typeinfo> // ok
  // #include <type_traits> // ok
  // #include <unordered_map> // FAIL
  // #include <unordered_set> // FAIL
  // #include <valarray> // FAIL
  // #include <variant> // FAIL
  // #include <vector> // FAIL
  // #include <version> // ok

Do you have any advice in terms of major roadblocks causing some of these to fail?

I don't need anything crazy like multithreading or sockets, and even the canvas is overkill for my purposes. Security, keeping up with LLVM master, and performance are also completely irrelevant to me. I have an extensive background in C++, JS web-dev, and Node.js, but absolutely 0 experience with LLVM itself.

@binji
Copy link
Owner

binji commented May 18, 2020

Thanks for your interest! I'm not sure why these headers would fail in particular, other than that I built on top of a relatively new toolchain (wasi-sdk from about a year ago), which also may have had missing pieces. I also implemented features as I needed them for the demo, so there are likely to be holes there too.

To really productionize this code, I think it would be necessary to take some of the hacks to LLVM I did here and figure out the best way to upstream them. This may be tricky to do, since the WASI platform is still unstable. This is important for keeping up with LLVM master (which you state as a non-goal), but also increases the likelihood that things work.

The next step would be to use a better WASI polyfill for the web; as mentioned above, the one I implemented works, but uses an older version of the WASI API, and is incomplete.

@jeff-hykin
Copy link
Author

Thanks @binji that helps a lot, I'll take a look at those hacks and building it with the lastest wasi sdk. What I'll be doing will probably be pretty hacky/incomplete for my purposes as well, but hopefully it'll build on what is already here.

@HappyCerberus
Copy link

Considering that this ended up in the state it was presented on CppCon, do you know about any projects that are taking this further? I'm interested in this type of setup exactly for educational purposes, since the initial setup is the main barrier for teaching C++ (and offline work on a mobile device, tablet or a chromebook is near impossible).

@binji
Copy link
Owner

binji commented Sep 8, 2020

Yeah, I'm sorry I haven't had more time to put into this. It really would be great if someone could take this further! I'd be happy to help with code reviews or suggestions.

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

3 participants