@vercel/rust 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -4
- package/package.json +4 -8
package/dist/index.js
CHANGED
|
@@ -346,7 +346,6 @@ async function buildHandler(options) {
|
|
|
346
346
|
const architecture = lambdaOptions?.architecture || "x86_64";
|
|
347
347
|
const buildVariant = meta?.isDev ? "debug" : "release";
|
|
348
348
|
const buildTarget = cargoBuildConfiguration?.build.target ?? "";
|
|
349
|
-
(0, import_build_utils6.debug)(`Running \`cargo build\` for \`${binaryName}\``);
|
|
350
349
|
try {
|
|
351
350
|
const args = crossCompilationEnabled ? [
|
|
352
351
|
"zigbuild",
|
|
@@ -358,6 +357,9 @@ async function buildHandler(options) {
|
|
|
358
357
|
BUILDER_DEBUG ? ["--verbose"] : ["--quiet"],
|
|
359
358
|
meta?.isDev ? [] : ["--release"]
|
|
360
359
|
);
|
|
360
|
+
(0, import_build_utils6.debug)(
|
|
361
|
+
`Running \`cargo build\` for \`${binaryName}\` (\`${architecture}\`)`
|
|
362
|
+
);
|
|
361
363
|
await (0, import_execa4.default)("cargo", args, {
|
|
362
364
|
cwd: workPath,
|
|
363
365
|
env: rustEnv
|
|
@@ -366,7 +368,9 @@ async function buildHandler(options) {
|
|
|
366
368
|
(0, import_build_utils6.debug)(`Running \`cargo build\` for \`${binaryName}\` failed`);
|
|
367
369
|
throw err;
|
|
368
370
|
}
|
|
369
|
-
(0, import_build_utils6.debug)(
|
|
371
|
+
(0, import_build_utils6.debug)(
|
|
372
|
+
`Building \`${binaryName}\` for \`${process.platform}\` (\`${architecture}\`) completed`
|
|
373
|
+
);
|
|
370
374
|
let { target_directory: targetDirectory } = await getCargoMetadata({
|
|
371
375
|
cwd: workPath,
|
|
372
376
|
env: rustEnv
|
|
@@ -386,15 +390,16 @@ async function buildHandler(options) {
|
|
|
386
390
|
const handler = getExecutableName("executable");
|
|
387
391
|
const executableFile = new import_build_utils6.FileFsRef({ mode: 493, fsPath: bin });
|
|
388
392
|
const lambda = new import_build_utils6.Lambda({
|
|
393
|
+
...lambdaOptions,
|
|
389
394
|
files: {
|
|
390
395
|
...extraFiles,
|
|
391
396
|
[handler]: executableFile
|
|
392
397
|
},
|
|
393
398
|
handler,
|
|
399
|
+
supportsResponseStreaming: true,
|
|
394
400
|
architecture,
|
|
395
401
|
runtime: "executable",
|
|
396
|
-
|
|
397
|
-
...lambdaOptions
|
|
402
|
+
runtimeLanguage: "rust"
|
|
398
403
|
});
|
|
399
404
|
lambda.zipBuffer = await lambda.createZip();
|
|
400
405
|
(0, import_build_utils6.debug)(`generating function for \`${entrypoint}\``);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/rust",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/rust",
|
|
@@ -14,27 +14,23 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@iarna/toml": "^2.2.5",
|
|
17
|
-
"lodash": "^4.17.21",
|
|
18
17
|
"execa": "5"
|
|
19
18
|
},
|
|
20
19
|
"devDependencies": {
|
|
21
|
-
"typescript": "^4.9.4",
|
|
22
20
|
"@types/jest": "^29.4.0",
|
|
23
|
-
"@types/lodash": "^4.14.191",
|
|
24
21
|
"@types/ms": "^0.7.31",
|
|
25
22
|
"@types/node": "^18.11.18",
|
|
26
|
-
"@
|
|
27
|
-
"@vercel/build-utils": "13.1.0",
|
|
23
|
+
"@vercel/build-utils": "13.2.0",
|
|
28
24
|
"@vercel/routing-utils": "5.3.0",
|
|
29
25
|
"@vercel/style-guide": "^4.0.2",
|
|
30
26
|
"eslint": "^8.35.0",
|
|
31
27
|
"husky": "^8.0.3",
|
|
32
28
|
"jest": "^29.5.0",
|
|
33
29
|
"ms": "^2.1.3",
|
|
34
|
-
"node-fetch": "2.6.0",
|
|
35
30
|
"prettier": "^2.8.4",
|
|
36
31
|
"rimraf": "^4.1.1",
|
|
37
|
-
"ts-jest": "^29.0.5"
|
|
32
|
+
"ts-jest": "^29.0.5",
|
|
33
|
+
"typescript": "^4.9.4"
|
|
38
34
|
},
|
|
39
35
|
"scripts": {
|
|
40
36
|
"build": "node ../../utils/build-builder.mjs",
|