@spade-lang/spade 0.9.0-dev.899bf3-1ce864

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.
@@ -0,0 +1,7 @@
1
+ export const modules = {
2
+ "spade.core.wasm": new URL("./spade.core.wasm", import.meta.url),
3
+ "spade.core2.wasm": new URL("./spade.core2.wasm", import.meta.url),
4
+ "spade.core3.wasm": new URL("./spade.core3.wasm", import.meta.url),
5
+ "spade.core4.wasm": new URL("./spade.core4.wasm", import.meta.url),
6
+ };
7
+ export const filesystem = {};
Binary file
Binary file
Binary file
Binary file
package/lib/api.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ export type Tree = {
2
+ [name: string]: Tree | string | Uint8Array
3
+ };
4
+
5
+ export type InputStream =
6
+ (byteLength: number) => Uint8Array | null;
7
+
8
+ export type OutputStream =
9
+ (bytes: Uint8Array | null) => void;
10
+
11
+ export type RunOptions = {
12
+ stdin?: InputStream | null;
13
+ stdout?: OutputStream | null,
14
+ stderr?: OutputStream | null,
15
+ decodeASCII?: boolean
16
+ };
17
+
18
+ export type Command =
19
+ (args?: string[], files?: Tree, options?: RunOptions) => Tree | Promise<Tree> | undefined;
20
+
21
+ export class Exit extends Error {
22
+ code: number;
23
+ files: Tree;
24
+ }
25
+
26
+ export const runYosys: Command;
27
+
28
+ export const commands: {
29
+ 'yosys': Command,
30
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@spade-lang/spade",
3
+ "version": "0.9.0-dev.899bf3-1ce864",
4
+ "description": "Yosys Open SYnthesis Suite",
5
+ "author": "Frans Skarman <frans.skarman@liu.se>",
6
+ "license": "ISC",
7
+ "homepage": "https://spade-lang.org/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://gitlab.com/spade-lang/yowasp.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/spade-lang/spade/issues"
14
+ },
15
+ "type": "module",
16
+ "files": [
17
+ "lib/api.d.ts",
18
+ "gen/bundle.js",
19
+ "gen/resources-*.js",
20
+ "gen/*.wasm",
21
+ "gen/share/"
22
+ ],
23
+ "exports": {
24
+ "types": "./lib/api.d.ts",
25
+ "default": "./gen/bundle.js"
26
+ },
27
+ "types": "./lib/api.d.ts",
28
+ "devDependencies": {
29
+ "@bytecodealliance/jco": "1.0.0",
30
+ "@yowasp/runtime": "8.0.40",
31
+ "esbuild": "^0.19.8"
32
+ },
33
+ "scripts": {
34
+ "transpile": "jco new ../spade/target/wasm32-wasi/release/spade.wasm --wasi-command --output spade.wasm && jco transpile spade.wasm --instantiation sync --no-typescript --no-namespaced-exports --map 'wasi:io/*=runtime#io' --map 'wasi:cli/*=runtime#cli' --map 'wasi:clocks/*=runtime#*' --map 'wasi:filesystem/*=runtime#fs' --map 'wasi:random/*=runtime#random' --out-dir gen/",
35
+ "pack": "yowasp-pack-resources gen/resources-spade.js gen",
36
+ "build": "esbuild --bundle lib/api.js --outfile=gen/bundle.js --format=esm --platform=node --external:./resources-*.js",
37
+ "all": "npm run transpile && npm run pack && npm run build"
38
+ }
39
+ }