Skip to content

Commit

Permalink
Only use ::dfdx as a path entrypoint on code generation
Browse files Browse the repository at this point in the history
- Re-export the `self` crate as `dfdx`.
  - See [related question](https://users.rust-lang.org/t/how-to-express-crate-path-in-procedural-macros/91274/10).
  - Does the same for `dfdx-core`.
- Change the generated code so they always have the `::dfdx` path entrypoint.
  - User apps no longer need to depend on `dfdx-core` or `dfdx-derives` directly.
- Re-export `safetensors`.
  - User apps no longer need to depend on `safetensors` directly (as in, this is no longer required by the `SaveSafeTensors` and `LoadSafeTensors` derivations).
  • Loading branch information
swfsql committed Nov 8, 2023
1 parent b1a6e67 commit 259bd01
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 102 deletions.
1 change: 1 addition & 0 deletions dfdx-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
extern crate alloc;
#[cfg(all(feature = "no-std", not(feature = "std")))]
extern crate no_std_compat as std;
extern crate self as dfdx_core;

pub mod data;
pub mod dtypes;
Expand Down
Loading

0 comments on commit 259bd01

Please sign in to comment.