Skip to content

Commit 44c95a9

Browse files
authored
Merge pull request #1931 from polywrap/origin-0.12-dev
prep origin 0.12.2 | /workflows/release-pr
2 parents c900cf5 + fa4977d commit 44c95a9

File tree

38 files changed

+120
-86
lines changed

38 files changed

+120
-86
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Polywrap Origin (0.12.2)
2+
## Features
3+
**`polywrap` CLI:**
4+
* [PR-1928](https://github.com/polywrap/cli/pull/1928) **Add `--no-wasm` Option To `polywrap build`**
5+
* `build` command now supports the `--no-wasm` option, which disables the wasm compilation step when compiling projects.
6+
7+
## Bugs
8+
**`@polywrap/templates`:**
9+
* [PR-1929](https://github.com/polywrap/cli/pull/1929) **Fix Rust Codegen Compiler Errors**
10+
111
# Polywrap Origin (0.12.1)
212
## Features
313
**`polywrap` CLI:**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.1
1+
0.12.2

packages/cli/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ Currently, `build` can be run for Wasm, Plugin and Interface projects.
104104
Skip codegen before building.
105105
By default, `build` performs a `codegen` step before building your Project. This option skips this step.
106106

107+
- `--no-wasm`
108+
Skip wasm compilation.
109+
By default, `build` performs wasm compilation. This option skips this step.
110+
107111
- `-s, --strategy <strategy>`
108112
Specify which build strategy to use. By default, the `vm` build strategy is used.
109113
Available strategies:

packages/cli/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"commands_build_options_options": "options",
2222
"commands_build_options_t": "Use the development server's ENS instance",
2323
"commands_build_options_codegen": "Skip code generation before build",
24+
"commands_build_options_no_wasm": "Skip wasm compilation",
2425
"commands_build_options_codegen_dir": "Codegen output directory (default: {default})",
2526
"commands_build_options_s": "Strategy to use for building the wrapper (default: {default})",
2627
"commands_build_options_s_strategy": "strategy",

packages/cli/lang/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"commands_build_options_options": "options",
2222
"commands_build_options_t": "Use the development server's ENS instance",
2323
"commands_build_options_codegen": "Skip code generation before build",
24+
"commands_build_options_no_wasm": "Skip wasm compilation",
2425
"commands_build_options_codegen_dir": "Codegen output directory (default: {default})",
2526
"commands_build_options_s": "Strategy to use for building the wrapper (default: {default})",
2627
"commands_build_options_s_strategy": "strategy",

packages/cli/src/__tests__/e2e/p2/build.wasm.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Options:
2424
-c, --client-config <config-path> Add custom configuration to the
2525
PolywrapClient
2626
-n, --no-codegen Skip code generation before build
27+
--no-wasm Skip wasm compilation
2728
--codegen-dir Codegen output directory (default:
2829
./src/wrap)
2930
--wrapper-envs <envs-path> Path to a JSON file containing wrapper
@@ -265,7 +266,7 @@ describe("e2e tests for build command", () => {
265266
expect(output).toContain(`WRAP manifest written in ${buildDir}/wrap.info`);
266267
});
267268
})
268-
269+
269270
describe("test-cases", () => {
270271
for (let i = 0; i < testCases.length; i++) {
271272
const testCaseName = testCases[i];

packages/cli/src/commands/build.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface BuildCommandOptions extends BaseCommandOptions {
5151
clientConfig: string | false;
5252
wrapperEnvs: string | false;
5353
noCodegen: boolean;
54+
noWasm: boolean;
5455
codegenDir: string | false;
5556
watch: boolean;
5657
strategy: `${SupportedStrategies}`;
@@ -80,6 +81,7 @@ export const build: Command = {
8081
`${intlMsg.commands_common_options_config()}`
8182
)
8283
.option(`-n, --no-codegen`, `${intlMsg.commands_build_options_codegen()}`)
84+
.option(`--no-wasm`, `${intlMsg.commands_build_options_no_wasm()}`)
8385
.option(
8486
`--codegen-dir`,
8587
`${intlMsg.commands_build_options_codegen_dir({
@@ -117,6 +119,7 @@ export const build: Command = {
117119
outputDir: parseDirOption(options.outputDir, defaultOutputDir),
118120
bindgen: options.bindgen || false,
119121
noCodegen: !options.codegen || false,
122+
noWasm: !options.wasm || false,
120123
codegenDir: parseDirOptionNoDefault(options.codegenDir),
121124
strategy: options.strategy || defaultStrategy,
122125
watch: options.watch || false,
@@ -174,6 +177,7 @@ async function run(options: Required<BuildCommandOptions>) {
174177
bindgen,
175178
strategy,
176179
noCodegen,
180+
noWasm,
177181
codegenDir,
178182
verbose,
179183
quiet,
@@ -220,7 +224,7 @@ async function run(options: Required<BuildCommandOptions>) {
220224

221225
const isInterface = language === "interface";
222226

223-
if (isInterface) {
227+
if (isInterface || noWasm) {
224228
buildStrategy = new NoopBuildStrategy({
225229
project: project as PolywrapProject,
226230
outputDir,

packages/cli/src/lib/test-env/client-config.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { getTestEnvProviders } from "./providers";
21
import { ETH_ENS_IPFS_MODULE_CONSTANTS } from "../../lib";
32

43
import {
@@ -18,14 +17,8 @@ import { IWrapPackage, Uri } from "@polywrap/core-js";
1817
export function getTestEnvClientConfig(): Partial<BuilderConfig> {
1918
// TODO: move this into its own package, since it's being used everywhere?
2019
// maybe have it exported from test-env.
21-
const providers = getTestEnvProviders();
22-
const ipfsProvider = providers.ipfsProvider;
23-
const ethProvider = providers.ethProvider;
24-
25-
if (!ipfsProvider || !ethProvider) {
26-
throw Error("Test environment not found.");
27-
}
28-
20+
const ipfsProvider = ETH_ENS_IPFS_MODULE_CONSTANTS.ipfsProvider;
21+
const ethProvider = ETH_ENS_IPFS_MODULE_CONSTANTS.ethereumProvider;
2922
const ensAddress = ETH_ENS_IPFS_MODULE_CONSTANTS.ensAddresses.ensAddress;
3023
const testnetEnsResolverUri = "proxy/testnet-ens-contenthash-uri-resolver";
3124

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from "./client-config";
2-
export * from "./providers";

packages/cli/src/lib/test-env/providers.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)