remove deadlock in build system
This commit is contained in:
parent
939201fedb
commit
9c5cd5f4da
16 changed files with 84 additions and 102 deletions
8
woweb/.idea/.gitignore
generated
vendored
8
woweb/.idea/.gitignore
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
8
woweb/.idea/modules.xml
generated
8
woweb/.idea/modules.xml
generated
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/woweb-poc.iml" filepath="$PROJECT_DIR$/.idea/woweb-poc.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
woweb/.idea/vcs.xml
generated
6
woweb/.idea/vcs.xml
generated
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
11
woweb/.idea/woweb-poc.iml
generated
11
woweb/.idea/woweb-poc.iml
generated
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="CPP_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -2,7 +2,6 @@
|
|||
name = "woweb"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
dist_text = { path = "../dist_text" }
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let woweb_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let woweb_path = Path::new(&woweb_dir);
|
||||
let woweb_asset_path = woweb_path.join("assets");
|
||||
let dist_text_path = woweb_path.parent().unwrap().join("dist_text_js");
|
||||
let dist_text_pkg_path = dist_text_path.join("pkg");
|
||||
|
||||
Command::new("wasm-pack")
|
||||
.args(&["build", "--target", "web", "--release", "--no-typescript"])
|
||||
.current_dir(dist_text_path)
|
||||
.status()
|
||||
.unwrap();
|
||||
|
||||
let js_path_src = dist_text_pkg_path.join("dist_text_js.js");
|
||||
let js_path_dest = woweb_asset_path.join("dist_text_js.js");
|
||||
|
||||
let wasm_path_src = dist_text_pkg_path.join("dist_text_js_bg.wasm");
|
||||
let wasm_path_dest = woweb_asset_path.join("dist_text_js_bg.wasm");
|
||||
|
||||
let _ = fs::copy(js_path_src, js_path_dest);
|
||||
let _ = fs::copy(wasm_path_src, wasm_path_dest);
|
||||
|
||||
println!("cargo:rerun-if-changed=../dist_text_js/**/*.rs");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue