src Language

warning

This very much exists so I don't have to setup the open-source infrastructure after open-sourcing the project. There are lots of moving parts to the documentation, like the rustdocs is generated and included in the book. Also There is a IDE of sorts in playground and a language server that is used to provide the IDE.

src is a domain specific language for manipulating source code and building, progressively distiributed apps or PDA.

It draws a lot of inspiration from Effekt and Koka languages.

src is main aim is to provide a gradually distributed programming environment for building software.

It tries to achive these goals by providing a thin veneer over the operating systems libc or equivalent by treating the syscalls to the operating system as effects.

Therefore the operating system becomes the effect handler for the execution environment.

use { host } from std

effect Make: async + throws + execs + reads + writes {
    catch() [throws]
    await<T>(f: Future<T>) [async, throws] -> T
    exec(arg0: string, args: stringvec) [Make] -> i32
}

struct Local {
    host: host
}

impl Make for Local {
    fn catch(self) [throws] {
    }
    fn await<T>(f: Future<T>) [async, trhows] -> T {
        yield()
    }
    fn exec(self, arg0: string, args: vec<string>) [Vm] -> i32 {
        self.host.read("jobserver").await
        if self.host.exec(arg0, args) {
            raise(1)
        }
    }
}

Acknowledgements

Building upon the incredible work of the Rust community and many others, src would not be possible without the following projects: