| Crates.io | casial-wasm |
| lib.rs | casial-wasm |
| version | 0.1.4 |
| created_at | 2025-09-15 00:29:47.694604+00 |
| updated_at | 2025-09-15 02:22:15.286108+00 |
| description | WASM bindings for universal consciousness-aware context coordination in web browsers and JavaScript environments |
| homepage | https://promptedllc.com |
| repository | https://github.com/prompted365/context-casial-xpress |
| max_upload_size | |
| id | 1839294 |
| size | 48,403 |
WASM bindings for universal consciousness-aware context coordination, bringing Casial's context management capabilities to web browsers and Node.js environments.
Casial WASM provides WebAssembly bindings for casial-core, enabling browser-based and Node.js applications to participate in consciousness-aware context coordination. This allows web applications to intelligently manage and coordinate context across different environments.
wee_allocnpm install casial-wasm
# or
yarn add casial-wasm
[dependencies]
casial-wasm = "0.1.0"
<script type="module">
import init, { ContextCoordinator } from './pkg/casial_wasm.js';
async function run() {
await init();
const coordinator = new ContextCoordinator();
// Register context sources
coordinator.register_source("user-input", {
type: "interactive",
priority: "high"
});
// Process context
const result = await coordinator.process_context({
content: "User wants to create a new document",
source: "user-input",
timestamp: Date.now()
});
console.log("Context processed:", result);
}
run();
</script>
const { ContextCoordinator } = require('casial-wasm');
// Initialize the coordinator
const coordinator = new ContextCoordinator();
// Use with async/await
async function processUserAction(action) {
const context = {
content: action.description,
source: "user-interface",
metadata: action.metadata
};
return await coordinator.process_context(context);
}
// Use with promises
coordinator.query_context("recent interactions")
.then(results => console.log("Query results:", results))
.catch(err => console.error("Query failed:", err));
import init, { ContextCoordinator, ContextEntry } from 'casial-wasm';
interface UserAction {
type: string;
data: any;
timestamp: number;
}
class ContextManager {
private coordinator: ContextCoordinator;
async initialize() {
await init();
this.coordinator = new ContextCoordinator();
}
async processAction(action: UserAction): Promise<ContextEntry[]> {
return this.coordinator.process_context({
content: JSON.stringify(action.data),
source: `user-${action.type}`,
timestamp: action.timestamp
});
}
}
# Clone the repository
git clone https://github.com/prompted-llc/context-casial-xpress
cd context-casial-xpress/crates/casial-wasm
# Build for web
wasm-pack build --target web
# Build for Node.js
wasm-pack build --target nodejs
# Build for bundler (webpack, etc.)
wasm-pack build --target bundler
The WASM bindings expose the following key classes and methods:
ContextCoordinator: Main coordination engineContextEntry: Individual context itemsContextQuery: Query interface for retrieving contextContextSource: Context source registration and managementSee the TypeScript definitions for complete API documentation.
The WASM module is optimized for size and performance:
-Os optimizationswee_alloc for minimal memory footprintserde-wasm-bindgenLicensed under either of
at your option.