diff --git a/docs/examples.js b/docs/examples.js index 414114c..d745e3c 100644 --- a/docs/examples.js +++ b/docs/examples.js @@ -15,8 +15,7 @@ let exampleCode = { alert: 'script: alert("Hello, World!")', javascript: `html: div id="app"; app.innerHTML = "Hello, World!"`, draw_sine: `// sine wave\nfor i in 0..1000\n ctx.lineTo(i, 100 + Math.sin(i / 10) * 50)\nctx.stroke()`, - sine: ` - double sin(double x){ + sine: `double sin(double x){ double S1 = -1.66666666666666324348e-01, S2 = 8.33333333332248946124e-03, diff --git a/docs/index.html b/docs/index.html index af50a5c..ab17e2c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -35,6 +35,7 @@ overflow: auto; min-height: 100px; /* Minimum height for the editor */ min-width: 200px; /* Minimum width for the editor */ + border: 1px solid #ddd; } @@ -67,10 +68,13 @@ - + + GitHub Logo +

🐝 Wasp

-

A new programming language for wasm

+

A new programming language for Wasm


- + + auto - - + +
+ +
diff --git a/docs/wasp.js b/docs/wasp.js index 6d2513c..b7b0c12 100644 --- a/docs/wasp.js +++ b/docs/wasp.js @@ -911,7 +911,7 @@ async function run_wasm(buf_pointer, buf_size) { if (needs_runtime) { app = await WebAssembly.instantiate(wasm_buffer, imports, memory) // todo: tweaked imports if it calls out // app = await WebAssembly.instantiate(wasm_buffer, runtime_imports, runtime_instance.memory) // todo: tweaked imports if it calls out - print("app loaded") + print("compiled wasm app/script loaded") } else { let memory2 = new WebAssembly.Memory({initial: 10, maximum: 65536});// pages à 2^16 = 65536 bytes app = await WebAssembly.instantiate(wasm_buffer, imports, memory2) // todo: tweaked imports if it calls out diff --git a/source/tests.cpp b/source/tests.cpp index cd4563b..739c382 100644 --- a/source/tests.cpp +++ b/source/tests.cpp @@ -25,6 +25,18 @@ //void testDwarf(); //void testSourceMap(); +void testInclude() { +// assert_emit("include test-include.wasp", 42); +// assert_emit("use test-include.wasm", 42); + assert_emit("include test/lib.wasp", 42); +// assert_emit("include test/lib.wast", 42); + assert_emit("use test/lib.wasm; test", 42); +// assert_emit("use https://pannous.com/files/lib.wasm; test", 42); +// assert_emit("use git://pannous/waps/test/lib.wasm; test", 42); +// assert_emit("use system:test/lib.wasm; test", 42); // ^^ + +} + void testExceptions() { // assert_emit("(unclosed bracket",123); @@ -3405,6 +3417,7 @@ void pleaseFix() { // 2022-12-28 : 3 sec WITH runtime_emit, wasmedge on M1 WOW ALL TESTS PASSING // ⚠️ CANNOT USE assert_emit in WASM! ONLY via void testRun(); void testCurrent() { + testInclude(); // check_is("τ≈6.2831853",true); // assert_emit("τ≈6.2831853",1); testExceptions();