Skip to content

Hotdog tutorial - cannot add rusqlite as a dependency #486

@cark

Description

@cark

On the tutorial at page https://dioxuslabs.com/learn/0.6/guide/databases#
it is recommended to add rusqlite by adding this to Cargo.toml:

[dependencies]
...
rusqlite = { version = "0.32.1", optional = true } # <--- add rusqlite

[features]
...
server = ["dioxus/server", "dep:rusqlite"] # <---- add dep:rusqlite

This fails to link on windows with this error:
LINK : fatal error LNK1181: cannot open input file 'sqlite3.lib'

This is because the lib isn't bundled without adding the bundled feature to rusqlite.

Here is how i fixed the issue:

rusqlite = { version = "0.32.1", features = ["bundled"], optional = true }

It might be a good idea to update the web site.

Hope this is the correct place to report such things, sorry if it isn't !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions