Max's suggestions.
This commit is contained in:
parent
2a1bd3dbc2
commit
71f5908806
2 changed files with 7 additions and 14 deletions
19
cli/build.rs
19
cli/build.rs
|
|
@ -17,20 +17,13 @@ fn main() {
|
|||
);
|
||||
}
|
||||
|
||||
fn required_files() -> Vec<&'static Path> {
|
||||
return vec![
|
||||
Path::new("../lib/binding_web/tree-sitter.js"),
|
||||
Path::new("../lib/binding_web/tree-sitter.wasm")
|
||||
];
|
||||
}
|
||||
|
||||
fn wasm_files_present() -> bool {
|
||||
for path in required_files() {
|
||||
if !path.exists() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
let paths = [
|
||||
"../lib/binding_web/tree-sitter.js",
|
||||
"../lib/binding_web/tree-sitter.wasm",
|
||||
];
|
||||
|
||||
return paths.iter().all(|p| Path::new(p).exists())
|
||||
}
|
||||
|
||||
fn read_git_sha() -> Option<String> {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ git clone https://github.com/tree-sitter/tree-sitter
|
|||
cd tree-sitter
|
||||
```
|
||||
|
||||
To use the `web-ui` command, you'll need to build the WASM library. If you have emscripten installed, this will use your `emcc` compiler. Otherwise, it will use Docker:
|
||||
Optionally, build the WASM library. If you skip this step, then the `tree-sitter web-ui` command will require an internet connection. If you have emscripten installed, this will use your `emcc` compiler. Otherwise, it will use Docker:
|
||||
|
||||
```sh
|
||||
./script/build-wasm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue