Throwaway prototypes for Sausage v3. Plan and decisions: ~/research/sausage-v3/PLAN.md. Results and evidence: the spike READMEs.
17 lines
863 B
Nu
17 lines
863 B
Nu
#!/usr/bin/env nu
|
|
# Apply the experiment only to the pinned scratch checkout.
|
|
def main [] {
|
|
let root = '/tmp/s2-shell/brush'
|
|
let revision = (^git -C $root rev-parse HEAD | str trim)
|
|
if $revision != '943553433ae04f5b3bd55d2cf207e39eb9ef2af7' { error make {msg: 'unexpected brush revision'} }
|
|
let core = ($root | path join brush-core)
|
|
cp ($env.FILE_PWD | path join guest-process.rs) ($core | path join src sys wasm process.rs)
|
|
cp ($env.FILE_PWD | path join process.wit) ($core | path join s2-process.wit)
|
|
let manifest = ($core | path join Cargo.toml)
|
|
let text = (open --raw $manifest)
|
|
let marker = "[target.'cfg(target_family = \"wasm\")'.dependencies]"
|
|
if not ($text | str contains 'wit-bindgen =') {
|
|
$text | str replace $marker ($marker + "\nwit-bindgen = \"0.46\"\nserde_json = \"1\"") | save -f $manifest
|
|
}
|
|
}
|