Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notes on JCO imports #1

Draft
wants to merge 5 commits into
base: jco534
Choose a base branch
from
Draft

notes on JCO imports #1

wants to merge 5 commits into from

Conversation

cataggar
Copy link
Owner

No description provided.

"plug": "wac plug target/wasm32-wasip1/debug/test-rs.wasm --plug ../typescript/ts-typescript.wasm -o target/test.wasm --plug ../typescript-system/target/wasm32-wasip1/debug/typescript_system.wasm",
"run": "wasmtime run target/test.wasm a b c"
"plug": "wac plug target/wasm32-wasip1/debug/test-rs.wasm -o target/test.wasm --plug ../typescript/ts-typescript.wasm",
"plug2": "wac plug target/test.wasm -o target/test2.wasm --plug ../typescript-system/target/wasm32-wasip1/debug/typescript_system.wasm",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to plug one at a time. I had to do this for rust-rust-rust as well. Not specific to JCO.

@@ -17,7 +17,7 @@
"componentize": "bunx jco componentize world.js --wit wit -o ts-typescript.wasm -d all"
},
"devDependencies": {
"@bytecodealliance/jco": "1.8.1",
"@bytecodealliance/jco": "file:../../jco",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,15 +1,11 @@
// import { TsTypescriptSystemTypes as tssystem } from 'ts-typescript-system-types';
// import TsSystem = tssystem.System;
import { System } from 'ts:typescript-system/types';
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name matches the wit name.

@@ -12,7 +12,7 @@
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"ts-typescript-system-types": ["interfaces/ts-typescript-system-types.d.ts"]
"ts:typescript-system/types": ["interfaces/ts-typescript-system-types.d.ts"]
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then here in tsconfig.json, you can say where to find the generated type definition for it. The types are generated by jco types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants