Skip to content

Commit

Permalink
Merge pull request #30 from ethereumjs/rustc-hex
Browse files Browse the repository at this point in the history
Use rustc_hex for wasm compatibility
  • Loading branch information
axic authored Jul 21, 2018
2 parents ca4dc58 + 3851e5c commit d326ebc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ publish = false

[dependencies]
bn = { git = "https://github.com/cdetrio/bn", branch = "mont-repr-fix" }
rustc-serialize = "0.3"
rustc-hex = "1.0"
12 changes: 6 additions & 6 deletions lib/index.asm.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
extern crate bn;
extern crate rustc_serialize;
extern crate rustc_hex;

use std::os::raw::c_char;
use std::ffi::CStr;

use rustc_serialize::hex::FromHex;
use rustc_serialize::hex::ToHex;
use rustc_hex::FromHex;
use rustc_hex::ToHex;
use std::io::{self, Read};

#[derive(Debug)]
Expand Down Expand Up @@ -45,8 +45,6 @@ fn read_point(reader: &mut io::Chain<&[u8], io::Repeat>) -> Result<::bn::G1, Err
)
}



#[no_mangle]
pub fn ec_mul(input_hex_ptr: *const c_char) -> *const c_char {
use bn::AffineG1;
Expand Down

0 comments on commit d326ebc

Please sign in to comment.