@maligator/cli 0.1.0-alpha.3 → 0.1.0-alpha.30

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/README.md CHANGED
@@ -38,7 +38,7 @@ maligator run -- first-argument "two words"
38
38
 
39
39
  `maligator init` creates `maligator.build.ts`. If it cannot find an existing entry
40
40
  point, it also creates `src/index.ts`. `doctor` checks the native build toolchain,
41
- `build` produces a development executable, and `run` builds and launches it while
41
+ `build` produces a development executable, and `run` compiles a development image and executes it while
42
42
  forwarding everything after `--` to the application.
43
43
 
44
44
  Useful commands:
@@ -50,99 +50,51 @@ maligator init
50
50
  maligator doctor [--verbose] [--target rust-triple]
51
51
  maligator build [entry] [--production] [--artifact directory] [--target rust-triple] [--config path]
52
52
  maligator run [entry] [--config path] [-- args...]
53
+ maligator dev [entry] [--config path] [-- args...]
54
+ maligator test [path ...] [--run name] [--shuffle [seed]] [--repeat count] [--bail]
53
55
  ```
54
56
 
55
57
  Run commands from the project root. Maligator does not search parent directories
56
58
  for configuration.
57
59
 
58
- ## Production builds
59
-
60
- Use production mode for a deployable binary:
61
-
62
- ```shell
63
- maligator build --production
64
- ```
65
-
66
- Production builds use optimized native compilation, add LTO when the toolchain
67
- supports it, and strip native symbols when possible. To create a self-contained
68
- artifact directory with a manifest, license, checksum, and binary:
69
-
70
- ```shell
71
- maligator build --production --artifact dist/my-application
72
- ```
73
-
74
- The artifact destination must be absent or empty. Launch the reported binary
75
- directly; neither Node.js nor the Maligator CLI is needed at runtime.
76
-
77
- ## Configuration
78
-
79
- `maligator.build.ts` is trusted TypeScript configuration. A small configuration
80
- looks like this:
81
-
82
- ```typescript
83
- import { defineBuild } from "@maligator/cli";
84
-
85
- export default defineBuild({
86
- entry: "src/index.ts",
87
- outputName: "my-application",
88
- engine: {
89
- eval: false,
90
- intl: { enabled: false },
91
- },
92
- surface: {
93
- webPlatform: false,
94
- node: false,
95
- },
96
- });
97
- ```
98
-
99
- All fields are optional. Maligator excludes optional engine and host surfaces unless
100
- the configuration requests them. See the
101
- [full configuration reference](https://github.com/dirkdev98/maligator#configuration)
102
- for assets, Intl features, Node compatibility, web-platform support, and target
103
- selection.
104
-
105
- ## TypeScript
106
-
107
- The package includes declarations for `maligator.build.ts` and Maligator's runtime
108
- globals. Keeping the generated build file inside your TypeScript project makes the
109
- types available automatically:
110
-
111
- ```typescript
112
- const path = mal.assets.materialize("templates", {
113
- baseDirectory: ".cache/my-application",
114
- });
115
-
116
- const server = Mal.serve({
117
- hostname: "127.0.0.1",
118
- port: 3000,
119
- async fetch(request) {
120
- return new Response(`Hello from ${request.url}`);
121
- },
122
- });
123
-
124
- console.log(path, server.port);
125
- ```
126
-
127
- `mal` is present when `surface.maligator` is enabled. `Mal` and `Mal.serve` are
128
- present when `surface.webPlatform` is enabled. The declarations describe both
129
- optional surfaces, while `maligator.build.ts` controls which globals exist in the
130
- compiled application.
131
-
132
- If your `tsconfig.json` excludes `maligator.build.ts`, load the declarations
133
- explicitly:
134
-
135
- ```json
136
- {
137
- "compilerOptions": {
138
- "types": ["@maligator/cli"]
139
- }
140
- }
141
- ```
60
+ `run` and `dev` use compile-time-specialized runtimes embedded in the platform
61
+ package for locked or mutable primordials, configured assets, the Web and Node
62
+ surfaces, and Realm support when Intl is disabled. Those profiles do not need a local
63
+ native toolchain. `dev` retains compiler identities between edits and restarts a fresh
64
+ application VM after every successful rebuild. Build failures keep the watcher alive
65
+ for recovery on the next edit.
66
+
67
+ ## Documentation
68
+
69
+ Use the [guides](https://maligator.ddv.tools/guides) for application workflows and
70
+ the [API reference](https://maligator.ddv.tools/api) for exact contracts.
71
+
72
+ - [Getting started](https://maligator.ddv.tools/guides/getting-started)
73
+ - [Development](https://maligator.ddv.tools/guides/development) and
74
+ [TypeScript](https://maligator.ddv.tools/guides/typescript)
75
+ - [Application testing](https://maligator.ddv.tools/guides/testing)
76
+ - [Workers](https://maligator.ddv.tools/guides/workers)
77
+ - [Build configuration](https://maligator.ddv.tools/guides/build-configuration)
78
+ - [Embedded files](https://maligator.ddv.tools/guides/assets) and
79
+ [HTTP](https://maligator.ddv.tools/guides/http)
80
+ - [Production](https://maligator.ddv.tools/guides/production) and
81
+ [profiling](https://maligator.ddv.tools/guides/profiling)
82
+ - [CLI commands and flags](https://maligator.ddv.tools/api/cli)
83
+
84
+ The package ships types for configuration, runtime globals, and public `maligator:`
85
+ modules. Include `@maligator/cli` in `compilerOptions.types` when your TypeScript
86
+ project excludes the build file. Declarations do not enable optional runtime surfaces;
87
+ choose those in `maligator.build.ts`.
88
+
89
+ Every page has a Markdown counterpart. The
90
+ [public symbol index](https://maligator.ddv.tools/reference.json) provides signatures,
91
+ defaults, availability, and direct links.
142
92
 
143
93
  ## Build toolchain
144
94
 
145
- The compiler CLI is prebuilt, but compiling an application requires:
95
+ `maligator test` and supported `maligator run` profiles use the development runtime
96
+ embedded in the platform CLI and do not require a native toolchain. Native `build`
97
+ commands and development runs using Intl require:
146
98
 
147
99
  - A C23 compiler and archive tool: Apple clang, clang 19 or newer, or GCC 15 or
148
100
  newer
@@ -152,15 +104,14 @@ The compiler CLI is prebuilt, but compiling an application requires:
152
104
  On macOS, install Apple command-line tools with `xcode-select --install`. On Linux,
153
105
  install a recent compiler and set `CC` and `CXX` when it is not your system default.
154
106
  Run `maligator doctor --verbose` for resolved tool paths, versions, capabilities,
155
- and installation hints. The
156
- [native toolchain guide](https://github.com/dirkdev98/maligator#native-toolchain)
157
- has the full requirements and cross-compilation instructions.
107
+ and installation hints.
108
+ [Set up native builds](https://maligator.ddv.tools/guides/native-toolchain) has the
109
+ full requirements and cross-compilation instructions.
158
110
 
159
111
  ## Alpha support
160
112
 
161
- `0.1.0-alpha.1` provides native packages for macOS and glibc-based Linux on arm64
162
- and x64. Later alpha releases currently default to Apple Silicon macOS; consult the
163
- release notes before upgrading on another host. Windows is not supported.
113
+ Native packages cover macOS and glibc-based Linux on arm64 and x64. Windows is not
114
+ supported.
164
115
 
165
116
  There is no source-build fallback for the CLI package. The alpha binaries are
166
117
  unsigned, and macOS binaries are not notarized. APIs, configuration, and supported