Deno: Embedded Deno Support

Created on 14 May 2020  路  3Comments  路  Source: denoland/deno

I want to embed a JS/TS vm to a native application, But lib.rs has removed from cli module.

I could create a deno instance before, but it won鈥檛 work now.

use deno::{
  state::{ State, DebugType },
  global_state::GlobalState,
  worker::Worker,
  ops,
  flags::{Flags},
};

let data = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/CLI_SNAPSHOT.bin"));
let startup_data = StartupData::Snapshot(Snapshot::Static(data));

The CLI_SNAPSHOT.bin file copied from deno build result

All 3 comments

@colorhook we recently removed lib.rs from deno crate in: https://github.com/denoland/deno/pull/5226

The reason is that we expect further rapid changes to the Rust side of CLI and can't guarantee stability at this moment.

I wait for deno lib so long. 馃槴

I know this issue was first but let's continue in #7928

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ry picture ry  路  3Comments

motss picture motss  路  3Comments

ry picture ry  路  3Comments

sh7dm picture sh7dm  路  3Comments

metakeule picture metakeule  路  3Comments