Skip to content

Cmake build integration #1

Description

@tgross35

I think this would look like the following:

  • Add a MYSQL_ADD_RUST_PLUGIN macro
  • Macro should check that cargo is available, possibly validate version (not sure what our MSRV is here but I think 1.65 is probably reasonable)
  • Dynamic: cargo rustc --manifest-path rust/somepath/Cargo.toml --target-dir rust/target --crate-type=cdylib
  • Static: cargo rustc --manifest-path rust/somepath/Cargo.toml --target-dir rust/target --crate-type=staticlib -- --cfg make_static_lib
  • --release or based on whether it's a debug build
  • Output is in rust/target/debug/ or rust/target/release (can also rename)

Not sure how to handle C code dependency and communicate that with the build system for dynamic, but for static I think it would just work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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