@@ -56,34 +56,18 @@ def build():
5656 platform = get_current_platform ()
5757 elif platform and platform not in PLATFORMS :
5858 raise RuntimeError (f"unsupported platform: { platform } " )
59- # platform-specific build
60- build_docker_image (platform )
59+ # platform-specific build (native, no cross needed)
6160 build_rust_library (platform )
6261 copy_rust_library (platform )
6362 generate_bindings (platform )
6463
6564
66- def build_docker_image (platform ):
67- """Build the docker image to cross-build for the provided platform."""
68- target = PLATFORMS [platform ]["target" ]
69- if "macosx" in platform :
70- target = f"{ target } -cross"
71- args = ["cargo" , "build-docker-image" , target , "--tag" , "local" ]
72- if "macosx" in platform :
73- mac_sdk_url = (
74- "https://github.com/joseluisq/macosx-sdks/releases/download/"
75- f"{ OSX_VERSION } /MacOSX{ OSX_VERSION } .sdk.tar.xz"
76- )
77- args .extend (["--build-arg" , f"MACOS_SDK_URL={ mac_sdk_url } " ])
78- run (args , cwd = "cross" , check = True )
79-
80-
8165def build_rust_library (platform ):
82- """Build the Rust library for the specified target."""
66+ """Build the Rust library for the specified target using native cargo ."""
8367 target = PLATFORMS [platform ]["target" ]
8468 run (
8569 [
86- "cross " ,
70+ "cargo " ,
8771 "build" ,
8872 "--manifest-path" ,
8973 str (MANIFEST_PATH ),
0 commit comments