-
Notifications
You must be signed in to change notification settings - Fork 920
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
Bug: dependency ring
cannot target wasm32_unknown_unknown
#3321
Comments
I think I'm encountering a similar issue when trying to build the wasm32 part of Surrealist. The official build seems to work fine though.
|
This is a huge blocker for anyone trying to use the Surreal crate as client on their Rust frontend projects, would be interested on advice regarding whether to take this issue upstream (to ring) or leave it here. |
Related: briansmith/ring#1824 |
Issue is only persistent on Apple Silicone Macs and not on elsewhere from my findings. Upstream issue comments suggest it's due to Apple Clang fork being different to LLMVs not supporting wasm compilation target. Reference: briansmith/ring#1824 (comment) Solutions:
|
For reference - in order to be built with Nix, the following was required: rustPlatform.buildRustPackage {
# ...
nativeBuildInputs = [
rustc.llvmPackages.clangNoLibc
rustc.llvmPackages.lld
];
buildPhase = ''
CC=clang CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER=lld cargo build \
--target wasm32-unknown-unknown \
--release
'';
} |
@itsezc Does this still happen for you on nightly? We merged a fix for ring two days ago. |
Yes it does @rushmorem, does not build on MacOS (due to what I believe to be an upstream issue with ring and custom clang Apple ships). Here's how I have my Cargo.toml setup for surreal: [dependencies]
dioxus.workspace = true
dioxus-web.workspace = true
dioxus-router.workspace = true
serde.workspace = true
surrealdb = { git = 'https://github.com/surrealdb/surrealdb' } Log:
|
Can you try disabling surrealdb = { version = "1", default-features = false, features = ["protocol-ws"], package = "surrealdb-nightly" } |
Using this config: [dependencies]
dioxus.workspace = true
dioxus-web.workspace = true
dioxus-router.workspace = true
serde.workspace = true
surrealdb = { version = "1", default-features = false, features = [
"protocol-ws",
], package = "surrealdb-nightly" } Running
Note: I'm using Dioxus 0.4.3 |
I think that new error is related to surrealdb/surrealdb.wasm#41. There is a potential workaround here surrealdb/surrealdb.wasm#41 (comment). |
Describe the bug
While trying to build a project with Dioxus and Surreal, I've tried following the guide laid out on docs.rs and ran through
dx serve
Surreal is preventing a successful build because of its dependency onring
.Steps to reproduce
Expected behaviour
For a successful build and to use Surreal rs library through WASM
SurrealDB version
1.1.0
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: