nutshimit / mashin

Mashin is an extensible rust-powered Infrastructure as Code (IaC) platform with a Javascript runtime, simplifying cloud resource management through a seamless combination of custom providers and expressive scripting.
https://mashin.land
MIT License
20 stars 2 forks source link

Fix Windows bindgen. #52

Open tensor-programming opened 1 year ago

tensor-programming commented 1 year ago

attempts to fix #51 by adding a simple cfg for windows. Still has an issue where these lines fail.

await globalThis.__mashin.downloadProvider(
      "github",
      new URL(
         getFileName("mashin_provider_starter"),
         `https://github.com/nutshimit/mashin_provider_starter/releases/download/v${VERSION}/`
      ).toString()
   )

While the file does exist on the starter repo, it doesn't seem to pull it down. The Deno.env.get("LOCAL_PLUGIN") env var seems to always default to remote causing it to pull down from the repo regardless of whether or not the call is local.

   Error: Error: Could not open library: The specified module could not be found.

    at new DynamicProvider (ext:mashin_core/40_ffi.js:14:9)
    at new Provider (https://mashin.run/std@0.1.0/sdk/resource.ts:20:9)
    at new Provider (file:///C:/Projects/rust/mashin-provider-starter/mod.ts:35:9)
    at file:///C:/Projects/rust/mashin-provider-starter/examples/my_provider.ts:5:18