Commit Graph

58 Commits

Author SHA1 Message Date
stratusjerry
7134885775 Spellcheck 2019-02-05 13:39:16 -05:00
Windel Bouwman
7096434f95 Implement some clippy tips 2019-02-04 17:17:54 +01:00
Adam Johnson
32a58f8897 Update example
Improve spelling, grammar, and HTML a bit on the example page.
2019-01-10 14:07:08 +00:00
coolreader18
231e3f2f16 Export PyEvalOptions in typescript defs 2018-12-28 21:57:41 -06:00
coolreader18
e65639f61a Remove yarn.lock 2018-12-28 21:43:13 -06:00
coolreader18
d7fdc5c177 Fix typescript hack 2018-12-28 14:42:43 -06:00
coolreader18
36997e12d9 Comment out WB's TS definitions using a hack 2018-12-28 14:35:45 -06:00
coolreader18
1d5df4130a Add doc comments and typescript custom section 2018-12-27 22:31:15 -06:00
coolreader18
b2772804f2 Add README and manifest fields for the WASM library 2018-12-27 21:06:59 -06:00
coolreader18
4cc7f5aa9c Merge #console and #code styles 2018-12-27 20:43:09 -06:00
coolreader18
1f02cc0fa3 Squash all demo commits onto one branch 2018-12-27 20:28:12 -06:00
coolreader18
8303743aab Remove RustPyFunc trait, just use Fn(..) everywhere 2018-12-27 11:50:14 -06:00
coolreader18
396842ef9d Readd conflicting files 2018-12-27 00:04:20 -06:00
coolreader18
dfadd03f95 Remove (now outdated) previously conflicting files 2018-12-27 00:02:33 -06:00
coolreader18
ada92d33a3 Add conflicting files 2018-12-27 00:01:20 -06:00
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