Commit Graph
693 Commits
Author SHA1 Message Date
coolreader18 2968982a8f Change README portion for compiling wasm 2018-12-26 23:51:28 -06:00
coolreader18 877206dc47 Switch from shell to npm scripts for demo using webpack and @wasm-tool/wasm-pack-plugin
Also change travis deploy to use new demo directory.
2018-12-26 23:34:51 -06:00
coolreader18 c38796bb49 Add some documentation for functions on the demo site 2018-12-26 13:25:56 -06:00
coolreader18 94d6a91873 Fix js_to_py with JS undefined 2018-12-26 13:21:29 -06:00
coolreader18 e0959b9384 Implement error conversion for js_to_py 2018-12-26 11:21:45 -06:00
coolreader18 132930ec82 Allow passing closures from JS to python via vars 2018-12-26 01:59:15 -06:00
coolreader18 d1d958516d Change the instances of Fn(..) -> PyResult to a RustPyFunc trait alias 2018-12-24 15:45:45 -06:00
coolreader18 ffcd40b435 Remove conflicting files 2018-12-24 15:35:50 -06:00
coolreader18 24507de3b1 Re-add conflicting files 2018-12-24 15:34:52 -06:00
coolreader18 ab23f2c940 Use str.format for the demo 2018-12-24 15:28:49 -06:00
coolreader18 840c5072fb Improve UX for demo 2018-12-24 15:28:49 -06:00
coolreader18 d54d2b1c03 Make scripts executable 2018-12-24 15:28:49 -06:00
coolreader18 2ea9dca40c Add example, change some stuff in the demo to align with example 2018-12-24 15:28:49 -06:00
coolreader18 ca30ebcf5d Genericize the wasm lib to not be specifically for the demo
This included changing RustObjectKind::RustFunction.function to be
a `Box<Fn()>` instead of a `fn()` to support closures.
2018-12-24 15:28:49 -06:00
coolreader18 4c32693c7b Switch to using one workspace, move profile to root Cargo.toml 2018-12-24 15:28:49 -06:00
coolreader18 e77f223538 Add documentation for eval_py() and update error message handling
Also, switch from iterating over the values of js_injections and
serializing each of them individually to asserting it's an object and
then just stringifying the whole thing.
2018-12-18 19:03:04 -06:00
coolreader18 03c619f79e Rearrange website directory and change webpack config 2018-12-18 18:22:30 -06:00
coolreader18 a796b134a5 Allow injecting JS variables into python with eval_py()
eval_py(`return js_vars["a"]`, { a: 9 }) == 9
2018-12-15 12:20:03 -06:00
coolreader18 e78a25132e Remove dependency on num_bigint 2018-12-15 11:38:08 -06:00
coolreader18 3be6fee737 Clarify names of wasm builtins 2018-12-15 11:36:53 -06:00
coolreader18 921efd4d14 Switch to using json.dumps for py_to_js() 2018-12-15 11:33:37 -06:00
coolreader18 2ae1df590e Rename run_code() to run_from_textbox() 2018-12-15 01:41:25 -06:00
coolreader18 f8cce25f69 Formatting; move the + '\n' hack to eval(). 2018-12-15 01:31:44 -06:00
coolreader18 b428f2e3b3 Improve demo site 2018-12-15 00:49:47 -06:00
Shing Lyu 6021fca8cd [WASM] Print the Rust panic to the output textarea 2018-12-11 21:50:25 +01:00
Shing Lyu fabc67985a Make the run button bigger so it doesn't overflow 2018-12-11 21:38:02 +01:00
Shing Lyu 13a9922d93 Fix the demo page travis build 2018-12-10 23:07:15 +01:00
Shing Lyu b2aa7ac2fb [WASM] Changed the demo to fibonacci calculation 2018-12-09 21:35:23 +01:00
Shing Lyu 3e231620cd [WASM] Print STDOUT to textarea in HTML 2018-12-09 21:35:23 +01:00
Windel Bouwman f8f9fa7fd0 Merge pull request #217 from RustPython/travis-demo
CI build and deploy demo page on master branch
2018-12-07 10:15:50 +01:00
Shing Lyu b5c1990267 CI build and deploy demo page on master branch 2018-12-06 20:35:53 +01:00
Windel Bouwman 351a61f2b3 Merge pull request #216 from RustPython/forkme
Added fork me on github ribbon to demo page
2018-12-05 11:30:58 +01:00
Shing Lyu 71ea9b8f16 Added fork me on github ribbon to demo page 2018-12-04 20:58:00 +01:00
Shing Lyu 8d78c67d0b Created a demo page so user can try their code online 2018-12-03 20:49:26 +01:00
Shing Lyu 5734fc29ca Merge pull request #203 from RustPython/consolelog
Mapping Python print to JavaScript console.log
2018-12-03 20:48:43 +01:00
Shing Lyu 2c55c4793e [WASM] Mapping print to console.log 2018-12-03 19:51:48 +01:00
Shing Lyu c1ab263258 Removed unused wasm/src/main.rs file 2018-11-20 21:50:17 +01:00
rmliddle 27b5796b92 formatting fixes 2018-10-28 13:30:18 +11:00
rmliddle 958ee94bdc HTML update 2018-10-28 13:25:36 +11:00
rmliddle 72d53fe807 move to wasm-bindgen + supporting application 2018-10-28 13:23:00 +11:00
rmliddle ded30f8319 formatting and readme changes 2018-10-23 20:48:41 +11:00
rmliddle edbac92160 basic instructions wasm build 2018-10-23 20:31:05 +11:00
rmliddle c2f5394c75 binary crate + index.html for wasm build 2018-10-22 23:07:25 +11:00