How to use @casual-simulation/aux-vm-client - 5 common examples

To help you get started, we’ve selected a few @casual-simulation/aux-vm-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github casual-simulation / aux / src / aux-vm-node / managers / NodeSimulationFactories.ts View on Github external
export function nodeSimulationForRemote(
    host: string,
    user: AuxUser,
    id: string,
    config: FormulaLibraryOptions['config']
): RemoteSimulation {
    const parsedId = parseSimulationId(id);
    return new RemoteSimulationImpl(
        id,
        config,
        {
            shared: {
                type: 'remote_causal_tree',
                host: host,
                id: id,
                treeName: getTreeName(parsedId.channel),
            },
        },
        cfg =>
            new AuxVMNode(
                new RemoteAuxChannel(user, cfg, {
                    sandboxFactory: lib => getSandbox(lib),
                    partitionOptions: {
                        defaultHost: host,
github casual-simulation / aux / src / aux-vm-node / managers / NodeSimulationFactories.ts View on Github external
export function nodeSimulationForBranch(
    user: AuxUser,
    client: CausalRepoClient,
    branch: string,
    extraOptions?: Partial
) {
    return new RemoteSimulationImpl(
        branch,
        null,
        {
            shared: {
                type: 'causal_repo_client',
                ...(extraOptions || {}),
                branch: branch,
                client: client,
            },
        },
        cfg =>
            new AuxVMNode(
                new RemoteAuxChannel(user, cfg, {
                    sandboxFactory: lib => getSandbox(lib),
                })
            )
github casual-simulation / aux / src / aux-vm-node / managers / NodeSimulationFactories.ts View on Github external
export function nodeSimulationForLocalRepo(user: AuxUser, id: string) {
    return new RemoteSimulationImpl(
        id,
        null,
        {
            shared: {
                type: 'causal_repo',
            },
        },
        cfg =>
            new AuxVMNode(
                new RemoteAuxChannel(user, cfg, {
                    sandboxFactory: lib => getSandbox(lib),
                })
            )
    );
}
github casual-simulation / aux / src / aux-vm-node / managers / NodeSimulationFactories.ts View on Github external
export function nodeSimulationWithConfig(
    user: AuxUser,
    id: string,
    config: AuxConfig
) {
    return new RemoteSimulationImpl(
        id,
        config.config,
        config.partitions,
        cfg =>
            new AuxVMNode(
                new RemoteAuxChannel(user, cfg, {
                    sandboxFactory: lib => getSandbox(lib),
                })
            )
    );
}
github casual-simulation / aux / src / aux-vm-node / managers / NodeSimulationFactories.ts View on Github external
cfg =>
            new AuxVMNode(
                new RemoteAuxChannel(user, cfg, {
                    sandboxFactory: lib => getSandbox(lib),
                })
            )
    );

@casual-simulation/aux-vm-client

A set of utilities required to securely run an AUX as a client.

MIT
Latest version published 6 days ago

Package Health Score

70 / 100
Full package analysis