SpacetimeDB
SpacetimeDB copied to clipboard
Add .cargo/config.toml to spacetime init Rust project with default target
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"
P2 since this only happens with (light) user error of running cargo build instead of spacetime build
@gefjon points out that this might affect rust-analyzer (e.g. within vscode)