fixing random for wasm
This commit is contained in:
parent
43450bfbcb
commit
26479b96d7
@ -46,11 +46,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Cargo Build
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
|
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|
||||||
|
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -250,6 +250,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
|||||||
name = "finlib"
|
name = "finlib"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"getrandom 0.2.15",
|
||||||
"log",
|
"log",
|
||||||
"nalgebra",
|
"nalgebra",
|
||||||
"ndarray",
|
"ndarray",
|
||||||
@ -285,8 +286,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
"js-sys",
|
||||||
"libc",
|
"libc",
|
||||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
2
finlib-wasm/.cargo/config.toml
Normal file
2
finlib-wasm/.cargo/config.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[build]
|
||||||
|
rustflags = ['--cfg=getrandom_backend="wasm_js"']
|
@ -12,7 +12,7 @@ default = ["console_error_panic_hook"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasm-bindgen = "0.2.100"
|
wasm-bindgen = "0.2.100"
|
||||||
finlib = { path = "../finlib" }
|
finlib = { path = "../finlib", features = ["wasm"] }
|
||||||
|
|
||||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||||
# logging them with `console.error`. This is great for development, but requires
|
# logging them with `console.error`. This is great for development, but requires
|
||||||
|
@ -12,7 +12,9 @@ ndarray-stats = { workspace = true }
|
|||||||
nalgebra = { workspace = true }
|
nalgebra = { workspace = true }
|
||||||
statrs = { workspace = true }
|
statrs = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
getrandom = "*"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
py = ["dep:pyo3"]
|
py = ["dep:pyo3"]
|
||||||
|
wasm = ["getrandom/js"]
|
||||||
parallel = ["dep:rayon"]
|
parallel = ["dep:rayon"]
|
Loading…
x
Reference in New Issue
Block a user