Skip to content

Commit

Permalink
Code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Mar 30, 2024
1 parent e884f19 commit 9c6e6bd
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified providers/pulumi_wasm_provider_random/src/lib.rs
Binary file not shown.
Binary file modified providers/pulumi_wasm_provider_random_rust/src/lib.rs
Binary file not shown.
Binary file modified providers/pulumi_wasm_provider_random_rust/src/source.rs
Binary file not shown.
11 changes: 3 additions & 8 deletions pulumi_wasm_generator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ pub fn generate_rust_library(schema_json: &Path, result_path: &Path) -> Result<(
let package_json: schema::Package = serde_json::from_reader(reader)?;
let package = schema::to_model(&package_json)?;

fs::create_dir_all(result_path.join("wit").join("deps").join("pulumi-wasm"))?;
fs::create_dir_all(result_path.join("wit").join("deps"))?;
fs::create_dir_all(result_path.join("src"))?;

let mut wit_file = File::create(result_path.join("wit").join("world.wit"))?;
wit_file.write_all(output::wit::generate_wit(&package)?.as_ref())?;

let mut deps_wit_file = File::create(
result_path
.join("wit")
.join("deps")
.join("pulumi-wasm")
.join("pulumi-wasm.wit"),
)?;
let mut deps_wit_file =
File::create(result_path.join("wit").join("deps").join("pulumi-wasm.wit"))?;
deps_wit_file.write_all(output::wit::get_dependencies().as_ref())?;

let mut cargo_file = File::create(result_path.join("Cargo.toml"))?;
Expand Down

0 comments on commit 9c6e6bd

Please sign in to comment.