SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Add .cargo/config.toml to spacetime init Rust project with default target

Open jdetter opened this issue 1 year ago • 2 comments

Re: https://github.com/clockworklabs/SpacetimeDB/issues/185 Users are confused by cargo build attempting to compile modules for their default native target and failing to statically link against the non-existent bindings-sys host functions. We should set Cargo’s default target to wasm32-unknown-unknown, so that cargo build works.

[build]
target = "wasm32-unknown-unknown"

jdetter avatar Sep 23 '24 20:09 jdetter

P2 since this only happens with (light) user error of running cargo build instead of spacetime build

bfops avatar Nov 20 '24 20:11 bfops

@gefjon points out that this might affect rust-analyzer (e.g. within vscode)

bfops avatar Nov 20 '24 20:11 bfops