Feat: WIP on deserialize
This commit is contained in:
1 parent
8439994859
commit
f22ff83190
15 files changed
+140
-21
No files matched your search
@@ -44,12 +44,15 @@ pub fn build(config: &Config, _build_config: &BuildConfig) -> Result<()> {
|
||||
let mut cmd = Command::new("cargo");
|
||||
cmd.current_dir(&crate_dir)
|
||||
.arg("build")
|
||||
.arg("--release")
|
||||
.arg("--target")
|
||||
.arg("wasm32-unknown-unknown")
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped());
|
||||
|
||||
if config.release {
|
||||
cmd.arg("--release");
|
||||
}
|
||||
|
||||
match executable {
|
||||
ExecutableType::Binary(name) => cmd.arg("--bin").arg(name),
|
||||
ExecutableType::Lib(name) => cmd.arg("--lib").arg(name),
|
||||
@@ -67,11 +70,13 @@ pub fn build(config: &Config, _build_config: &BuildConfig) -> Result<()> {
|
||||
|
||||
let input_path = match executable {
|
||||
ExecutableType::Binary(name) | ExecutableType::Lib(name) => target_dir
|
||||
.join("wasm32-unknown-unknown/release")
|
||||
// .join("wasm32-unknown-unknown/release")
|
||||
.join("wasm32-unknown-unknown/debug")
|
||||
.join(format!("{}.wasm", name)),
|
||||
|
||||
ExecutableType::Example(name) => target_dir
|
||||
.join("wasm32-unknown-unknown/release/examples")
|
||||
// .join("wasm32-unknown-unknown/release/examples")
|
||||
.join("wasm32-unknown-unknown/debug/examples")
|
||||
.join(format!("{}.wasm", name)),
|
||||
};
|
||||
|
||||
@@ -81,8 +86,8 @@ pub fn build(config: &Config, _build_config: &BuildConfig) -> Result<()> {
|
||||
.debug(true)
|
||||
.demangle(true)
|
||||
.keep_debug(true)
|
||||
.remove_name_section(true)
|
||||
.remove_producers_section(true)
|
||||
.remove_name_section(false)
|
||||
.remove_producers_section(false)
|
||||
.out_name("module")
|
||||
.generate(&bindgen_outdir)?;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ pub struct Config {
|
||||
pub static_dir: PathBuf,
|
||||
pub manifest: cargo_toml::Manifest<cargo_toml::Value>,
|
||||
pub executable: ExecutableType,
|
||||
pub release: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -50,6 +51,8 @@ impl Config {
|
||||
.expect("No lib found from cargo metadata");
|
||||
let executable = ExecutableType::Binary(output_filename);
|
||||
|
||||
let release = false;
|
||||
|
||||
Ok(Self {
|
||||
out_dir,
|
||||
crate_dir,
|
||||
@@ -58,6 +61,7 @@ impl Config {
|
||||
static_dir,
|
||||
manifest,
|
||||
executable,
|
||||
release,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn set_up_logging() {
|
||||
// field which defaults to the module path but can be overwritten with the `target`
|
||||
// parameter:
|
||||
// `info!(target="special_target", "This log message is about special_target");`
|
||||
.level_for("dioxus-cli", log::LevelFilter::Info)
|
||||
.level_for("dioxus", log::LevelFilter::Info)
|
||||
// .level_for("pretty_colored", log::LevelFilter::Trace)
|
||||
// output to stdout
|
||||
.chain(std::io::stdout())
|
||||
|
||||
Reference in new issue
Block a user