From 2e74f164b6dcf0ecbf8dd38fba9fae550d784bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 13 Dec 2020 19:45:53 +0100 Subject: refactor: deno_runtime crate (#8640) This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl --- cli/ops/crypto.rs | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 cli/ops/crypto.rs (limited to 'cli/ops/crypto.rs') diff --git a/cli/ops/crypto.rs b/cli/ops/crypto.rs deleted file mode 100644 index a73843a33..000000000 --- a/cli/ops/crypto.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -use deno_crypto::op_get_random_values; -use deno_crypto::rand::rngs::StdRng; -use deno_crypto::rand::SeedableRng; - -pub fn init(rt: &mut deno_core::JsRuntime, maybe_seed: Option) { - if let Some(seed) = maybe_seed { - let rng = StdRng::seed_from_u64(seed); - let op_state = rt.op_state(); - let mut state = op_state.borrow_mut(); - state.put::(rng); - } - super::reg_json_sync(rt, "op_get_random_values", op_get_random_values); -} -- cgit v1.2.3