@shd101wyy/yo 0.1.1 → 0.1.2
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 +50 -71
- package/out/cjs/index.cjs +1266 -513
- package/out/cjs/yo-cli.cjs +1404 -649
- package/out/esm/index.mjs +1292 -539
- package/out/types/src/codegen/async/runtime-io-wasm.d.ts +4 -0
- package/out/types/src/codegen/codegen-c.d.ts +2 -0
- package/out/types/src/compiler-utils.d.ts +1 -0
- package/out/types/src/expr.d.ts +2 -0
- package/out/types/src/module-manager.d.ts +1 -0
- package/out/types/src/target.d.ts +3 -1
- package/out/types/src/test-runner.d.ts +2 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/std/build.yo +14 -0
- package/std/crypto/random.yo +21 -1
- package/std/fs/dir.yo +5 -4
- package/std/prelude.yo +12 -3
- package/std/process.yo +2 -0
- package/std/regex/index.yo +1 -1
- package/std/regex/vm.yo +4 -4
- package/std/string/string.yo +3 -3
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Emitter } from "../../emitter";
|
|
2
|
+
import type { TargetInfo } from "../../target";
|
|
3
|
+
export declare function generatePlatformSysRuntimeWasm(emitter: Emitter, _targetInfo?: TargetInfo): void;
|
|
4
|
+
export declare function generateAsyncRuntimeIOWasm(emitter: Emitter, targetInfo?: TargetInfo): void;
|
|
@@ -3,6 +3,7 @@ export declare class CodeGeneratorC {
|
|
|
3
3
|
private emitter;
|
|
4
4
|
private exportedFunctionNames;
|
|
5
5
|
private _needsIntelAsmSyntax;
|
|
6
|
+
private _usesParallelism;
|
|
6
7
|
constructor();
|
|
7
8
|
compileModule(modulePath: string, moduleValue: ModuleValue, options?: {
|
|
8
9
|
debugGc?: boolean;
|
|
@@ -14,4 +15,5 @@ export declare class CodeGeneratorC {
|
|
|
14
15
|
print(): string;
|
|
15
16
|
getExportedFunctionNames(): Set<string>;
|
|
16
17
|
get needsIntelAsmSyntax(): boolean;
|
|
18
|
+
get usesParallelism(): boolean;
|
|
17
19
|
}
|
package/out/types/src/expr.d.ts
CHANGED
|
@@ -526,11 +526,13 @@ export declare const BuiltinFunctions: {
|
|
|
526
526
|
__yo_getrandom: string[];
|
|
527
527
|
__yo_arc4random_buf: string[];
|
|
528
528
|
__yo_bcrypt_gen_random: string[];
|
|
529
|
+
__yo_getentropy: string[];
|
|
529
530
|
__yo_maybe_uninit_new: string[];
|
|
530
531
|
__yo_maybe_uninit_as_ptr: string[];
|
|
531
532
|
__yo_maybe_uninit_assume_init: string[];
|
|
532
533
|
__yo_process_platform: string[];
|
|
533
534
|
__yo_process_arch: string[];
|
|
535
|
+
__yo_pointer_size_bits: string[];
|
|
534
536
|
__yo_build_executable: string[];
|
|
535
537
|
__yo_build_static_library: string[];
|
|
536
538
|
__yo_build_shared_library: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Arch = "x86_64" | "aarch64" | "x86" | "arm" | "wasm32";
|
|
2
|
-
export type Os = "linux" | "macos" | "windows" | "freebsd" | "wasi";
|
|
2
|
+
export type Os = "linux" | "macos" | "windows" | "freebsd" | "wasi" | "emscripten";
|
|
3
3
|
export type Abi = "gnu" | "musl" | "msvc" | "none" | "wasm";
|
|
4
4
|
export interface TargetInfo {
|
|
5
5
|
arch: Arch;
|
|
@@ -26,4 +26,6 @@ export declare function isTargetLinux(target: TargetInfo): boolean;
|
|
|
26
26
|
export declare function isTargetMacos(target: TargetInfo): boolean;
|
|
27
27
|
export declare function isTargetMSVC(target: TargetInfo): boolean;
|
|
28
28
|
export declare function isTargetWasm(target: TargetInfo): boolean;
|
|
29
|
+
export declare function isTargetEmscripten(target: TargetInfo): boolean;
|
|
30
|
+
export declare function isTargetStandaloneWasi(target: TargetInfo): boolean;
|
|
29
31
|
export declare function isTargetPosix(target: TargetInfo): boolean;
|
|
@@ -22,6 +22,7 @@ export interface TestRunSummary {
|
|
|
22
22
|
totalTests: number;
|
|
23
23
|
passed: number;
|
|
24
24
|
failed: number;
|
|
25
|
+
skipped: number;
|
|
25
26
|
results: TestResult[];
|
|
26
27
|
duration: number;
|
|
27
28
|
}
|
|
@@ -29,6 +30,7 @@ export declare function findTestFiles(targetPath: string): string[];
|
|
|
29
30
|
export declare function extractTests(filePath: string): ExtractTestsResult;
|
|
30
31
|
export declare function runTests(testFiles: string[], options?: {
|
|
31
32
|
cCompiler?: string;
|
|
33
|
+
target?: string;
|
|
32
34
|
verbose?: boolean;
|
|
33
35
|
bail?: boolean;
|
|
34
36
|
testNamePattern?: string;
|