Skip to content

Commit 74902e7

Browse files
authored
Fix Inspect Request Failure in xeus-cpp-lite (#258)
* Bug fix: fixed inspect request failing in xeus-cpp-lite * added demo for inspect request in xeus-cpp lite
1 parent f054951 commit 74902e7

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ if(EMSCRIPTEN)
447447
target_link_options(xcpp
448448
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS='[\"FS\",\"PATH\",\"LDSO\",\"loadDynamicLibrary\",\"ERRNO_CODES\"]'"
449449
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH}/include@/include"
450+
PUBLIC "SHELL: --preload-file ${XEUS_CPP_DATA_DIR}@/share/xeus-cpp"
451+
PUBLIC "SHELL: --preload-file ${XEUS_CPP_CONF_DIR}@/etc/xeus-cpp"
450452
PUBLIC "SHELL: --post-js ${CMAKE_CURRENT_SOURCE_DIR}/wasm_patches/post.js"
451453
)
452454
# TODO: Emscripten supports preloading files just once before it generates

notebooks/xeus-cpp-lite-demo.ipynb

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
"execution_count": 10
234234
},
235235
{
236-
"id": "3249788b-d4e0-4e9a-8e75-aebbc88d3439",
236+
"id": "67181378-69d0-4adb-8a69-9abd20d3bc85",
237237
"cell_type": "code",
238238
"source": "FooT<double> foot(1.2);\nfoot.print();",
239239
"metadata": {
@@ -248,6 +248,31 @@
248248
],
249249
"execution_count": 11
250250
},
251+
{
252+
"id": "6ce20171-18cb-4373-874b-89e6a2d2e425",
253+
"cell_type": "markdown",
254+
"source": "## Documentation\n\n - Documentation for types of the standard library is retrieved on cppreference.com.",
255+
"metadata": {}
256+
},
257+
{
258+
"id": "c723686c-a70b-4e68-a175-b2224f0616aa",
259+
"cell_type": "code",
260+
"source": "?std::vector",
261+
"metadata": {
262+
"trusted": true
263+
},
264+
"outputs": [
265+
{
266+
"output_type": "display_data",
267+
"data": {
268+
"text/html": "<style>\n #pager-container {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n }\n .xcpp-iframe-pager {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n border: none;\n }\n </style>\n <iframe class=\"xcpp-iframe-pager\" src=\"https://en.cppreference.com/w/cpp/container/vector?action=purge\"></iframe>",
269+
"text/plain": "https://en.cppreference.com/w/cpp/container/vector"
270+
},
271+
"metadata": {}
272+
}
273+
],
274+
"execution_count": 12
275+
},
251276
{
252277
"id": "afee187b-2e6a-47db-acb1-8dab5a975565",
253278
"cell_type": "markdown",
@@ -278,7 +303,7 @@
278303
"trusted": true
279304
},
280305
"outputs": [],
281-
"execution_count": 12
306+
"execution_count": 13
282307
},
283308
{
284309
"id": "b326166f-1652-4cd5-bc8e-e4fa93f848a6",
@@ -288,7 +313,7 @@
288313
"trusted": true
289314
},
290315
"outputs": [],
291-
"execution_count": 13
316+
"execution_count": 14
292317
},
293318
{
294319
"id": "c32f5494-00e8-4427-bf6a-ce20c31ab44e",
@@ -298,7 +323,7 @@
298323
"trusted": true
299324
},
300325
"outputs": [],
301-
"execution_count": 14
326+
"execution_count": 15
302327
},
303328
{
304329
"id": "fc494113-8283-4d27-93b1-055ce5ee8240",
@@ -316,7 +341,7 @@
316341
"metadata": {}
317342
}
318343
],
319-
"execution_count": 15
344+
"execution_count": 16
320345
},
321346
{
322347
"id": "b1c0a821-e794-4f31-a791-85536d997069",
@@ -332,7 +357,7 @@
332357
"trusted": true
333358
},
334359
"outputs": [],
335-
"execution_count": 16
360+
"execution_count": 17
336361
},
337362
{
338363
"id": "0cc2ee8f-955e-459a-847f-1729ea961710",
@@ -342,7 +367,7 @@
342367
"trusted": true
343368
},
344369
"outputs": [],
345-
"execution_count": 17
370+
"execution_count": 18
346371
},
347372
{
348373
"id": "e4de8992-2ffa-4493-8d86-f3738b1f8e97",
@@ -360,7 +385,7 @@
360385
"metadata": {}
361386
}
362387
],
363-
"execution_count": 18
388+
"execution_count": 19
364389
},
365390
{
366391
"id": "f287b246-e1e2-4e5c-9167-89cd2b6b0de0",
@@ -376,7 +401,7 @@
376401
"trusted": true
377402
},
378403
"outputs": [],
379-
"execution_count": 19
404+
"execution_count": 20
380405
},
381406
{
382407
"id": "104f5359-2518-4a4c-bb79-b5b52041d745",
@@ -394,7 +419,7 @@
394419
"metadata": {}
395420
}
396421
],
397-
"execution_count": 20
422+
"execution_count": 21
398423
},
399424
{
400425
"id": "8f6ab60e-eabf-4ecc-b856-a3e7f6b165b9",
@@ -404,7 +429,7 @@
404429
"trusted": true
405430
},
406431
"outputs": [],
407-
"execution_count": 21
432+
"execution_count": 22
408433
},
409434
{
410435
"id": "aa21443e-f927-4af1-b2ba-46ddd76dee65",
@@ -420,7 +445,7 @@
420445
"trusted": true
421446
},
422447
"outputs": [],
423-
"execution_count": 22
448+
"execution_count": 23
424449
},
425450
{
426451
"id": "7e05d371-633d-4419-95d1-29f77985859b",
@@ -436,7 +461,7 @@
436461
"text": "goodbye\n"
437462
}
438463
],
439-
"execution_count": 23
464+
"execution_count": 24
440465
},
441466
{
442467
"id": "101ce1e3-9875-49ab-bf9b-e4e69ad4bf68",
@@ -452,17 +477,7 @@
452477
"text": "goodbye\n"
453478
}
454479
],
455-
"execution_count": 24
456-
},
457-
{
458-
"id": "2ef73723-91d4-4c62-9a46-d64a96ccb49e",
459-
"cell_type": "code",
460-
"source": "",
461-
"metadata": {
462-
"trusted": true
463-
},
464-
"outputs": [],
465-
"execution_count": null
480+
"execution_count": 25
466481
}
467482
]
468483
}

0 commit comments

Comments
 (0)