diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py
index 01d49435c3e8..06963294ef35 100644
--- a/bitbake/lib/bb/fetch2/crate.py
+++ b/bitbake/lib/bb/fetch2/crate.py
@@ -23,8 +23,8 @@ class Crate(Wget):
 
     """Class to fetch crates via wget"""
 
-    def _cargo_bitbake_path(self, rootdir):
-        return os.path.join(rootdir, "cargo_home", "bitbake")
+    def _cargo_bitbake_path(self, d):
+        return d.getVar('CARGO_VENDORING_DIRECTORY')
 
     def supports(self, ud, d):
         """
@@ -103,7 +103,7 @@ class Crate(Wget):
             cmd = "tar -xz --no-same-owner -f %s" % thefile
             ud.unpack_tracer.unpack("crate-extract", rootdir)
         else:
-            cargo_bitbake = self._cargo_bitbake_path(rootdir)
+            cargo_bitbake = self._cargo_bitbake_path(d)
             ud.unpack_tracer.unpack("cargo-extract", cargo_bitbake)
 
             cmd = "tar -xz --no-same-owner -f %s -C %s" % (thefile, cargo_bitbake)
@@ -134,7 +134,7 @@ class Crate(Wget):
         # if we have metadata to write out..
         if len(metadata) > 0:
             cratepath = os.path.splitext(os.path.basename(thefile))[0]
-            bbpath = self._cargo_bitbake_path(rootdir)
+            bbpath = self._cargo_bitbake_path(d)
             mdfile = '.cargo-checksum.json'
             mdpath = os.path.join(bbpath, cratepath, mdfile)
             with open(mdpath, "w") as f:
