feat(napi): re-export tokio and features
This commit is contained in:
parent
16f808276d
commit
13533d1a37
5 changed files with 43 additions and 15 deletions
examples/napi
|
@ -10,12 +10,11 @@ crate-type = ["cdylib"]
|
|||
|
||||
[dependencies]
|
||||
futures = "0.3"
|
||||
napi = {path = "../../crates/napi", default-features = false, features = ["napi8", "tokio_rt", "serde-json", "async", "experimental", "latin1"]}
|
||||
napi = {path = "../../crates/napi", default-features = false, features = ["tokio_fs", "napi8", "tokio_rt", "serde-json", "async", "experimental", "latin1"]}
|
||||
napi-derive = {path = "../../crates/macro", features = ["type-def"]}
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
tokio = {version = "1", features = ["default", "fs"]}
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = {path = "../../crates/build"}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use futures::prelude::*;
|
||||
use napi::bindgen_prelude::*;
|
||||
use tokio::fs;
|
||||
use napi::tokio::{self, fs};
|
||||
|
||||
#[napi]
|
||||
async fn read_file_async(path: String) -> Result<Buffer> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue