-
Notifications
You must be signed in to change notification settings - Fork 2
/
context.cpp
54 lines (41 loc) · 1.13 KB
/
context.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// source ~/source/emsdk_portable/emsdk_env.sh
// em++ -std=c++14 --memory-init-file 0 -s ASSERTIONS=2 -s DEMANGLE_SUPPORT=1 -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS="['_main', '_reset', '_designcontext']" -O2 context.cpp -o context.js
#if EMSCRIPTEN
#include "emscripten.h"
#include <emscripten/html5.h>
#endif
#include "rxcpp/rx.hpp"
using namespace rxcpp;
using namespace rxcpp::schedulers;
using namespace rxcpp::subjects;
using namespace rxcpp::sources;
using namespace rxcpp::util;
#include "rxcpp/rx-test.hpp"
using namespace rxcpp::test;
using namespace rxcpp::notifications;
#include <regex>
#include <random>
#include <chrono>
using namespace std;
using namespace std::literals;
const auto info = [](auto&&... an){
// cout << an... << endl;
};
auto even = [](auto v){return (v % 2) == 0;};
auto always_throw = [](auto... ){
throw runtime_error("always throw!");
return true;
};
struct destruction
{
~destruction(){
info("destructed");
}
};
#include "rxcommon.h"
#include "designcontext.h"
int main() {
//emscripten_set_main_loop(tick, -1, false);
designcontext(0, 1000000);
return 0;
}