Visitar URL original
Build broken on wasip1 · Issue #7236 · RustPython/RustPython · GitHub
Skip to content

Build broken on wasip1 #7236

Description

@SeaRoll

Summary

Building code as such:

vm::Interpreter::without_stdlib(Default::default())
        .enter(|vm| {
            let scope = vm.new_scope_with_builtins();
            let source = r#"print("Hello World!")"#;
            let code_obj = vm
                .compile(source, vm::compiler::Mode::Exec, "<embedded>".to_owned())
                .map_err(|err| vm.new_syntax_error(&err, Some(source)))
                .unwrap();

            vm.run_code_obj(code_obj, scope).unwrap();

            Ok(())
        })

I get when I build

Compiling sgp40 v1.0.0 (https://github.com/prizm-io/sgp40-rs?branch=async#16be0302)
   Compiling sht4x v0.2.0
   Compiling embedded-can v0.4.1
   Compiling embedded-nal v0.9.0
   Compiling bma400 v1.0.2
   Compiling shtcx v1.0.0
   Compiling aw2013 v2.1.0
   Compiling regex-lite v0.1.9
   Compiling rquickjs v0.11.0
error[E0425]: cannot find value `CLOCK_PROCESS_CPUTIME_ID` in crate `libc`
   --> /Users/searoll/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustpython-vm-0.4.0/src/stdlib/time.rs:334:42
    |
334 |             if libc::clock_gettime(libc::CLOCK_PROCESS_CPUTIME_ID, time.as_mut_ptr()) == -1 {
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`

Expected

It should be built

Actual

The error happens

Activity

  1. ShaharNaveh commented on Feb 27, 2026

    @ShaharNaveh
    Contributor

    Hey, thanks for the report:)

    Our published version over crates.io is very outdated, can you please try to use git as the package source?

  2. SeaRoll commented on Feb 27, 2026

    @SeaRoll
    Author

    Will try and report back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions