Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove dependency on num_bigint
  • Loading branch information
coolreader18 committed Dec 15, 2018
commit e78a25132ed2109dd10e8200d7f3bec7b43f48b6
1 change: 0 additions & 1 deletion wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ rustpython_vm = {path = "../vm"}
cfg-if = "0.1.2"
wasm-bindgen = "0.2"
js-sys = "0.3"
num-bigint = "0.2.1"

[dependencies.web-sys]
version = "0.3"
Expand Down
7 changes: 3 additions & 4 deletions wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
mod wasm_builtins;

extern crate js_sys;
extern crate num_bigint;
extern crate rustpython_vm;
extern crate wasm_bindgen;
extern crate web_sys;

use num_bigint::BigInt;
use rustpython_vm::compile;
use rustpython_vm::pyobject::{self, IdProtocol, PyObjectRef, PyResult};
use rustpython_vm::pyobject::{self, PyObjectRef, PyResult};
use rustpython_vm::VirtualMachine;
use wasm_bindgen::prelude::*;
use web_sys::console;
Expand Down Expand Up @@ -57,7 +55,8 @@ pub fn eval_py(source: &str) -> Result<JsValue, JsValue> {
vm.ctx.set_attr(
&vm.builtins,
"print",
vm.context().new_rustfunc(wasm_builtins::builtin_print_console),
vm.context()
.new_rustfunc(wasm_builtins::builtin_print_console),
);

eval(&mut vm, source)
Expand Down