Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm): Remove stacker from dependencies #2637

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

phated
Copy link
Contributor

@phated phated commented Sep 11, 2023

Description

Problem*

Resolves

Summary*

Up until this change, we've been unable to build noir_wasm on Mac. When trying to compile, we'd get this message:

    Compiling libc v0.2.147
    Compiling psm v0.1.21
 error: failed to build archive: section too large

 The following warnings were emitted during compilation:

 warning: warning: /bin/ranlib: archive library: /private/tmp/nix-build-noir_wasm-deps-0.11.1.drv-0/source/target/wasm32-unknown-unknown/release/build/psm-015060b7823c61b7/out/libpsm_s.a the table of contents is empty (no object file members in the library define global symbols)

 error: could not compile `psm` due to previous error

While the error was "Section too large", I felt like it might be a red herring since the libpsm_s.a was mentioned in the warning. In the psm docs, it claims:

This library is not applicable to the target. WASM hasn’t a specified C ABI, the callstack is not even in an address space and does not appear to be manipulatable.

I did some digging and found we were only getting the dependency due to default features of chumsky (the spill-stack feature), so I turned off the feature and tried for compiling to wasm—and it worked!

I'm not exactly sure why noir_wasm compiles on Linux but not Mac with this dependency, but seems that it wouldn't be doing anything in the wasm context, so I'm also guessing we don't rely on it.

@jfecher Do you know if Noir actively depend upon this spill-stack feature through the stacker dependency of chumsky?

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kevaundray kevaundray added this pull request to the merge queue Sep 11, 2023
Merged via the queue into master with commit 36691ab Sep 11, 2023
15 checks passed
@kevaundray kevaundray deleted the phated/remove-stacker branch September 11, 2023 17:43
TomAFrench added a commit that referenced this pull request Sep 11, 2023
* master:
  chore: Move tooling related items into their own directory (#2644)
  chore: add `CompilationResult` helper type (#2639)
  fix: initialise arrays returned by brillig (#2048)
  chore: clippy fix (#2631)
  fix(wasm): Remove stacker from dependencies (#2637)
TomAFrench added a commit that referenced this pull request Sep 11, 2023
* master:
  chore: Move tooling related items into their own directory (#2644)
  chore: add `CompilationResult` helper type (#2639)
  fix: initialise arrays returned by brillig (#2048)
  chore: clippy fix (#2631)
  fix(wasm): Remove stacker from dependencies (#2637)
  chore(ci): reenable CI for `noir_wasm` (#2636)
  fix: avoid overflows in integer division (#2180)
  chore(ci): Nightly Integration testing  (#2596)
  feat(parser): allow multiple attributes (#2537)
  feat(nargo): Allow installing custom backends from the CLI (#2632)
  chore(ci): enforce clippy and `cargo fmt` in CI (#2628)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants