Skip to content

Commit ff810d9

Browse files
committed
feat: example
1 parent dcf835e commit ff810d9

File tree

4 files changed

+131092
-3
lines changed

4 files changed

+131092
-3
lines changed

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ tokio-util = { version = "0.7", features = ["io"] }
1414
supports-color = "1"
1515

1616
[dev-dependencies]
17-
tokio = { version = "1", features = ["io-util", "process", "macros", "rt"] }
17+
tokio = { version = "1", features = [
18+
"io-util",
19+
"process",
20+
"macros",
21+
"rt",
22+
"rt-multi-thread",
23+
] }
1824

1925
[build-dependencies]
2026
prost-build = "0.10"

build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
55
println!("cargo:rerun-if-changed=embedded_sass.proto");
66
Config::new()
7-
.bytes(&["."])
87
.out_dir("src/pb")
98
.compile_protos(&["embedded_sass.proto"], &["."])
109
.unwrap();

examples/compile_path.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
fn main() {}
1+
use sass_embedded_host_rust::{compile, Options};
2+
3+
#[tokio::main]
4+
async fn main() {
5+
let res = compile(
6+
"/Users/bytedance/Codes/sass-embedded-host-rust/examples/simple.scss"
7+
.to_string(),
8+
Options::default(),
9+
)
10+
.await
11+
.unwrap();
12+
dbg!(res.loaded_urls);
13+
}

0 commit comments

Comments
 (0)