diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 4a03e346dc..593de8a8e5 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -15796,6 +15796,7 @@ dependencies = [ "itertools 0.14.0", "jsonwebtoken 8.3.0", "lazy_static", + "libffi-sys", "libloading 0.8.8", "mappable-rc", "mime_guess", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index e7f56b29cc..ac9af8e0e1 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -68,6 +68,7 @@ jemalloc = ["windmill-common/jemalloc", "dep:tikv-jemallocator", "dep:tikv-jemal tantivy = ["dep:windmill-indexer", "windmill-api/tantivy", "windmill-indexer/enterprise", "windmill-indexer/parquet", "windmill-common/tantivy", "enterprise", "parquet"] sqlx = ["windmill-worker/sqlx"] deno_core = ["windmill-worker/deno_core", "windmill-api/deno_core", "dep:deno_core", "dep:v8"] +deno_core_mac = ["deno_core", "windmill-worker/libffi_mac"] kafka = ["windmill-api/kafka"] nats = ["windmill-api/nats"] otel = ["windmill-common/otel", "windmill-worker/otel"] @@ -275,6 +276,9 @@ deno_runtime = { version = "0.198.0", features = ["transpile"] } deno_telemetry = "0.12.0" deno_error = "=0.5.5" +# only used with special deno_core_mac feature to prevent ffi issue on macos, requires libffi to be installed +libffi-sys = { version = "2.3.0", features = ["system"]} + google-cloud-pubsub = "0.30.0" google-cloud-googleapis = {version = "0.16.1", features = ["pubsub"]} # TODO: remove once deno fixes the issue on their end diff --git a/backend/windmill-worker/Cargo.toml b/backend/windmill-worker/Cargo.toml index 19c8c0d31f..d249a78319 100644 --- a/backend/windmill-worker/Cargo.toml +++ b/backend/windmill-worker/Cargo.toml @@ -22,6 +22,7 @@ cloud = [] sqlx = [] deno_core = ["dep:deno_fetch", "dep:deno_webidl", "dep:deno_web", "dep:deno_net", "dep:deno_console", "dep:deno_url", "dep:deno_core", "dep:deno_ast", "dep:deno_tls", "dep:deno_permissions", "dep:deno_io", "dep:deno_runtime", "dep:deno_telemetry", "dep:deno_error", "dep:winapi"] +libffi_mac = ["dep:libffi-sys"] otel = ["windmill-common/otel", "dep:opentelemetry"] dind = ["dep:bollard"] php = ["dep:windmill-parser-php"] @@ -147,3 +148,4 @@ deno_io = { workspace = true, optional = true } deno_runtime = { workspace = true, optional = true } deno_telemetry = { workspace = true, optional = true } winapi = { workspace = true, optional = true } +libffi-sys = { workspace = true, optional = true } diff --git a/frontend/README_DEV.md b/frontend/README_DEV.md index c17ac944c8..c5ba2a0c15 100644 --- a/frontend/README_DEV.md +++ b/frontend/README_DEV.md @@ -139,15 +139,6 @@ If you develop wasm parser for new language you can also pass `--wasm-pkg > ~/.zshrc - source ~/.zshrc - ``` - In the root folder: ```bash @@ -166,6 +157,20 @@ In the frontend folder: REMOTE=http://127.0.0.1:8000 REMOTE_LSP=http://127.0.0.1:3001 npm run dev ``` +**Known issue on M1 Mac while running `cargo run`** + +- You may encounter `linking with cc failed` build time error. +- To solve this run: + ```bash + echo 'export RUSTFLAGS="-L/opt/homebrew/opt/libomp/lib"' >> ~/.zshrc + source ~/.zshrc + ``` + +**Known issue on M1 Mac while running `cargo run` with the `deno_core` feature** + +- You may encounter ``failed to run custom build command for `libffi-sys v2.3.0` `` build time error. +- To solve this use the `deno_core_mac` feature flag _instead_ of `deno_core`. You might need to install `libffi` (e.g. `brew install libffi`). + ### Formatting This project uses [prettier](https://prettier.io/docs/en/install.html) and